Class

io.radanalytics.silex.feature.onehot

OneHotModel

Related Doc: package onehot

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    histogram

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. 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]]

    Permalink

    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.

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

    Permalink

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

  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. 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]]

    Permalink

    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.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. 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]

    Permalink

    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.

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

    Permalink
    Definition Classes
    AnyRef
  18. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped