public void train(int startingIndex, ModelManager modelInfo, List data) { Assert.a(allFeatureTypes.size() > 0, "No features types have been assigned."); Assert.a(startIndexes == null, "FeatureManager has already been trained."); startIx = startingIndex; // Train each of the individual FeatureManagers and calculate offsets startIndexes = new int[allFeatureTypes.size()]; totalFeatures = 0; for (int i = 0; i < startIndexes.length; ++i) { startIndexes[i] = totalFeatures + startIx; FeatureManager fm = allFeatureTypes.get(i); List compData = fm.getInputComponent() == null ? data : new ComponentList(data, fm.getInputComponent()); fm.train(totalFeatures, modelInfo, compData); totalFeatures += fm.getNumFeatures(); } }