I plan to implement ' no information rate ' as part of summary statistics. This statistic is implemented in r (Optimise SVM to avoid false-negative in binary classification) but not in Python (at least I cannot find a reference) .
Is there a canonical reference that I can refer to so as to implement this algorithm ?
I've searched Wikipedia and various Google searches but have not found a reference.
Update :
Reading caret doc https://cran.r-project.org/web/packages/caret/caret.pdf
"
The overall accuracy rate is computed along with a 95 percent confidence interval for this rate
(using binom.test) and a one-sided test to see if the accuracy is better than the "no information
rate," which is taken to be the largest class percentage in the data.
"
Best Answer
Suppose that you have response $y_i$ and covariates $x_i$ for $i = 1 ...n$, and some loss function $\mathcal{L}$. The no information error rate of a model $f$ is the average loss of $f$ over all combinations of $y_i$ and $x_i$:
$${1 \over n^2} \sum_{i=1}^n \sum_{j=1}^n \mathcal{L}\left(y_i, f(x_j)\right)$$
If you have a vector of predictions
predicted
and a vector of responsesresponse
, you can calculate the no info error rate by generating all the combinations ofpredicted
andresponse
and then evaluating some functionloss
on these resulting vectors.In R, supposing RMSE loss, (using the
tidyr
library) this looks like:In Python this looks like