nbcPlot

Plot the results of NBC (naive Bayes classifier)

Contents

Syntax

Description

nbcPlot(DS, nbcPrm) plots the results of NBC (naive Bayes classifier)

nbcPlot(DS, nbcPrm, mode) uses an additional string variable to specify the type of plot

surfObj=nbcPlot(DS, nbcPrm, ...) return the surface object for plotting instead of plotting directly.

Example

This example uses features 3 and 4 of IRIS dataset for classification:

DS=prData('iris');					% Load iris dataset
DS.input=DS.input(3:4, :);			% Use only features 3 and 4
nbcPrm=nbcTrain(DS);				% Do NBC training

Plot 1D PDF:

figure; nbcPlot(DS, nbcPrm, '1dPdf');

Plot 2D PDF:

figure; nbcPlot(DS, nbcPrm, '2dPdf');

Plot 2D posterior probability:

figure; nbcPlot(DS, nbcPrm, '2dPosterior');

Plot decision boundary:

figure; nbcPlot(DS, nbcPrm, 'decBoundary');

See Also

nbcTrain, nbcEval.


Top page   Next: nbcEval.m   Prev:nbcTrain.m