package clustering
- Alphabetic
- Public
- Protected
Type Members
- class BisectingKMeans extends Estimator[BisectingKMeansModel] with BisectingKMeansParams with DefaultParamsWritable
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 thank
leaf clusters, larger clusters get higher priority.- Annotations
- @Since("2.0.0")
- See also
- class BisectingKMeansModel extends Model[BisectingKMeansModel] with BisectingKMeansParams with MLWritable with HasTrainingSummary[BisectingKMeansSummary]
Model fitted by BisectingKMeans.
Model fitted by BisectingKMeans.
- Annotations
- @Since("2.0.0")
- class BisectingKMeansSummary extends ClusteringSummary
Summary of BisectingKMeans.
Summary of BisectingKMeans.
- Annotations
- @Since("2.1.0")
- class ClusteringSummary extends Serializable
Summary of clustering algorithms.
- class DistributedLDAModel extends LDAModel
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")
- class GaussianMixture extends Estimator[GaussianMixtureModel] with GaussianMixtureParams with DefaultParamsWritable
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
This algorithm is limited in its number of features since it requires storing a covariance matrix which has size quadratic in the number of features. Even when the number of features does not exceed this limit, this algorithm may perform poorly on high-dimensional data. 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.
- class GaussianMixtureModel extends Model[GaussianMixtureModel] with GaussianMixtureParams with MLWritable with HasTrainingSummary[GaussianMixtureSummary]
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")
- class GaussianMixtureSummary extends ClusteringSummary
Summary of GaussianMixture.
Summary of GaussianMixture.
- Annotations
- @Since("2.0.0")
- class KMeans extends Estimator[KMeansModel] with KMeansParams with DefaultParamsWritable
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
- class KMeansModel extends Model[KMeansModel] with KMeansParams with GeneralMLWritable with HasTrainingSummary[KMeansSummary]
Model fitted by KMeans.
Model fitted by KMeans.
- Annotations
- @Since("1.5.0")
- class KMeansSummary extends ClusteringSummary
Summary of KMeans.
Summary of KMeans.
- Annotations
- @Since("2.0.0")
- class LDA extends Estimator[LDAModel] with LDAParams with DefaultParamsWritable
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
- abstract class LDAModel extends Model[LDAModel] with LDAParams with Logging with MLWritable
Model fitted by LDA.
Model fitted by LDA.
- Annotations
- @Since("1.6.0")
- class LocalLDAModel extends LDAModel
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")
- class PowerIterationClustering extends PowerIterationClusteringParams with DefaultParamsWritable
Power Iteration Clustering (PIC), a scalable graph clustering algorithm developed by Lin and Cohen.
Power Iteration Clustering (PIC), a scalable graph clustering algorithm developed by Lin and Cohen. From the abstract: PIC finds a very low-dimensional embedding of a dataset using truncated power iteration on a normalized pair-wise similarity matrix of the data.
This class is not yet an Estimator/Transformer, use
assignClusters
method to run the PowerIterationClustering algorithm.- Annotations
- @Since("2.4.0")
- See also
Value Members
- object BisectingKMeans extends DefaultParamsReadable[BisectingKMeans] with Serializable
- Annotations
- @Since("2.0.0")
- object BisectingKMeansModel extends MLReadable[BisectingKMeansModel] with Serializable
- object DistributedLDAModel extends MLReadable[DistributedLDAModel] with Serializable
- Annotations
- @Since("1.6.0")
- object GaussianMixture extends DefaultParamsReadable[GaussianMixture] with Serializable
- Annotations
- @Since("2.0.0")
- object GaussianMixtureModel extends MLReadable[GaussianMixtureModel] with Serializable
- Annotations
- @Since("2.0.0")
- object KMeans extends DefaultParamsReadable[KMeans] with Serializable
- Annotations
- @Since("1.6.0")
- object KMeansModel extends MLReadable[KMeansModel] with Serializable
- Annotations
- @Since("1.6.0")
- object LDA extends MLReadable[LDA] with Serializable
- Annotations
- @Since("2.0.0")
- object LocalLDAModel extends MLReadable[LocalLDAModel] with Serializable
- Annotations
- @Since("1.6.0")
- object PowerIterationClustering extends DefaultParamsReadable[PowerIterationClustering] with Serializable
- Annotations
- @Since("2.4.0")