Package

io.radanalytics.silex.feature

extractor

Permalink

package extractor

Provides a feature extraction type system that supports concatenation of feature extraction functions in a logically constant and type safe manner. Extraction functions are represented by instances of Extractor.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. extractor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed class ConcatFS extends FeatureSeq

    Permalink

    Subclass of FeatureSeq representing the concatenation of two feature sequences.

    Subclass of FeatureSeq representing the concatenation of two feature sequences. The type returned by ++ operator

  2. case class Extractor[D](width: Int, function: (D) ⇒ FeatureSeq, names: InvertibleIndexFunction[String], categoryInfo: IndexFunction[Int]) extends Function[D, FeatureSeq] with Serializable with Product

    Permalink

    A Scala Function from a domain type D, to a FeatureSeq, extended with a monoidal concatenation operator Extractor!.++.

    A Scala Function from a domain type D, to a FeatureSeq, extended with a monoidal concatenation operator Extractor!.++.

    D

    The domain type of the function. This is the type of object features are to be extracted from.

    width

    The logical width, aka dimension, of the output feature space

    function

    The function that maps values of domain type D to a feature sequence

    names

    A function from feature indices to number of feature category values. By default, names is undefined over the feature space. The function may define names for none, some, or all of the feature indices.

    categoryInfo

    A mapping from feature indices to numbers of categorical values. By default, undefined over space of features. The function may define category info for none, some, or all of the feature indices.

  3. abstract class FeatureSeq extends Seq[Double] with Serializable

    Permalink

    An immutable sequence of Double values representing feature vectors extracted by an Extractor.

    An immutable sequence of Double values representing feature vectors extracted by an Extractor. FeatureSeq is a monoid with respect to the concatenation operator FeatureSeq!.++.

  4. sealed class SeqFS extends FeatureSeq

    Permalink

    Subclass of FeatureSeq representing a single Scala Seq object.

Value Members

  1. object Extractor extends Serializable

    Permalink

    Factory methods for creating various flavors of feature Extractor.

  2. object FeatureSeq extends Serializable

    Permalink

    Provides factory methods for FeatureSeq instances.

  3. package breeze

    Permalink

    Provides conversions from Breeze vectors to FeatureSeq, and vice versa.

    Provides conversions from Breeze vectors to FeatureSeq, and vice versa.

    import io.radanalytics.silex.feature.extractor.{ FeatureSeq, Extractor }
    import io.radanalytics.silex.feature.extractor.breeze
    import io.radanalytics.silex.feature.extractor.breeze.implicits._
    import _root_.breeze.linalg.DenseVector
    
    val bv = new DenseVector(Array(1.0, 2.0))
    val featureSeq = FeatureSeq(bv)
    val bv2 = featureSeq.toBreeze
  4. package spark

    Permalink

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

    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)

Inherited from AnyRef

Inherited from Any

Ungrouped