| MATLAB File Help: prtClassKmeansPrototypes |
prtClassKmeansPrototypes K-means prototypes classifier CLASSIFIER = prtClassKmeansPrototypes returns a K-means prototypes classifier CLASSIFIER = prtClassKmeansPrototypes(PROPERTY1, VALUE1, ...) constructs a prtClassKmeansPrototypes object CLASSIFIER with properties as specified by PROPERTY/VALUE pairs. A prtClassKmeansPrototypes object inherits all properties from the abstract class prtClass. In addition is has the following properties: nClustersPerHypothesis - The number of clusters per hypothesis clusterCenters - The cluster centers (set during training) For information on the K-means prototype classifier algorithm, please refer to: Hastie, Tibshirani, Friedman, The Elements of Statistical Learning A prtClassKmeansPrototypes object inherits the TRAIN, RUN, CROSSVALIDATE and KFOLDS methods from prtAction. It also inherits the PLOT method from prtClass. Example: TestDataSet = prtDataGenMary; % Create some test and TrainingDataSet = prtDataGenMary; % training data classifier = prtClassKmeansPrototypes; % Create a classifier classifier = classifier.train(TrainingDataSet); % Train classified = run(classifier, TestDataSet); % Test [~, classes] = max(classified.getX,[],2); % Select the % classes percentCorr = prtScorePercentCorrect(classes,TestDataSet.getTargets); classifier.plot;
| Superclasses | prtClass |
| Sealed | false |
| Construct on load | false |
| prtClassKmeansPrototypes | Allow for string, value pairs |
| clusterCenters | The cluster centers |
| dataSet | The training prtDataSet, only stored if verboseStorage is true. |
| dataSetSummary | Structure that summarizes prtDataSet. |
| internalDecider | Optional prtDecider object for making decisions |
| isCrossValidateValid | True |
| isNativeMary | True |
| isSupervised | True |
| isTrained | Indicates if prtAction object has been trained. |
| nClustersPerHypothesis | Number of clusters per hypothesis |
| name | K-Means Prototypes |
| nameAbbreviation | K-MeansProto |
| showProgressBar | |
| twoClassParadigm | Whether the classifier retures one output (binary) or two outputs (m-ary) when there are only two unique class labels |
| userData | User specified data |
| verboseStorage | Specifies whether or not to store the training prtDataset. |
| 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 confidence of a prtClass 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. |