public Pair<List<Double>, List<Double>> numerize(Example e) { List<Double> input = new List<Double>(); List<Double> desiredOutput = new List<Double>(); double sepal_length = e.getAttributeValueAsDouble("sepal_length"); double sepal_width = e.getAttributeValueAsDouble("sepal_width"); double petal_length = e.getAttributeValueAsDouble("petal_length"); double petal_width = e.getAttributeValueAsDouble("petal_width"); input.Add(sepal_length); input.Add(sepal_width); input.Add(petal_length); input.Add(petal_width); String plant_category_string = e .getAttributeValueAsString("plant_category"); desiredOutput = convertCategoryToListOfDoubles(plant_category_string); Pair<List<Double>, List<Double>> io = new Pair<List<Double>, List<Double>>( input, desiredOutput); return io; }