use of com.alibaba.alink.pipeline.classification.C45 in project Alink by alibaba.
the class RandomForestTrainBatchOpTest method testC45Pipeline.
@Test
public void testC45Pipeline() throws Exception {
C45 c45 = new C45().setFeatureCols(featureColNames).setCategoricalCols(categoricalColNames).setLabelCol(labelColName).setPredictionCol("c45_test_result").setPredictionDetailCol("c45_test_detail");
Pipeline pipeline = new Pipeline().add(c45);
BatchOperator<?> output = pipeline.fit(input).transform(input);
output.lazyPrint(-1);
BatchOperator<?> output1 = BatchOperator.fromTable(output.getOutputTable());
output1.lazyPrint(-1);
AlgoOperator<?> outputStream = pipeline.fit(input).transform(inputStream);
outputStream.print();
MLEnvironmentFactory.getDefault().getStreamExecutionEnvironment().execute();
}