confmatrix: Conf Matrix

Description Usage Arguments Details Value Author(s) Examples

View source: R/conf_matrix.R

Description

Calculates a cross-tabulation of observed and predicted classes with associated statistics.

Usage

1
confmatrix(actuals, preds)

Arguments

actuals

a numeric vector

preds

a numeric vector

Details

confmatrix

Value

A table same as caret::ConfusionMatrix

Author(s)

Jayachandra N

Examples

1
confmatrix(c(1,1,1,0), c(1,1,0,0))

Example output

Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 
Confusion Matrix and Statistics

          Reference
Prediction 0 1
         0 1 1
         1 0 2
                                          
               Accuracy : 0.75            
                 95% CI : (0.1941, 0.9937)
    No Information Rate : 0.75            
    P-Value [Acc > NIR] : 0.7383          
                                          
                  Kappa : 0.5             
                                          
 Mcnemar's Test P-Value : 1.0000          
                                          
            Sensitivity : 1.0000          
            Specificity : 0.6667          
         Pos Pred Value : 0.5000          
         Neg Pred Value : 1.0000          
             Prevalence : 0.2500          
         Detection Rate : 0.2500          
   Detection Prevalence : 0.5000          
      Balanced Accuracy : 0.8333          
                                          
       'Positive' Class : 0               
                                          

shinyr documentation built on Oct. 21, 2021, 5:07 p.m.