Package

org.apache.spark.ml

clustering

Permalink

package clustering

Visibility
  1. Public
  2. All

Type Members

  1. class BisectingKMeans extends Estimator[BisectingKMeansModel] with BisectingKMeansParams with DefaultParamsWritable

    Permalink

    :: Experimental ::

    :: Experimental ::

    A bisecting k-means algorithm based on the paper "A comparison of document clustering techniques" by Steinbach, Karypis, and Kumar, with modification to fit Spark. The algorithm starts from a single cluster that contains all points. Iteratively it finds divisible clusters on the bottom level and bisects each of them using k-means, until there are k leaf clusters in total or no leaf clusters are divisible. The bisecting steps of clusters on the same level are grouped together to increase parallelism. If bisecting all divisible clusters on the bottom level would result more than k leaf clusters, larger clusters get higher priority.

    Annotations
    @Since( "2.0.0" ) @Experimental()
    See also

    Steinbach, Karypis, and Kumar, A comparison of document clustering techniques, KDD Workshop on Text Mining, 2000.

  2. class BisectingKMeansModel extends Model[BisectingKMeansModel] with BisectingKMeansParams with MLWritable

    Permalink

    :: Experimental :: Model fitted by BisectingKMeans.

    :: Experimental :: Model fitted by BisectingKMeans.

    Annotations
    @Since( "2.0.0" ) @Experimental()
  3. class DistributedLDAModel extends LDAModel

    Permalink

    :: Experimental ::

    :: Experimental ::

    Distributed model fitted by LDA. This type of model is currently only produced by Expectation-Maximization (EM).

    This model stores the inferred topics, the full training dataset, and the topic distribution for each training document.

    Annotations
    @Since( "1.6.0" ) @Experimental()
  4. class GaussianMixture extends Estimator[GaussianMixtureModel] with GaussianMixtureParams with DefaultParamsWritable

    Permalink

    :: Experimental :: Gaussian Mixture clustering.

    :: Experimental :: Gaussian Mixture clustering.

    This class performs expectation maximization for multivariate Gaussian Mixture Models (GMMs). A GMM represents a composite distribution of independent Gaussian distributions with associated "mixing" weights specifying each's contribution to the composite.

    Given a set of sample points, this class will maximize the log-likelihood for a mixture of k Gaussians, iterating until the log-likelihood changes by less than convergenceTol, or until it has reached the max number of iterations. While this process is generally guaranteed to converge, it is not guaranteed to find a global optimum.

    Note: For high-dimensional data (with many features), this algorithm may perform poorly. This is due to high-dimensional data (a) making it difficult to cluster at all (based on statistical/theoretical arguments) and (b) numerical issues with Gaussian distributions.

    Annotations
    @Since( "2.0.0" ) @Experimental()
  5. class GaussianMixtureModel extends Model[GaussianMixtureModel] with GaussianMixtureParams with MLWritable

    Permalink

    :: Experimental ::

    :: Experimental ::

    Multivariate Gaussian Mixture Model (GMM) consisting of k Gaussians, where points are drawn from each Gaussian i with probability weights(i).

    Annotations
    @Since( "2.0.0" ) @Experimental()
  6. class GaussianMixtureSummary extends Serializable

    Permalink

    :: Experimental :: Summary of GaussianMixture.

    :: Experimental :: Summary of GaussianMixture.

    Annotations
    @Since( "2.0.0" ) @Experimental()
  7. class KMeans extends Estimator[KMeansModel] with KMeansParams with DefaultParamsWritable

    Permalink

    :: Experimental :: K-means clustering with support for k-means|| initialization proposed by Bahmani et al.

    :: Experimental :: K-means clustering with support for k-means|| initialization proposed by Bahmani et al.

    Annotations
    @Since( "1.5.0" ) @Experimental()
    See also

    Bahmani et al., Scalable k-means++.

  8. class KMeansModel extends Model[KMeansModel] with KMeansParams with MLWritable

    Permalink

    :: Experimental :: Model fitted by KMeans.

    :: Experimental :: Model fitted by KMeans.

    Annotations
    @Since( "1.5.0" ) @Experimental()
  9. class KMeansSummary extends Serializable

    Permalink

    :: Experimental :: Summary of KMeans.

    :: Experimental :: Summary of KMeans.

    Annotations
    @Since( "2.0.0" ) @Experimental()
  10. class LDA extends Estimator[LDAModel] with LDAParams with DefaultParamsWritable

    Permalink

    :: Experimental ::

    :: Experimental ::

    Latent Dirichlet Allocation (LDA), a topic model designed for text documents.

    Terminology:

    • "term" = "word": an element of the vocabulary
    • "token": instance of a term appearing in a document
    • "topic": multinomial distribution over terms representing some concept
    • "document": one piece of text, corresponding to one row in the input data

    Original LDA paper (journal version): Blei, Ng, and Jordan. "Latent Dirichlet Allocation." JMLR, 2003.

    Input data (featuresCol): LDA is given a collection of documents as input data, via the featuresCol parameter. Each document is specified as a Vector of length vocabSize, where each entry is the count for the corresponding term (word) in the document. Feature transformers such as org.apache.spark.ml.feature.Tokenizer and org.apache.spark.ml.feature.CountVectorizer can be useful for converting text to word count vectors.

    Annotations
    @Since( "1.6.0" ) @Experimental()
    See also

    Latent Dirichlet allocation (Wikipedia)

  11. sealed abstract class LDAModel extends Model[LDAModel] with LDAParams with Logging with MLWritable

    Permalink

    :: Experimental :: Model fitted by LDA.

    :: Experimental :: Model fitted by LDA.

    Annotations
    @Since( "1.6.0" ) @Experimental()
  12. class LocalLDAModel extends LDAModel

    Permalink

    :: Experimental ::

    :: Experimental ::

    Local (non-distributed) model fitted by LDA.

    This model stores the inferred topics only; it does not store info about the training dataset.

    Annotations
    @Since( "1.6.0" ) @Experimental()

Value Members

  1. object BisectingKMeans extends DefaultParamsReadable[BisectingKMeans] with Serializable

    Permalink
    Annotations
    @Since( "2.0.0" )
  2. object BisectingKMeansModel extends MLReadable[BisectingKMeansModel] with Serializable

    Permalink
  3. object DistributedLDAModel extends MLReadable[DistributedLDAModel] with Serializable

    Permalink
    Annotations
    @Since( "1.6.0" )
  4. object GaussianMixture extends DefaultParamsReadable[GaussianMixture] with Serializable

    Permalink
    Annotations
    @Since( "2.0.0" )
  5. object GaussianMixtureModel extends MLReadable[GaussianMixtureModel] with Serializable

    Permalink
    Annotations
    @Since( "2.0.0" )
  6. object KMeans extends DefaultParamsReadable[KMeans] with Serializable

    Permalink
    Annotations
    @Since( "1.6.0" )
  7. object KMeansModel extends MLReadable[KMeansModel] with Serializable

    Permalink
    Annotations
    @Since( "1.6.0" )
  8. object LDA extends MLReadable[LDA] with Serializable

    Permalink
    Annotations
    @Since( "2.0.0" )
  9. object LocalLDAModel extends MLReadable[LocalLDAModel] with Serializable

    Permalink
    Annotations
    @Since( "1.6.0" )

Members