com.alpine.model.pack.ml

KMeansModel

case class KMeansModel(clusters: Seq[ClusterInfo], inputFeatures: Seq[ColumnDef], identifier: String = "") extends ClusteringRowModel with PFAConvertible with Product with Serializable

A model representing results of the K-Means clustering algorithm. Each cluster is a vector in a fixed dimensional space, and the transformer assigns the input row to its closest cluster using the Euclidean (L2) distance.

The clusters should all be of the same dimension, which should be equal to the number of input features.

clusters

The clusters of the model. These should have distinct names.

inputFeatures

A seq of numeric feature descriptions describing the input to the model. * @param identifier Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

Annotations
@SerialVersionUID( 1021343246594647667L )
Linear Supertypes
Product, Equals, PFAConvertible, ClusteringRowModel, CategoricalRowModel, RowModel, MLModel, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KMeansModel
  2. Product
  3. Equals
  4. PFAConvertible
  5. ClusteringRowModel
  6. CategoricalRowModel
  7. RowModel
  8. MLModel
  9. Serializable
  10. Serializable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KMeansModel(clusters: Seq[ClusterInfo], inputFeatures: Seq[ColumnDef], identifier: String = "")

    clusters

    The clusters of the model. These should have distinct names.

    inputFeatures

    A seq of numeric feature descriptions describing the input to the model. * @param identifier Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

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 classLabels: Seq[String]

    The total set of classes that the predicted value can take on.

    The total set of classes that the predicted value can take on.

    returns

    The set of possible values for the predicted value.

    Definition Classes
    KMeansModelCategoricalRowModel
  8. def classesForLoading: Set[Class[_]]

    This should return a representative class from every jar that is needed to load the object during deserialization.

    This should return a representative class from every jar that is needed to load the object during deserialization.

    Default implementation returns the class of MLModel, and the class of the model implementation.

    Definition Classes
    MLModel
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val clusters: Seq[ClusterInfo]

    The clusters of the model.

    The clusters of the model. These should have distinct names.

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  14. def getPFAConverter: PFAConverter

    Definition Classes
    KMeansModelPFAConvertible
  15. val identifier: String

    Used to identify this model when in a collection of models.

    Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

    returns

    identifier for the model.

    Definition Classes
    KMeansModelRowModel
  16. val inputFeatures: Seq[ColumnDef]

    A seq of numeric feature descriptions describing the input to the model.

    A seq of numeric feature descriptions describing the input to the model. * @param identifier Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

    Definition Classes
    KMeansModelRowModel
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  21. def outputFeatures: Seq[ColumnDef]

    Definition Classes
    ClusteringRowModelRowModel
  22. def sqlOutputFeatures: Seq[ColumnDef]

    Definition Classes
    CategoricalRowModelRowModel
  23. def sqlTransformer(sqlGenerator: SQLGenerator): Some[KMeansSQLTransformer]

    Definition Classes
    KMeansModelClusteringRowModelRowModel
  24. def streamline(requiredOutputFeatureNames: Seq[String]): ClusteringRowModel

    Returns a streamlined version of this model, throwing away parts which are not required to produce the features with names in requiredOutputFeatureNames.

    Returns a streamlined version of this model, throwing away parts which are not required to produce the features with names in requiredOutputFeatureNames.

    Behaviour is undefined if requiredOutputFeatureNames is not actually a subset of outputFeatures.map(_columnName).

    The resulting model may still have more output features than those required (i.e. for ClassificationRowModel implementations which always have the same output features, or for OneHotEncodingModel whose output features naturally group together).

    requiredOutputFeatureNames

    names of the output features that the new model should produce.

    returns

    A model which has the same functionality for those output features listed, but potentially fewer input features.

    Definition Classes
    ClusteringRowModelRowModel
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def transformationSchema: DetailedTransformationSchema

    Definition Classes
    RowModel
  27. def transformer: KMeansTransformer

  28. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from PFAConvertible

Inherited from ClusteringRowModel

Inherited from CategoricalRowModel

Inherited from RowModel

Inherited from MLModel

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped