prtScoreRocBayesianBootstrap Generate a reciever operator characteristic curve with Bayesian Boostrapping
prtScoreRocBayesianBootstrap(DECSTATS,LABELS) plots the receiver operator
characteristic curve for the decision statistics DECSTATS and the
corresponding labels LABELS. DECSTATS must be a Nx1 vector of decision
statistics. LABELS must be a Nx1 vector of binary class labels.
prtScoreRocBayesianBootstrap performs Bayesian boot strap sampling of
an ROC curve and generates the 100*(1-alpha) percent percentile uniform
credible band. The default alpha is .05, corresponding to a 95%
credible band. This is done following the methodology in:
Non-parametric estimation of ROC curve
J. Gu, S. Ghosal, and A. Roy
Statistics in Medicine, Vol. 27, 54075420, 2008.
http://www4.stat.ncsu.edu/~ghosal/papers/ROCBB.pdf
prtScoreRocBayesianBootstrap(DECSTATS,LABELS, NBOOTSAMP) Specifies the
nummber of boostrap samples NBOOTSAMP. The default value is 1000.
prtScoreRocBayesianBootstrap(DECSTATS,LABELS, [], NPFSAMP) Specfies the
number of samples of probability of false alarm at with which to sample
the ROC curve. The default is 500.
prtScoreRocBayesianBootstrap(DECSTATS,LABELS, [], [], ALPHA) Specifies
ALPHA, the size of the credible interval 100*(1-alpha). The default is
0.05, corresponding to a 95% credible band
[PFSAMPLES, PDMEAN,PDCONFREGION, BOOTSTRAPPEDPDS] =
prtScoreRocBayesianBootstrap(...) outputs PFSAMPLES, the False alarm
probabilities at which the bootstrapped ROC curves are evaluated.
PDMEAN, the mean of the bootstrapped ROC curves, PDCONFREGION, the
100*(1-alpha) percent percentile uniform credible band reported as the
upper and lower Pd curves. BOOTSTRAPPEDPDS, all samples of the
bootstrapped ROC curves
Example:
TestDataSet = prtDataGenSpiral; % Create some test and
TrainingDataSet = prtDataGenSpiral; % training data
classifier = prtClassSvm; % Create a classifier
classifier = classifier.train(TrainingDataSet); % Train
classified = run(classifier, TestDataSet);
% Plot the ROC
prtScoreRocBayesianBootstrap(classified.getX, TestDataSet.getY,[],[],.2);