Repository: mahout Updated Branches: refs/heads/master bd1f7bdab -> 1f3566d35
MAHOUT-1863: Several fixes to cluster-syntheticcontrol.sh to fix Input path does not exist. closes apache/mahout#235 Project: http://git-wip-us.apache.org/repos/asf/mahout/repo Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/1f3566d3 Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/1f3566d3 Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/1f3566d3 Branch: refs/heads/master Commit: 1f3566d358d94a6e6a868cd74a83a553facea355 Parents: bd1f7bd Author: Albert Chu <[email protected]> Authored: Thu May 26 19:53:59 2016 -0400 Committer: Andrew Palumbo <[email protected]> Committed: Thu May 26 19:53:59 2016 -0400 ---------------------------------------------------------------------- examples/bin/cluster-syntheticcontrol.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mahout/blob/1f3566d3/examples/bin/cluster-syntheticcontrol.sh ---------------------------------------------------------------------- diff --git a/examples/bin/cluster-syntheticcontrol.sh b/examples/bin/cluster-syntheticcontrol.sh index 8f37cc6..39b2255 100755 --- a/examples/bin/cluster-syntheticcontrol.sh +++ b/examples/bin/cluster-syntheticcontrol.sh @@ -75,11 +75,21 @@ if [ "$HADOOP_HOME" != "" ] && [ "$MAHOUT_LOCAL" == "" ]; then echo "DFS is healthy... " echo "Uploading Synthetic control data to HDFS" $DFSRM ${WORK_DIR}/testdata - $DFS -mkdir ${WORK_DIR}/testdata + $DFS -mkdir -p ${WORK_DIR}/testdata $DFS -put ${WORK_DIR}/synthetic_control.data ${WORK_DIR}/testdata echo "Successfully Uploaded Synthetic control data to HDFS " - ../../bin/mahout org.apache.mahout.clustering.syntheticcontrol."${clustertype}".Job + options="--input ${WORK_DIR}/testdata --output ${WORK_DIR}/output --maxIter 10 --convergenceDelta 0.5" + + if [ "${clustertype}" == "kmeans" ]; then + options="${options} --numClusters 6" + # t1 & t2 not used if --numClusters specified, but parser requires input + options="${options} --t1 1 --t2 2" + ../../bin/mahout org.apache.mahout.clustering.syntheticcontrol."${clustertype}".Job ${options} + else + options="${options} --m 2.0f --t1 80 --t2 55" + ../../bin/mahout org.apache.mahout.clustering.syntheticcontrol."${clustertype}".Job ${options} + fi else echo " HADOOP is not running. Please make sure you hadoop is running. " fi
