ccr: Correct classification rate for predictive models based on cross
-validation
Description
This function is to calculates correct classification
rate (ccr) for categorical data with the observed (obs) data specified
as factor. It based on the differences between the predicted values for
and the observed values of validation samples for cross-validation. For 0
and 1 data, the observed values need to be specified as factor in order
to use this accuracy measure. It is modified from the function 'pred.acc'
in 'spm' package.
Usage
ccr(obs, pred)
Value
A list with the following component:
ccr (correct classification rate) for categorical data.
Arguments
obs
a vector of observation values of validation samples.
pred
a vector of prediction values of predictive models for validation samples.
Author
Jin Li
References
Jin Li (2019). spm: Spatial Predictive Modeling. R package
version 1.2.0. https://CRAN.R-project.org/package=spm.