Add Confusion Matrix to Experience plan
This commit is contained in:
parent
320c78084c
commit
932c8e7876
|
@ -10,6 +10,7 @@ output: pdf_document
|
||||||
library("localScore")
|
library("localScore")
|
||||||
library("latex2exp")
|
library("latex2exp")
|
||||||
library("Rcpp")
|
library("Rcpp")
|
||||||
|
library("caret")
|
||||||
```
|
```
|
||||||
|
|
||||||
## 1. Proposition for simulations under $\mathcal{H}_1$
|
## 1. Proposition for simulations under $\mathcal{H}_1$
|
||||||
|
@ -345,6 +346,8 @@ for (lambda0 in (2:5)){
|
||||||
print(summary(LS_H0))
|
print(summary(LS_H0))
|
||||||
cat("Scan Statistics:\n")
|
cat("Scan Statistics:\n")
|
||||||
print(summary(SS_H0))
|
print(summary(SS_H0))
|
||||||
|
cat("Confusion Matrix:\n")
|
||||||
|
print(confusionMatrix(factor(LS_H0$class), factor(SS_H0$class)))
|
||||||
|
|
||||||
cat("- Elisa version:\n")
|
cat("- Elisa version:\n")
|
||||||
Score = ScoreDistribElisa(lambda0, lambda1, T)
|
Score = ScoreDistribElisa(lambda0, lambda1, T)
|
||||||
|
@ -360,14 +363,10 @@ for (lambda0 in (2:5)){
|
||||||
print(summary(LS_H0))
|
print(summary(LS_H0))
|
||||||
cat("Scan Statistics:\n")
|
cat("Scan Statistics:\n")
|
||||||
print(summary(SS_H0))
|
print(summary(SS_H0))
|
||||||
|
cat("Confusion Matrix:\n")
|
||||||
|
print(confusionMatrix(factor(LS_H0$class), factor(SS_H0$class)))
|
||||||
cat("---\n")
|
cat("---\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Test `confusionMatrix`
|
|
||||||
```{r}
|
|
||||||
library(caret)
|
|
||||||
confusionMatrix(factor(LS_H0$class), factor(SS_H0$class))
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue