Class/Object

io.radanalytics.silex.feature.extractor

Extractor

Related Docs: object Extractor | package extractor

Permalink

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

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.

Linear Supertypes
Product, Equals, Serializable, Serializable, (D) ⇒ FeatureSeq, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Extractor
  2. Product
  3. Equals
  4. Serializable
  5. Serializable
  6. Function1
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Extractor(width: Int, function: (D) ⇒ FeatureSeq, names: InvertibleIndexFunction[String], categoryInfo: IndexFunction[Int])

    Permalink

    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.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ++(that: Extractor[D]): Extractor[D]

    Permalink

    Concatenate two extractors.

    Concatenate two extractors.

    A concatenation of extractors, e1 ++ e2, is defined as follows:

    (e1 ++ e2)(d) = e1(d) ++ e2(d)

    Associated feature names and category info are concatenated similarly.

    that

    The right hand side of the concatenation.

    returns

    The concatenation of left and right extractors.

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def andThen[A](g: (FeatureSeq) ⇒ A): (D) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  6. final def andThenExtractor(g: Extractor[FeatureSeq]): Extractor[D]

    Permalink

    Apply another extractor to the output of this one

    Apply another extractor to the output of this one

    f.andThenExtractor(g) = g.compose(f), in other words: (f.andThenExtractor(g))(x) => g(f(x))

    g

    An Extractor whose domain is the output of this extractor

    returns

    A new extractor equivalent to applying 'g' to the output of this extractor

  7. final def apply(d: D): FeatureSeq

    Permalink

    Evaluate the extractor on an input argument.

    Evaluate the extractor on an input argument.

    Note: extractor(d) is equivalent to extractor.function(d)

    d

    The input argument

    returns

    The feature sequence resulting from applying the extractor function

    Definition Classes
    Extractor → Function1
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. val categoryInfo: IndexFunction[Int]

    Permalink

    A mapping from feature indices to numbers of categorical values.

    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.

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def compose[G](g: (G) ⇒ D): Extractor[G]

    Permalink

    Compose an extractor with another function.

    Compose an extractor with another function.

    An Extractor[D] composed with a function G => D results in a new Extractor[G]. May be used to "plug" an existing extractor into a new data type.

    g

    Some function G => D to compose with

    returns

    A new extractor with domain type G equivalent to applying g and then applying the original extractor.

    Definition Classes
    Extractor → Function1
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def fold(extr: Extractor[FeatureSeq], rest: Extractor[FeatureSeq]*): Extractor[D]

    Permalink

    Fold another extractor over this one

    Fold another extractor over this one

    A fold is defined as: f.fold(g) = f ++ g.compose(f), in other words: (f.fold(g))(x) => f(x) ++ g(f(x))

    When folding multiple arguments: (f.fold(g, h, ...))(x) => f(x) ++ g(f(x)) ++ h(f(x)) ...

    extr

    the extractor to fold

    rest

    additional extractors (if any) to fold

    returns

    A new extractor that obeys the folding definition above

  15. val function: (D) ⇒ FeatureSeq

    Permalink

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

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. val names: InvertibleIndexFunction[String]

    Permalink

    A function from feature indices to number of feature category values.

    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.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    Function1 → AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. val width: Int

    Permalink

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

  28. final def withCategoryInfo(pairs: (String, Int)*): Extractor[D]

    Permalink

    Obtain a new extractor with new categoryInfo mappings

    Obtain a new extractor with new categoryInfo mappings

    Creates a copy of the current extractor with a new categoryInfo function.

    pairs

    Zero or more pairs (name, num-categories). Feature names that are not defined in names are ignored.

    returns

    A new extractor that is a copy of the current, except for new categoryInfo function.

  29. final def withCategoryInfo(info: IndexFunction[Int]): Extractor[D]

    Permalink

    Obtain a new extractor with new categoryInfo mappings

    Obtain a new extractor with new categoryInfo mappings

    Creates a copy of the current extractor with a new categoryInfo function.

    info

    The new categoryInfo function to use

    returns

    A new extractor that is a copy of the current, except for new categoryInfo function.

  30. final def withNames(fnames: String*): Extractor[D]

    Permalink

    Obtain a new extractor with new feature names mappings

    Obtain a new extractor with new feature names mappings

    Creates a copy of the current extractor with a new names function.

    fnames

    List of names. Must be same length as extractor width.

    returns

    A new extractor that is a copy of the current, except for new feature names.

  31. final def withNames(nf: InvertibleIndexFunction[String]): Extractor[D]

    Permalink

    Obtain a new extractor with new feature names mappings

    Obtain a new extractor with new feature names mappings

    Creates a copy of the current extractor with a new names function.

    nf

    The new names function to use

    returns

    A new extractor that is a copy of the current, except for new names function.

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from Serializable

Inherited from (D) ⇒ FeatureSeq

Inherited from AnyRef

Inherited from Any

Ungrouped