Modified ClusTreeTestApp sample
@App:name("ClusTreeTestApp")
+/*
+Purpose:
+ This sample demonstrates how to perform unsupervised streaming learning on a set of data points using a Clustree model.
+
+Prerequisites:
+
+ 1. Copy the siddhi-gpl-execution-streamingml jar from the below link into {WSO2SPHome}/lib.
+ Build the jar using following link
+ https://github.com/wso2-extensions/siddhi-gpl-execution-streamingml
+
+ 2. Copy {WSO2SPHome}/samples/artifacts/0047/clusTreeTestFeed.json to {WSO2SPHome}/wso2/editor/deployment/simulation-configs
+
+ 3. Copy {WSO2SPHome}/samples/artifacts/0047/clusTreeFileTest.csv to {WSO2SPHome}/wso2/editor/deployment/csv-files
+
+ 4. Save this sample. If there is no syntax error, the following messages would be shown on the console
+ * - Siddhi App ClusTreeTestApp.siddhi successfully deployed.
+
+Executing the Sample:
+ 1) Start the Siddhi application by clicking on 'Run'
+ 2) If the Siddhi application starts successfully, the following messages would be shown on the console
+ * ClusTreeTestApp.siddhi - Started Successfully!
+
+Testing the Sample:
+ You can publish data event to the file, through event simulator
+ a) Open event simulator by clicking on the second icon or press Ctrl+Shift+I.
+ b) In the Feed Simulation tab of the panel you can see that the clustTreeTestFeed.csv file is loaded.
+ c) Press the play button to start simulation.
+
+Viewing the Results:
+ Viewing the Results:
+ After clicking the play button see the output on the console, that are produced according to the simulation from csv file.
+
+ Note:
+ Stop this Siddhi application, once you are done with the execution
+*/
+
define stream InputStream (x double, y double);
+@sink(type='log')
+define stream logStream (closestCentroidCoordinate1 double,closestCentroidCoordinate2 double,x double, y double);
+
@info(name = 'query1')
from InputStream#streamingml:clusTree(2, 10, 20, 5, 50, x, y)
select closestCentroidCoordinate1, closestCentroidCoordinate2, x, y
-insert into OutputStream;
-
-from OutputStream#log("LOGGER")
-select *
-insert into temp2;
\ No newline at end of file
+insert into logStream;
\ No newline at end of file
