io.radanalytics.silex.feature.extractor.spark
Implicit conversions from Spark vectors to FeatureSeq, and vice versa.
import io.radanalytics.silex.feature.extractor.{ FeatureSeq, Extractor } import io.radanalytics.silex.feature.extractor.spark import io.radanalytics.silex.feature.extractor.spark.implicits._ import org.apache.spark.mllib.linalg.DenseVector import org.apache.spark.mllib.regression.LabeledPoint val sv = new DenseVector(Array(1.0, 2.0)) val featureSeq = FeatureSeq(sv) val sv2 = featureSeq.toSpark val label = 1.0 val lp = new LabeledPoint(label, sv) val fs2 = FeatureSeq(lp) val lp2 = fs2.toLabeledPoint(label)
Provides toSpark and toLabeledPoint enriched methods on FeatureSeq
Convert Spark LabeledPoint objects to FeatureSeq
Convert Spark vectors to FeatureSeq
Implicit conversions from Spark vectors to FeatureSeq, and vice versa.