use of org.apache.spark.ml.feature.VectorAssembler in project jpmml-sparkml by jpmml.
the class VectorAssemblerConverter method encodeFeatures.
@Override
public List<Feature> encodeFeatures(SparkMLEncoder encoder) {
VectorAssembler transformer = getTransformer();
List<Feature> result = new ArrayList<>();
String[] inputCols = transformer.getInputCols();
for (String inputCol : inputCols) {
List<Feature> features = encoder.getFeatures(inputCol);
result.addAll(features);
}
return result;
}
Aggregations