MATLAB File Help: prtClassNaiveBayes |
prtClassNaiveBayes Naive Bayes Classifier CLASSIFIER = prtClassNaiveBayes returns a Naive Bayes Classifier. CLASSIFIER = prtClassFld(PROPERTY1, VALUE1, ...) constructs a prtClassNaiveBayes object CLASSIFIER with properties as specified by PROPERTY/VALUE pairs. A prtClassNaiveBayes object inherits all properties from the abstract class prtClass. In addition is has the following properties: baseRv - The base type of random variable to be used in training the model; baseRv is of type prtRv. By default baseRv is a prtRvMvn. A naive Bayes classification algorithm learns a distribution for the data under each hypothesis and assumes independence between the data features (columns) to simplify inference. A prtClassNaiveBayes object inherits the TRAIN, RUN, CROSSVALIDATE and KFOLDS methods from prtAction. It also inherits the PLOT method from prtClass. Example: TestDataSet = prtDataGenUniModal; % Create some test and TrainingDataSet = prtDataGenUniModal; % training data classifier = prtClassNaiveBayes; % Create a classifier classifier = classifier.train(TrainingDataSet); % Train classified = run(classifier, TestDataSet); % Test subplot(2,1,1); classifier.plot; subplot(2,1,2); [pf,pd] = prtScoreRoc(classified,TestDataSet); h = plot(pf,pd,'linewidth',3); title('ROC'); xlabel('Pf'); ylabel('Pd');
Superclasses | prtClass |
Sealed | false |
Construct on load | false |
prtClassNaiveBayes | Naive Bayes Classifier |
baseRv | The base randon variable |
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. |
naiveRv | The naive random variable |
name | Naive Bayes Classifier |
nameAbbreviation | NBC |
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. |