com.redhat.et.silex.feature.extractor

Extractor

case class Extractor[D](width: Int, function: (D) ⇒ FeatureSeq, names: InvertibleIndexFunction[String], categoryInfo: IndexFunction[Int]) extends (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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    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.

  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. def andThen[A](g: (FeatureSeq) ⇒ A): (D) ⇒ A

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

    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

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

    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
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val categoryInfo: IndexFunction[Int]

    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.

  12. def clone(): AnyRef

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

    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
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def finalize(): Unit

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

    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

  17. val function: (D) ⇒ FeatureSeq

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

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

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

    Definition Classes
    Any
  20. val names: InvertibleIndexFunction[String]

    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.

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

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

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

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

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

    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.

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

    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.

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

    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.

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

    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