Search in sources :

Example 1 with VectorUDT

use of org.apache.spark.mllib.linalg.VectorUDT in project net.jgp.labs.spark by jgperrin.

the class FirstPrediction method start.

private void start() {
    SparkSession spark = SparkSession.builder().appName("First Prediction").master("local").getOrCreate();
    StructType schema = new StructType(new StructField[] { new StructField("label", DataTypes.DoubleType, false, Metadata.empty()), new StructField("features", new VectorUDT(), false, Metadata.empty()) });
// TODO this example is not working yet
}
Also used : VectorUDT(org.apache.spark.mllib.linalg.VectorUDT) SparkSession(org.apache.spark.sql.SparkSession) StructField(org.apache.spark.sql.types.StructField) StructType(org.apache.spark.sql.types.StructType)

Aggregations

VectorUDT (org.apache.spark.mllib.linalg.VectorUDT)1 SparkSession (org.apache.spark.sql.SparkSession)1 StructField (org.apache.spark.sql.types.StructField)1 StructType (org.apache.spark.sql.types.StructType)1