param.setWeighted(false);
param.setCategoricalGamaMultiplier(1.0);
Kmeans instance = MLBuilder.create(param, dbName, conf);
instance.fit(dataset);
instance.predict(dataset);
<BUG>instance.delete(); //delete immediately the result
}</BUG>
private List<Double> calculateTTRlist(List<String> rows) {
List<Double> TTRlist = new ArrayList<>();
for(String row : rows) {

param.setWeighted(false);
param.setCategoricalGamaMultiplier(1.0);
Kmeans instance = MLBuilder.create(param, dbName, conf);
instance.fit(dataset);
instance.predict(dataset);
instance.close();
}
private List<Double> calculateTTRlist(List<String> rows) {
List<Double> TTRlist = new ArrayList<>();
for(String row : rows) {
