Spark ML Binarizer示例错误

时间:2017-11-17 09:30:13

标签: java apache-spark apache-spark-ml

import java.util.Arrays;
import java.util.List;

import org.apache.spark.ml.feature.Binarizer;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.RowFactory;
import org.apache.spark.sql.types.DataTypes;
import org.apache.spark.sql.types.Metadata;
import org.apache.spark.sql.types.StructField;
import org.apache.spark.sql.types.StructType;

List<Row> data = Arrays.asList(
  RowFactory.create(0, 0.1),
  RowFactory.create(1, 0.8),
  RowFactory.create(2, 0.2)
);

错误:  隐式转换的结果类型必须比AnyRef更具体        List data = Arrays.asList(RowFactory.create(0,0.1),RowFactory.create(1,0.8),RowFactory.create(2,0.2));

任何指针?

0 个答案:

没有答案