scalation.modeling.clustering
Members list
Type members
Classlikes
The Algorithm enum specifies which algorithm to use.
The Algorithm enum specifies which algorithm to use.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The Cluster case class maintains information about clusters, the cluster id, center/centroid, cluster size, and measure of error. Note: the cluster assignment function as an array 'to_c' indicates how points are assigned to clusters.
The Cluster case class maintains information about clusters, the cluster id, center/centroid, cluster size, and measure of error. Note: the cluster assignment function as an array 'to_c' indicates how points are assigned to clusters.
Value parameters
- c
-
the cluster id
- np
-
the number of points in the cluster (size)
Attributes
- See also
-
package.scalafor the definition of the 'distance' method - Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The Clusterer object provides a simple dataset (matrix of data points) for initial testing of clustering algorithms.
The Clusterer trait provides a common framework for several clustering algorithms.
The Clusterer trait provides a common framework for several clustering algorithms.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class HierClustererclass KMeansClustererclass KMeansClusterer2class KMeansClustererHWclass KMeansClustererPPclass KMeansPPClustererclass MarkovClustererShow all
The ClusteringPredictor class is used to predict a response value for new vector 'z'. It works by finding the cluster that the point 'z' would belong to. The recorded response value for 'y' is then given as the predicted response. The per cluster recorded reponse value is the consensus (e.g., average) of the individual predictions for 'z' from the members of the cluster. Training involves clustering the points in data matrix 'x' and then computing each clusters reponse.
The ClusteringPredictor class is used to predict a response value for new vector 'z'. It works by finding the cluster that the point 'z' would belong to. The recorded response value for 'y' is then given as the predicted response. The per cluster recorded reponse value is the consensus (e.g., average) of the individual predictions for 'z' from the members of the cluster. Training involves clustering the points in data matrix 'x' and then computing each clusters reponse.
Value parameters
- fname_
-
the names for all features/variables
- hparam
-
the number of nearest neighbors to consider
- x
-
the vectors/points of predictor data stored as rows of a matrix
- y
-
the response value for each vector in x
Attributes
The ClusteringPredictor companion object provides a factory functions.
The ClusteringPredictor companion object provides a factory functions.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ClusteringPredictor.type
Attributes
- See also
-
web.stanford.edu/~hastie/Papers/gap.pdf
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
GapStatistic.type
Cluster several vectors/points using hierarchical clustering. Start with each point forming its own cluster and merge clusters until there are only 'k'.
Cluster several vectors/points using hierarchical clustering. Start with each point forming its own cluster and merge clusters until there are only 'k'.
Value parameters
- k
-
stop when the number of clusters equals k
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- Supertypes
The KMeansClusterer class cluster several vectors/points using k-means clustering. Randomly assign points to k clusters (primary technique). Iteratively, reassign each point to the cluster containing the closest centroid. Stop when there are no changes to the clusters.
The KMeansClusterer class cluster several vectors/points using k-means clustering. Randomly assign points to k clusters (primary technique). Iteratively, reassign each point to the cluster containing the closest centroid. Stop when there are no changes to the clusters.
Value parameters
- flags
-
the array of flags used to adjust the algorithm default: no post processing, no immediate return upon change
- k
-
the number of clusters to make
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- See also
- Supertypes
- Known subtypes
The KMeansClusterer2 class cluster several vectors/points using k-means clustering. Randomly pick 'k' points as initial centroids (secondary technique). Iteratively, reassign each point to the cluster containing the closest centroid. Stop when there are no changes to the clusters.
The KMeansClusterer2 class cluster several vectors/points using k-means clustering. Randomly pick 'k' points as initial centroids (secondary technique). Iteratively, reassign each point to the cluster containing the closest centroid. Stop when there are no changes to the clusters.
Value parameters
- flags
-
the flags used to adjust the algorithm
- k
-
the number of clusters to make
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- See also
- Supertypes
The KMeansClustererHW class cluster several vectors/points using the Hartigan-Wong algorithm.
The KMeansClustererHW class cluster several vectors/points using the Hartigan-Wong algorithm.
Value parameters
- flags
-
the flags used to adjust the algorithm
- k
-
the number of clusters to make
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- Supertypes
- Known subtypes
-
class KMeansClustererPP
The KMeansClustererPP class cluster several vectors/points using the Hartigan-Wong algorithm.
The KMeansClustererPP class cluster several vectors/points using the Hartigan-Wong algorithm.
Value parameters
- flags
-
the flags used to adjust the algorithm
- k
-
the number of clusters to make
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- Supertypes
-
class KMeansClustererHWclass KMeansClusterertrait Clustererclass Objecttrait Matchableclass AnyShow all
The KMeansPPClusterer class cluster several vectors/points using the k-means++ clustering technique.
Value parameters
- algo
-
the clustering algorithm to use
- flags
-
the flags used to adjust the algorithm
- k
-
the number of clusters to make
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- See also
- Companion
- object
- Supertypes
The KMeansPPClusterer companion object supplies a factory function.
The KMeansPPClusterer companion object supplies a factory function.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
KMeansPPClusterer.type
The KMeansPPClustererTester object includes test methods to aid in the testing of the KMeansPPClusterer class.
The KMeansPPClustererTester object includes test methods to aid in the testing of the KMeansPPClusterer class.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
The MarkovClusterer class implements a Markov Clustering Algorithm 'MCL' and is used to cluster nodes in a graph. The graph is represented as an edge-weighted adjacency matrix (a non-zero cell indicates nodes i and j are connected). The primary constructor takes either a graph (adjacency matrix) or a Markov transition matrix as input. If a graph is passed in, the normalize method must be called to convert it into a Markov transition matrix. Before normalizing, it may be helpful to add self loops to the graph. The matrix (graph or transition) may be either dense or sparse. See the MarkovClustererTest object at the bottom of the file for examples.
The MarkovClusterer class implements a Markov Clustering Algorithm 'MCL' and is used to cluster nodes in a graph. The graph is represented as an edge-weighted adjacency matrix (a non-zero cell indicates nodes i and j are connected). The primary constructor takes either a graph (adjacency matrix) or a Markov transition matrix as input. If a graph is passed in, the normalize method must be called to convert it into a Markov transition matrix. Before normalizing, it may be helpful to add self loops to the graph. The matrix (graph or transition) may be either dense or sparse. See the MarkovClustererTest object at the bottom of the file for examples.
Value parameters
- k
-
the strength of expansion
- r
-
the strength of inflation
- t
-
either an adjacency matrix of a graph or a Markov transition matrix
Attributes
- Supertypes
The RandomGraph class generates random undirected graphs with clusters (as adjacency matrices).
The RandomGraph class generates random undirected graphs with clusters (as adjacency matrices).
Value parameters
- c
-
the number of clusters to generate
- n
-
the number of nodes in the graph
- p
-
the probability that any two nodes are connected
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
The TightClusterer class uses tight clustering to eliminate points that do not not fit well in any cluster.
The TightClusterer class uses tight clustering to eliminate points that do not not fit well in any cluster.
Value parameters
- k0
-
the number of clusters to make
- kmin
-
the minimum number of clusters to make
- s
-
the random number stream (to vary the clusters made)
- x
-
the vectors/points to be clustered stored as rows of a matrix
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
The clusteringPredictorTest object is used to test the ClusteringPredictor class.
The clusteringPredictorTest object is used to test the ClusteringPredictor class.
runMain scalation.modeling.clustering.clusteringPredictorTest
Attributes
The clusteringPredictorTest2 object is used to test the ClusteringPredictor class.
The clusteringPredictorTest2 object is used to test the ClusteringPredictor class.
runMain scalation.modeling.clustering.clusteringPredictorTest2
Attributes
The clusteringPredictorTest3 object is used to test the ClusteringPredictor class. Test on AutoMPG dataset and compare with KNN_Regression.
The clusteringPredictorTest3 object is used to test the ClusteringPredictor class. Test on AutoMPG dataset and compare with KNN_Regression.
runMain scalation.modeling.clustering.clusteringPredictorTest3
Attributes
Compute a distance metric (e.g., distance squared) between vectors/points x and z. Override this methods to use a different metric, e.g., norm - the Euclidean distance, 2-norm norm1 - the Manhattan distance, 1-norm Currently uses squared Euclidean norm used for efficiency, may use other norms.
Compute a distance metric (e.g., distance squared) between vectors/points x and z. Override this methods to use a different metric, e.g., norm - the Euclidean distance, 2-norm norm1 - the Manhattan distance, 1-norm Currently uses squared Euclidean norm used for efficiency, may use other norms.
Value parameters
- x
-
the first vector/point
- z
-
the second vector/point
Attributes
The gapStatisticTest main function is used to test the GapStatistic object.
The gapStatisticTest main function is used to test the GapStatistic object.
runMain scalation.modeling.clustering.gapStatisticTest
Attributes
The gapStatisticTest2 main function is used to test the GapStatistic object.
The gapStatisticTest2 main function is used to test the GapStatistic object.
runMain scalation.modeling.clustering.gapStatisticTest2
Attributes
The hierClustererTest object is used to test the HierClusterer class.
The hierClustererTest object is used to test the HierClusterer class.
runMain scalation.modeling.clustering.hierClustererTest
Attributes
The hierClustererTest2 object is used to test the HierClusterer class.
The hierClustererTest2 object is used to test the HierClusterer class.
runMain scalation.modeling.clustering.hierClustererTest2
Attributes
The kMeansClusterer2Test object is used to test the KMeansClusterer2 class.
The kMeansClusterer2Test object is used to test the KMeansClusterer2 class.
runMain scalation.modeling.clusterer.kMeansClusterer2Test
Attributes
The kMeansClusterer2Test2 object is used to test the KMeansClusterer2 class.
The kMeansClusterer2Test2 object is used to test the KMeansClusterer2 class.
runMain scalation.modeling.clusterer.kMeansClusterer2Test2
Attributes
The kMeansClusterer2Test2 object is used to test the KMeansClusterer2 class.
The kMeansClusterer2Test2 object is used to test the KMeansClusterer2 class.
runMain scalation.modeling.clustering.kMeansClusterer2Test3
Attributes
The kMeansClusterer2Test4 object is used to test the KMeansClusterer2 class.
The kMeansClusterer2Test4 object is used to test the KMeansClusterer2 class.
runMain scalation.modeling.clustering.kMeansClusterer2Test4
Attributes
The kMeansClustererTestHW object is used to test the KMeansClustererHW class.
The kMeansClustererTestHW object is used to test the KMeansClustererHW class.
runMain scalation.modeling.clustering.kMeansClustererHWTest
Attributes
The kMeansClustererHWTest2 object is used to test the KMeansClustererHW class.
The kMeansClustererHWTest2 object is used to test the KMeansClustererHW class.
runMain scalation.modeling.clustering.kMeansClustererHWTest2
Attributes
The kMeansClustererHWTest3 object is used to test the KMeansClustererHW class.
The kMeansClustererHWTest3 object is used to test the KMeansClustererHW class.
runMain scalation.modeling.clustering.kMeansClustererHWTest3
Attributes
The kMeansClustererTestPP object is used to test the KMeansClustererPP class.
The kMeansClustererTestPP object is used to test the KMeansClustererPP class.
runMain scalation.modeling.clustering.kMeansClustererPPTest
Attributes
The kMeansClustererPPTest object is used to test the KMeansClustererPP class.
The kMeansClustererPPTest object is used to test the KMeansClustererPP class.
runMain scalation.modeling.clustering.kMeansClustererPPTest2
Attributes
The kMeansClustererPPTest3 object is used to test the KMeansClustererPP class.
The kMeansClustererPPTest3 object is used to test the KMeansClustererPP class.
runMain scalation.modeling.clustering.kMeansClustererPPTest3
Attributes
The kMeansClustererTest object is used to test the KMeansClusterer class.
The kMeansClustererTest object is used to test the KMeansClusterer class.
runMain scalation.modeling.clustering.kMeansClustererTest
Attributes
The kMeansClustererTest2 object is used to test the KMeansClusterer class.
The kMeansClustererTest2 object is used to test the KMeansClusterer class.
runMain scalation.modeling.clustering.kMeansClustererTest2
Attributes
The kMeansClustererTest3 object is used to test the KMeansClusterer class.
The kMeansClustererTest3 object is used to test the KMeansClusterer class.
runMain scalation.modeling.clustering.kMeansClustererTest3
Attributes
The kMeansClustererTest4 object is used to test the KMeansClusterer class.
The kMeansClustererTest4 object is used to test the KMeansClusterer class.
runMain scalation.modeling.clustering.kMeansClustererTest4
Attributes
The kMeansPPClustererTest main function is used to test the KMeansPPClusterer class.
The kMeansPPClustererTest main function is used to test the KMeansPPClusterer class.
runMain scalation.modeling.clustering.kMeansPPClustererTest
Attributes
The kMeansPPClustererTest2 main function is used to test the KMeansPPClusterer class.
The kMeansPPClustererTest2 main function is used to test the KMeansPPClusterer class.
runMain scalation.modeling.clustering.kMeansPPClustererTest2
Attributes
The kMeansPPClustererTest3 main function is used to test the KMeansPPClusterer class.
The kMeansPPClustererTest3 main function is used to test the KMeansPPClusterer class.
runMain scalation.modeling.clustering.kMeansPPClustererTest3
Attributes
The kMeansPPClustererTest4 main function is used to test the KMeansPPClusterer class.
The kMeansPPClustererTest4 main function is used to test the KMeansPPClusterer class.
runMain scalation.modeling.clustering.kMeansPPClustererTest4
Attributes
The markovClustererTest object is used to test the MarkovClusterer class.
The markovClustererTest object is used to test the MarkovClusterer class.
Attributes
- See also
-
www.cs.ucsb.edu/~xyan/classes/CS595D-2009winter/MCL_Presentation2.pdf ^ > runMain scalation.modeling.clustering.markovClustererTest
The markovClustererTest2 object is used to test the MarkovClusterer class. ^ > runMain scalation.modeling.clustering.markovClustererTest2
The markovClustererTest2 object is used to test the MarkovClusterer class. ^ > runMain scalation.modeling.clustering.markovClustererTest2
Attributes
The randomGraphTest object is used to test the RandomGraph class.
The randomGraphTest object is used to test the RandomGraph class.
runMain scalation.modeling.clustering.randomGraphTest
Attributes
The tightClustererTest main function is used to test the TightClusterer class.
The tightClustererTest main function is used to test the TightClusterer class.
runMain scalation.modeling.clustering.tightClustererTest