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

    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.

    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" )
    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

    Model fitted by BisectingKMeans.

    Model fitted by BisectingKMeans.

    Annotations
    @Since( "2.0.0" )
  3. class BisectingKMeansSummary extends ClusteringSummary

    Permalink

    :: Experimental :: Summary of BisectingKMeans.

    :: Experimental :: Summary of BisectingKMeans.

    Annotations
    @Since( "2.1.0" ) @Experimental()
  4. class ClusteringSummary extends Serializable

    Permalink

    :: Experimental :: Summary of clustering algorithms.

    :: Experimental :: Summary of clustering algorithms.

    Annotations
    @Experimental()
  5. class DistributedLDAModel extends LDAModel

    Permalink

    Distributed model fitted by LDA.

    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" )
  6. class GaussianMixture extends Estimator[GaussianMixtureModel] with GaussianMixtureParams with DefaultParamsWritable

    Permalink

    Gaussian Mixture clustering.

    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.

    Annotations
    @Since( "2.0.0" )
    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.

  7. class GaussianMixtureModel extends Model[GaussianMixtureModel] with GaussianMixtureParams with MLWritable

    Permalink

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

    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" )
  8. class GaussianMixtureSummary extends ClusteringSummary

    Permalink

    :: Experimental :: Summary of GaussianMixture.

    :: Experimental :: Summary of GaussianMixture.

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

    Permalink

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

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

    Annotations
    @Since( "1.5.0" )
    See also

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

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

    Permalink

    Model fitted by KMeans.

    Model fitted by KMeans.

    Annotations
    @Since( "1.5.0" )
  11. class KMeansSummary extends ClusteringSummary

    Permalink

    :: Experimental :: Summary of KMeans.

    :: Experimental :: Summary of KMeans.

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

    Permalink

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

    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" )
    See also

    Latent Dirichlet allocation (Wikipedia)

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

    Permalink

    Model fitted by LDA.

    Model fitted by LDA.

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

    Permalink

    Local (non-distributed) model fitted by LDA.

    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" )

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