Function train of StreamKM needs to be combined with the assign method, since data are lost between the calls. Function trainStreamKM updates the bucketManager with the incoming input, then runs kmeans.cluster and assigns the input to the nearest cluster's index. To call trainStreamKM "ClusteringTrainEvaluate" needs some changes as well.
Classes that are affected
StreamKM, ClusteringTrainEvaluate
Tests
Run with command:./spark.sh "ClusteringTrainEvaluate -c (StreamKM) -s (SocketTextStreamReader)" 1> result_iris_streamKM.txt 2> log_iris_streamKM.log
Summary of the changes
Function train of StreamKM needs to be combined with the assign method, since data are lost between the calls. Function trainStreamKM updates the bucketManager with the incoming input, then runs kmeans.cluster and assigns the input to the nearest cluster's index. To call trainStreamKM "ClusteringTrainEvaluate" needs some changes as well.
Classes that are affected
StreamKM, ClusteringTrainEvaluate
Tests
Run with command:
./spark.sh "ClusteringTrainEvaluate -c (StreamKM) -s (SocketTextStreamReader)" 1> result_iris_streamKM.txt 2> log_iris_streamKM.log