MATLAB File Help: prtClusterKmeans
prtClusterKmeans
  prtClusterKmeans   Kmeans clustering object
 
     CLUSTER = prtClusterKmeans returns a Kmeans clustering object.
 
     CLUSTER = prtClusterKmeans(PROPERTY1, VALUE1, ...) constructs a
     prtClassFld object CLASSIFIER with properties as specified by
     PROPERTY/VALUE pairs.
 
     A prtClusterKmeans object inherits all properties from the abstract
     class prtCluster. In addition is has the following properties:
 
     nClusters                 - Number of cluster centers to learn 
 
     kmeansHandleEmptyClusters - Speficies operation when degerate clusters found
                                 occur during training.  Allowed values are 'remove'
                                 and 'random'.  'remove' eliminates the
                                 empty cluster. 'random' sets the
                                 cluster mean to a random vector.
 
     For information on the K-Means algorithm, please
     refer to the following URL:
 
     http://en.wikipedia.org/wiki/K-means_clustering
 
     A prtClusterKmeans object inherits the TRAIN, RUN, CROSSVALIDATE and
     KFOLDS methods from prtAction. It also inherits the PLOT method from
     prtCluster.
 
     Invoking the RUN method on a prtClusterKmeans object classifies
     the input data by assigning each observation a label according to
     the cluster center it is closest to. The cluster centers are found
     during training.
 
    Example:
 
    ds = prtDataGenMary                  % Load a prtDataSet
    clusterAlgo = prtClusterKmeans;      % Create a prtClusterKmeans object
    clusterAlgo.nClusters = 3;           % Set the number of desired clusters
 
    % Set the internal decision rule to be MAP. Not required for
    % clustering, but necessary to plot the results.
    clusterAlgo.internalDecider = prtDecisionMap;
    clusterAlgo = clusterAlgo.train(ds); % Train the cluster algorithm
    plot(clusterAlgo);                   % Plot the results
See also
Class Details
Superclasses prtCluster
Sealed false
Construct on load false
Constructor Summary
prtClusterKmeans Allow for string, value pairs 
Property Summary
clusterCenters The cluster centers 
dataSet The training prtDataSet, only stored if verboseStorage is true.  
dataSetSummary Structure that summarizes prtDataSet. 
distanceMetricFn The distance metric; should be a function like D = prtDistanceEuclidean(dataSet1,dataSet2) 
includesDecision Flag indicating if result includes a decision 
internalDecider Optional prtDecider object for making decisions 
isCrossValidateValid True 
isSupervised False 
isTrained Indicates if prtAction object has been trained. 
kmeansHandleEmptyClusters Action to take when an empty cluster occurs  
nClusters The number of clusters to find 
name K-Means Clustering 
nameAbbreviation K-MeansCluster 
showProgressBar  
userData User specified data 
verboseStorage Specifies whether or not to store the training prtDataset. 
Method Summary
  crossValidate Cross validate prtAction using prtDataSet and cross validation keys. 
  get get the object properties 
  kfolds Perform K-folds cross-validation of prtAction 
  optimize Optimize action parameter by exhaustive function maximization. 
  plot Plot the output of the prtCluster object 
  run Run a prtAction object on a prtDataSet object. 
  set set the object properties 
  train Train a prtAction object using training a prtDataSet object.