com.redhat.et.silex.feature.onehot

OneHotModel

case class OneHotModel[V](histogram: Seq[(V, Double)]) extends Product with Serializable

A model for generating Extractor objects from a histogram of values

V

The value type of elements in histogram

histogram

A histogram of (value, frequency) elements, assumed to be sorted in descending order of frequency.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OneHotModel
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OneHotModel(histogram: Seq[(V, Double)])

    histogram

    A histogram of (value, frequency) elements, assumed to be sorted in descending order of frequency.

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  11. def histExtractor(namePrefix: String = "v=", undefName: OptionalArg[String] = None, minFreq: OptionalArg[Int] = None, maxFreq: OptionalArg[Int] = None, minProb: OptionalArg[Double] = None, maxProb: OptionalArg[Double] = None, maxSize: OptionalArg[Int] = None): Extractor[TraversableOnce[V]]

    Generate a histogram extractor that maps a sequence of type V to a vector where the position corresponding to each value present in the sequence is the frequency of that value in the sequence.

    Generate a histogram extractor that maps a sequence of type V to a vector where the position corresponding to each value present in the sequence is the frequency of that value in the sequence.

    namePrefix

    a string prepended to feature names. The name of feature corresponding to value v is namePrefix + v.toString.

    undefName

    a "virtual" value corresponding to any value that is not in the histogram. If not set, then undefined values result in an all-zero output vector.

    minFreq

    If set, then histogram values with frequency < minFreq will not be defined in the extractor mapping.

    maxFreq

    If set, then histogram values with frequency > maxFreq will not be defined in the extractor mapping.

    minProb

    If set, then histogram values with probability < minProb will not be defined in the extractor mapping.

    maxProb

    If set, then histogram values with probability > maxProb will not be defined in the extractor mapping.

    maxSize

    If set, then the subsequence of histogram values that pass any of the above filters is clipped to maxSize elements, and the remaining elements are the ones defined in the extractor mapping.

    returns

    An extractor that implements a histogram of the values in an input sequence.

    Note

    the histogram filters above are applied in the following order: minFreq, maxFreq, minProb, maxProb, maxSize.

  12. val histogram: Seq[(V, Double)]

    A histogram of (value, frequency) elements, assumed to be sorted in descending order of frequency.

  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. def multiHotExtractor(namePrefix: String = "v=", undefName: OptionalArg[String] = None, minFreq: OptionalArg[Int] = None, maxFreq: OptionalArg[Int] = None, minProb: OptionalArg[Double] = None, maxProb: OptionalArg[Double] = None, maxSize: OptionalArg[Int] = None): Extractor[TraversableOnce[V]]

    Generate a "multi-hot" extractor that maps a sequence of type V to a vector where the position corresponding to each value present in the sequence is 1, and all others elements are 0.

    Generate a "multi-hot" extractor that maps a sequence of type V to a vector where the position corresponding to each value present in the sequence is 1, and all others elements are 0.

    namePrefix

    a string prepended to feature names. The name of feature corresponding to value v is namePrefix + v.toString.

    undefName

    a "virtual" value corresponding to any value that is not in the histogram. If not set, then undefined values result in an all-zero output vector.

    minFreq

    If set, then histogram values with frequency < minFreq will not be defined in the extractor mapping.

    maxFreq

    If set, then histogram values with frequency > maxFreq will not be defined in the extractor mapping.

    minProb

    If set, then histogram values with probability < minProb will not be defined in the extractor mapping.

    maxProb

    If set, then histogram values with probability > maxProb will not be defined in the extractor mapping.

    maxSize

    If set, then the subsequence of histogram values that pass any of the above filters is clipped to maxSize elements, and the remaining elements are the ones defined in the extractor mapping.

    returns

    An extractor that implements a multi-hot encoding of values in an input sequence.

    Note

    the histogram filters above are applied in the following order: minFreq, maxFreq, minProb, maxProb, maxSize.

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

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

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

    Definition Classes
    AnyRef
  18. def oneHotExtractor(namePrefix: String = "v=", undefName: OptionalArg[String] = None, minFreq: OptionalArg[Int] = None, maxFreq: OptionalArg[Int] = None, minProb: OptionalArg[Double] = None, maxProb: OptionalArg[Double] = None, maxSize: OptionalArg[Int] = None): Extractor[V]

    Generate a "one-hot" extractor that maps a value of type V to a vector where the position corresponding to that value is 1, and all others elements are 0.

    Generate a "one-hot" extractor that maps a value of type V to a vector where the position corresponding to that value is 1, and all others elements are 0.

    namePrefix

    a string prepended to feature names. The name of feature corresponding to value v is namePrefix + v.toString.

    undefName

    a "virtual" value corresponding to any value that is not in the histogram. If not set, then undefined values result in an all-zero output vector.

    minFreq

    If set, then histogram values with frequency < minFreq will not be defined in the extractor mapping.

    maxFreq

    If set, then histogram values with frequency > maxFreq will not be defined in the extractor mapping.

    minProb

    If set, then histogram values with probability < minProb will not be defined in the extractor mapping.

    maxProb

    If set, then histogram values with probability > maxProb will not be defined in the extractor mapping.

    maxSize

    If set, then the subsequence of histogram values that pass any of the above filters is clipped to maxSize elements, and the remaining elements are the ones defined in the extractor mapping.

    returns

    An extractor that implements a one-hot encoding of input values.

    Note

    the histogram filters above are applied in the following order: minFreq, maxFreq, minProb, maxProb, maxSize.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped