### Question:
KMeansUtils { public static double[] featuresFromTokens(String[] data, InputSchema inputSchema) { double[] features = new double[inputSchema.getNumPredictors()]; for (int featureIndex = 0; featureIndex < data.length; featureIndex++) { if (inputSchema.isActive(featureIndex)) { features[inputSchema.featureToPredictorIndex(featureIndex)] = Double.parseDouble(data[featureIndex]); } } return features; } private  KMeansUtils(); static Pair<ClusterInfo,Double> closestCluster(List<ClusterInfo> clusters,
                                                        DistanceFn<double[]> distanceFn,
                                                        double[] vector); static double[] featuresFromTokens(String[] data, InputSchema inputSchema); static void checkUniqueIDs(Collection<ClusterInfo> clusters);  }### Answer:
@Test public void testFeaturesFromTokens() { Map<String,Object> overlayConfig = new HashMap<>(); overlayConfig.put("oryx.input-schema.num-features", 4); overlayConfig.put("oryx.input-schema.categorical-features", "[]"); overlayConfig.put("oryx.input-schema.ignored-features", "[0,2]"); Config config = ConfigUtils.overlayOn(overlayConfig, ConfigUtils.getDefault()); InputSchema inputSchema = new InputSchema(config); double[] features = KMeansUtils.featuresFromTokens(new String[] { "1.0", "2.0", "0.0", "-3.5" }, inputSchema); assertArrayEquals(new double[] { 2.0, -3.5 }, features); }