keystoneml.nodes.util

CommonSparseFeatures

case class CommonSparseFeatures[T](numFeatures: Int)(implicit evidence$1: ClassTag[T]) extends Estimator[Seq[(T, Double)], SparseVector[Double]] with Product with Serializable

An Estimator that chooses the most frequently observed sparse features when training, and produces a transformer which builds a sparse vector out of them

Deterministically orders the feature mappings first by decreasing number of appearances, then by earliest appearance in the RDD

numFeatures

The number of features to keep

Linear Supertypes
Product, Equals, Estimator[Seq[(T, Double)], SparseVector[Double]], EstimatorOperator, Serializable, Serializable, Operator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CommonSparseFeatures
  2. Product
  3. Equals
  4. Estimator
  5. EstimatorOperator
  6. Serializable
  7. Serializable
  8. Operator
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CommonSparseFeatures(numFeatures: Int)(implicit arg0: ClassTag[T])

    numFeatures

    The number of features to keep

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 execute(deps: Seq[Expression]): TransformerExpression

    Definition Classes
    EstimatorOperator → Operator
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def fit(data: RDD[Seq[(T, Double)]]): SparseFeatureVectorizer[T]

    The type-safe method that ML developers need to implement when writing new Estimators.

    The type-safe method that ML developers need to implement when writing new Estimators.

    data

    The estimator's training data.

    returns

    A new transformer

    Definition Classes
    CommonSparseFeaturesEstimator
  12. final def getClass(): Class[_]

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

    Definition Classes
    Any
  14. def label: String

    Definition Classes
    Operator
  15. def merge(a: Seq[(T, (Int, Long))], b: Seq[(T, (Int, Long))]): Seq[(T, (Int, Long))]

    This method merges two seqs and keeps the top numFeatures

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

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

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

    Definition Classes
    AnyRef
  19. val numFeatures: Int

    The number of features to keep

  20. val ordering: Ordering[(T, (Int, Long))]

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

    Definition Classes
    AnyRef
  22. def takeOrdered[T](input: Iterator[T], num: Int)(implicit ord: Ordering[T]): Seq[T]

    Returns the first K elements from the input as defined by the specified implicit Ordering[T] and maintains the ordering.

  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def withData(data: PipelineDataset[Seq[(T, Double)]]): Pipeline[Seq[(T, Double)], SparseVector[Double]]

    Constructs a pipeline that fits this estimator to training data, then applies the resultant transformer to the Pipeline input.

    Constructs a pipeline that fits this estimator to training data, then applies the resultant transformer to the Pipeline input.

    data

    The training data

    returns

    A pipeline that fits this estimator and applies the result to inputs.

    Definition Classes
    Estimator
  27. final def withData(data: RDD[Seq[(T, Double)]]): Pipeline[Seq[(T, Double)], SparseVector[Double]]

    Constructs a pipeline that fits this estimator to training data, then applies the resultant transformer to the Pipeline input.

    Constructs a pipeline that fits this estimator to training data, then applies the resultant transformer to the Pipeline input.

    data

    The training data

    returns

    A pipeline that fits this estimator and applies the result to inputs.

    Definition Classes
    Estimator

Inherited from Product

Inherited from Equals

Inherited from Estimator[Seq[(T, Double)], SparseVector[Double]]

Inherited from EstimatorOperator

Inherited from Serializable

Inherited from Serializable

Inherited from Operator

Inherited from AnyRef

Inherited from Any

Ungrouped