final DataSet ds = DataSet.load(istream);
// The following ranges are setup for the Iris data set. If you wish to normalize other files you will
// need to modify the below function calls other files.
ds.normalizeRange(0, 0, 1);
ds.normalizeRange(1, 0, 1);
ds.normalizeRange(2, 0, 1);
ds.normalizeRange(3, 0, 1);
final Map<String, Integer> species = ds.encodeOneOfN(4);
istream.close();
final List<BasicData> trainingData = ds.extractSupervised(0, 4, 4, 3);