The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
ExampleSet exampleSet = null; // load your data here Operator kMeans = OperatorService.createOperator(KMeans.class); CentroidBasedClusterModel clusterModel = (CentroidBasedClusterModel) kMeans.apply(new IOContainer(exampleSet)); for (int i = 0; i < clusterModel.getNumberOfClusters(); i++) { double[] location = clusterModel.getCentroid(i); // do whatever you want with the centroid }