// Training stream
TridentState kmeansState = toppology
// Emit tuples with a instance containing an integer as label and 3
// double features named (x0, x1 and x2)
.newStream("samples", new RandomFeaturesForClusteringSpout())
// Convert trident tuple to instance
.each(new Fields("label", "x0", "x1", "x2"), new InstanceCreator<Integer>(), new Fields("instance"))
// Update a 3 classes kmeans