Package

io.radanalytics.silex.feature.extractor

spark

Permalink

package spark

Provides 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)
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. spark
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed class SparkFS extends FeatureSeq

    Permalink

    Subclass of FeatureSeq for supporting Spark vector data

Value Members

  1. object implicits

    Permalink

    Implicit conversions from Spark vectors to FeatureSeq, and vice versa.

    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)

Inherited from AnyRef

Inherited from Any

Ungrouped