Otherwise, it should be a vector of numeric values with elements for each class. When data has two levels, prevalence should be a single numeric value. If there are only two factor levels, the first level will be used as the "positive" result.Ī character vector of dimnames for the tableĪ numeric value or matrix for the rate of the "positive" class of the data. )Ī factor of predicted classes (for the default method) or an object of class table.Ī factor of classes to be used as the true resultsĪn optional character string for the factor level that corresponds to a "positive" result (if that makes sense for your data).
) # S3 method for class 'table' confusionMatrix ( data, positive = NULL, prevalence = NULL. ) # Default S3 method: confusionMatrix ( data, reference, positive = NULL, dnn = c ( "Prediction", "Reference" ), prevalence = NULL. plotObsVsPred: Plot Observed versus Predicted Results in Regression and.ĬonfusionMatrix ( data.plotClassProbs: Plot Predicted Probabilities in Classification Models.pcaNNet: Neural Networks with a Principal Component Step.panel.needle: Needle Plot Lattice Panel.panel.lift: Lattice Panel Functions for Lift Plots.oil: Fatty acid composition of commercial oils.nullModel: Fit a simple, non-informative model.2Reference: Quantile Normalization to a Reference Distribution.normalize2Reference: Quantile Normalize Columns of a Matrix Based on a Reference.nearZeroVar: Identification of near zero variance predictors.models: A List of Available Models in train.modelLookup: Tools for Models Available in 'train'.mdrr: Multidrug Resistance Reversal (MDRR) Agent Data.
maxDissim: Maximum Dissimilarity Sampling.lattice.rfe: Lattice functions for plotting resampling results of.lattice.resamples: Lattice Functions for Visualizing Resampling Results.
#Caret confusion matrix full
dummyVars: Create A Full Set of Dummy Variables.downSample: Down- and Up-Sampling Imbalanced Data.: Create a dotplot of variable importance values.diff.resamples: Inferential Assessments About Model Performance.dhfr: Dihydrofolate Reductase Inhibitors Data.createDataPartition: Data Splitting functions.ain: Estimate a Resampled Confusion Matrix.confusionMatrix: Create a confusion matrix.classDist: Compute and predict the distances to class centroids.cars: Kelly Blue Book resale data for 2005 model year GM cars.calibration: Probability Calibration Plot.
BoxCoxTrans: Box-Cox and Exponential Transformations.avNNet: Neural Networks Using Model Averaging.as.nfusionMatrix: Save Confusion Table Results.Here we will create a function that allows the user to pass in the cm object created by the caret package in order to produce the visual. You can just use the rect functionality in r to layout the confusion matrix.