Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
1. set initmode to Random (Intel-bigdata#655)
Browse files Browse the repository at this point in the history
2. add initmode as an adjustable parameter to kmeans.conf and run.sh

Signed-off-by: minmingz <[email protected]>
  • Loading branch information
minmingzhu authored Dec 9, 2020
1 parent f55862a commit 5b240b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/functions/hibench_prop_env_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
MAX_ITERATION="hibench.kmeans.max_iteration",
K="hibench.kmeans.k",
K_STORAGE_LEVEL="hibench.kmeans.storage.level",
K_INIT_MODE="hibench.kmeans.initializationmode",
# For gmm
INPUT_SAMPLE_GMM="hibench.gmm.input.sample",
INPUT_CLUSTER_GMM="hibench.gmm.input.cluster",
Expand Down
2 changes: 1 addition & 1 deletion bin/workloads/ml/kmeans/spark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rmr_hdfs $OUTPUT_HDFS || true
SIZE=`dir_size $INPUT_HDFS`
START_TIME=`timestamp`

run_spark_job com.intel.hibench.sparkbench.ml.DenseKMeans -k $K --numIterations $MAX_ITERATION --storageLevel $K_STORAGE_LEVEL $INPUT_HDFS/samples
run_spark_job com.intel.hibench.sparkbench.ml.DenseKMeans -k $K --numIterations $MAX_ITERATION --storageLevel $K_STORAGE_LEVEL --initMode $K_INIT_MODE $INPUT_HDFS/samples
END_TIME=`timestamp`

gen_report ${START_TIME} ${END_TIME} ${SIZE}
Expand Down
1 change: 1 addition & 0 deletions conf/workloads/ml/kmeans.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ hibench.workload.input ${hibench.hdfs.data.dir}/Kmeans/Input
hibench.workload.output ${hibench.hdfs.data.dir}/Kmeans/Output

hibench.kmeans.storage.level MEMORY_ONLY
hibench.kmeans.initializationmode Random
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object DenseKMeans {
k: Int = -1,
numIterations: Int = 10,
storageLevel: String= "MEMORY_ONLY",
initializationMode: InitializationMode = Parallel)
initializationMode: InitializationMode = Random)

def main(args: Array[String]) {
val defaultParams = Params()
Expand Down

0 comments on commit 5b240b4

Please sign in to comment.