}}
@@ -96,7 +102,7 @@ plot(
)
# 4.2) weighted matrix
-confusion_matrix <- cmatrix(
+confusion_matrix <- weighted.cmatrix(
actual = actual,
predicted = predicted,
w = iris$Petal.Length/mean(iris$Petal.Length)
@@ -120,6 +126,7 @@ Other Classification:
\code{\link{baccuracy.factor}()},
\code{\link{ckappa.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -143,6 +150,7 @@ Other Supervised Learning:
\code{\link{ccc.numeric}()},
\code{\link{ckappa.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -164,6 +172,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/dor.Rd b/man/dor.Rd
index 1640919c..f795e16a 100644
--- a/man/dor.Rd
+++ b/man/dor.Rd
@@ -8,11 +8,11 @@
\alias{weighted.dor}
\title{Compute the \eqn{\text{diagnostic}} \eqn{\text{odds}} \eqn{\text{ratio}}}
\usage{
-\method{dor}{factor}(actual, predicted, micro = NULL, ...)
+\method{dor}{factor}(actual, predicted, ...)
-\method{weighted.dor}{factor}(actual, predicted, w, micro = NULL, ...)
+\method{weighted.dor}{factor}(actual, predicted, w, ...)
-\method{dor}{cmatrix}(x, micro = NULL, ...)
+\method{dor}{cmatrix}(x, ...)
dor(...)
@@ -23,9 +23,6 @@ weighted.dor(...)
\item{predicted}{A vector of <\link{factor}>-vector of \link{length} \eqn{n}, and \eqn{k} levels.}
-\item{micro}{A <\link{logical}>-value of \link{length} \eqn{1} (default: \link{NULL}). If \link{TRUE} it returns the
-micro average across all \eqn{k} classes, if \link{FALSE} it returns the macro average.}
-
\item{...}{Arguments passed into other methods}
\item{w}{A <\link{numeric}>-vector of \link{length} \eqn{n}. \link{NULL} by default.}
@@ -158,6 +155,7 @@ Other Classification:
\code{\link{baccuracy.factor}()},
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -181,6 +179,7 @@ Other Supervised Learning:
\code{\link{ccc.numeric}()},
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -202,6 +201,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/entropy.Rd b/man/entropy.Rd
new file mode 100644
index 00000000..3bb5fa6e
--- /dev/null
+++ b/man/entropy.Rd
@@ -0,0 +1,215 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/RcppExports.R, R/S3-CrossEntropyLoss.R
+\name{entropy.factor}
+\alias{entropy.factor}
+\alias{logloss.factor}
+\alias{entropy}
+\alias{logloss}
+\alias{weighted.entropy}
+\alias{weighted.logloss}
+\title{Compute the \eqn{\text{Cross}} \eqn{\text{Entropy}} \eqn{\text{Loss}}}
+\usage{
+\method{entropy}{factor}(actual, response, normalize = TRUE, ...)
+
+\method{logloss}{factor}(actual, response, normalize = TRUE, ...)
+
+entropy(...)
+
+weighted.entropy(...)
+
+logloss(...)
+
+weighted.logloss(...)
+}
+\arguments{
+\item{actual}{A vector of <\link{factor}>- of \link{length} \eqn{n}, and \eqn{k} levels}
+
+\item{response}{A \eqn{N \times k} <\link{numeric}>-matrix of predicted probabilities.
+The \eqn{i}-th row should sum to 1 (i.e., a valid probability distribution
+over the \eqn{k} classes). The first column corresponds to the first factor
+level in \code{actual}, the second column to the second factor level, and so on.}
+
+\item{normalize}{A <\link{logical}>-value (default: \link{TRUE}). If \link{TRUE},
+the mean cross-entropy across all observations is returned; otherwise, the
+sum of cross-entropies is returned.}
+
+\item{...}{Arguments passed into other methods}
+}
+\value{
+A <\link{numeric}>-vector of \link{length} 1
+}
+\description{
+The \code{\link[=entropy]{entropy()}} function computes the \strong{Cross-Entropy Loss} — often called \strong{Log Loss} — between observed classes (as a <\link{factor}>) and their predicted probability distributions (a <\link{numeric}> matrix).
+The \code{\link[=weighted.entropy]{weighted.entropy()}} function is the weighted version, applying observation-specific weights.
+}
+\section{Calculation}{
+
+
+Let \eqn{y_{i,k}} be the one-hot encoding of the actual class label for the \eqn{i}-th observation (that is, \eqn{y_{i,k} = 1} if observation \eqn{i} belongs to class \eqn{k}, and 0 otherwise), and let \eqn{\hat{p}_{i,k}} be the predicted probability of class \eqn{k} for observation \eqn{i}.
+The cross-entropy loss \eqn{L} is:
+
+\deqn{
+ L = -\sum_{i=1}^N \sum_{k=1}^K y_{i,k}\,\log(\hat{p}_{i,k}).
+}
+
+If \code{normalize = TRUE}, this sum is divided by \eqn{N} (the number of observations). When weights \eqn{w_i} are supplied, each term is multiplied by \eqn{w_i}, and if \code{normalize = TRUE}, the final sum is divided by \eqn{\sum_i w_i}.
+}
+
+\section{Creating <\link{factor}>}{
+
+
+Consider a classification problem with three classes: \code{A}, \code{B}, and \code{C}. The actual vector of \code{\link[=factor]{factor()}} values is defined as follows:
+
+\if{html}{\out{}}\preformatted{## set seed
+set.seed(1903)
+
+## actual
+factor(
+ x = sample(x = 1:3, size = 10, replace = TRUE),
+ levels = c(1, 2, 3),
+ labels = c("A", "B", "C")
+)
+#> [1] B A B B A C B C C A
+#> Levels: A B C
+}\if{html}{\out{
}}
+
+Here, the values 1, 2, and 3 are mapped to \code{A}, \code{B}, and \code{C}, respectively. Now, suppose your model does not predict any \code{B}'s. The predicted vector of \code{\link[=factor]{factor()}} values would be defined as follows:
+
+\if{html}{\out{}}\preformatted{## set seed
+set.seed(1903)
+
+## predicted
+factor(
+ x = sample(x = c(1, 3), size = 10, replace = TRUE),
+ levels = c(1, 2, 3),
+ labels = c("A", "B", "C")
+)
+#> [1] C A C C C C C C A C
+#> Levels: A B C
+}\if{html}{\out{
}}
+
+In both cases, \eqn{k = 3}, determined indirectly by the \code{levels} argument.
+}
+
+\examples{
+# 1) Recode the iris data set to a binary classification problem
+# Here, the positive class ("Virginica") is coded as 1,
+# and the rest ("Others") is coded as 0.
+iris$species_num <- as.numeric(iris$Species == "virginica")
+
+# 2) Fit a logistic regression model predicting species_num from Sepal.Length & Sepal.Width
+model <- glm(
+ formula = species_num ~ Sepal.Length + Sepal.Width,
+ data = iris,
+ family = binomial(link = "logit")
+)
+
+# 3) Generate predicted classes: "Virginica" vs. "Others"
+predicted <- factor(
+ as.numeric(predict(model, type = "response") > 0.5),
+ levels = c(1, 0),
+ labels = c("Virginica", "Others")
+)
+
+# 3.1) Generate actual classes
+actual <- factor(
+ x = iris$species_num,
+ levels = c(1, 0),
+ labels = c("Virginica", "Others")
+)
+
+# For cross-entropy, we need predicted probabilities for each class.
+# Since it's a binary model, we create a 2-column matrix:
+# 1st column = P("Virginica")
+# 2nd column = P("Others") = 1 - P("Virginica")
+predicted_probs <- predict(model, type = "response")
+response_matrix <- cbind(predicted_probs, 1 - predicted_probs)
+
+# 4) Evaluate unweighted cross-entropy
+# 'entropy' takes (actual, response_matrix, normalize=TRUE/FALSE).
+# The factor 'actual' must have the positive class (Virginica) as its first level.
+unweighted_CrossEntropy <- entropy(
+ actual = actual, # factor
+ response = response_matrix, # numeric matrix of probabilities
+ normalize = TRUE # normalize = TRUE
+)
+
+# 5) Evaluate weighted cross-entropy
+# We introduce a weight vector, for example:
+weights <- iris$Petal.Length / mean(iris$Petal.Length)
+weighted_CrossEntropy <- weighted.entropy(
+ actual = actual,
+ response = response_matrix,
+ w = weights,
+ normalize = TRUE
+)
+
+# 6) Print Results
+cat(
+ "Unweighted Cross-Entropy:", unweighted_CrossEntropy,
+ "Weighted Cross-Entropy:", weighted_CrossEntropy,
+ sep = "\n"
+)
+}
+\seealso{
+Other Classification:
+\code{\link{ROC.factor}()},
+\code{\link{accuracy.factor}()},
+\code{\link{baccuracy.factor}()},
+\code{\link{ckappa.factor}()},
+\code{\link{cmatrix.factor}()},
+\code{\link{dor.factor}()},
+\code{\link{fbeta.factor}()},
+\code{\link{fdr.factor}()},
+\code{\link{fer.factor}()},
+\code{\link{fmi.factor}()},
+\code{\link{fpr.factor}()},
+\code{\link{jaccard.factor}()},
+\code{\link{mcc.factor}()},
+\code{\link{nlr.factor}()},
+\code{\link{npv.factor}()},
+\code{\link{plr.factor}()},
+\code{\link{prROC.factor}()},
+\code{\link{precision.factor}()},
+\code{\link{recall.factor}()},
+\code{\link{specificity.factor}()},
+\code{\link{zerooneloss.factor}()}
+
+Other Supervised Learning:
+\code{\link{ROC.factor}()},
+\code{\link{accuracy.factor}()},
+\code{\link{baccuracy.factor}()},
+\code{\link{ccc.numeric}()},
+\code{\link{ckappa.factor}()},
+\code{\link{cmatrix.factor}()},
+\code{\link{dor.factor}()},
+\code{\link{fbeta.factor}()},
+\code{\link{fdr.factor}()},
+\code{\link{fer.factor}()},
+\code{\link{fpr.factor}()},
+\code{\link{huberloss.numeric}()},
+\code{\link{jaccard.factor}()},
+\code{\link{mae.numeric}()},
+\code{\link{mape.numeric}()},
+\code{\link{mcc.factor}()},
+\code{\link{mpe.numeric}()},
+\code{\link{mse.numeric}()},
+\code{\link{nlr.factor}()},
+\code{\link{npv.factor}()},
+\code{\link{pinball.numeric}()},
+\code{\link{plr.factor}()},
+\code{\link{prROC.factor}()},
+\code{\link{precision.factor}()},
+\code{\link{rae.numeric}()},
+\code{\link{recall.factor}()},
+\code{\link{rmse.numeric}()},
+\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
+\code{\link{rrse.numeric}()},
+\code{\link{rsq.numeric}()},
+\code{\link{smape.numeric}()},
+\code{\link{specificity.factor}()},
+\code{\link{zerooneloss.factor}()}
+}
+\concept{Classification}
+\concept{Supervised Learning}
diff --git a/man/examples/scr_ConfusionMatrix.R b/man/examples/scr_ConfusionMatrix.R
index aeea8125..104686ba 100644
--- a/man/examples/scr_ConfusionMatrix.R
+++ b/man/examples/scr_ConfusionMatrix.R
@@ -54,7 +54,7 @@ plot(
)
# 4.2) weighted matrix
-confusion_matrix <- cmatrix(
+confusion_matrix <- weighted.cmatrix(
actual = actual,
predicted = predicted,
w = iris$Petal.Length/mean(iris$Petal.Length)
diff --git a/man/examples/scr_CrossEntropyLoss.R b/man/examples/scr_CrossEntropyLoss.R
new file mode 100644
index 00000000..f5c38b0e
--- /dev/null
+++ b/man/examples/scr_CrossEntropyLoss.R
@@ -0,0 +1,58 @@
+# 1) Recode the iris data set to a binary classification problem
+# Here, the positive class ("Virginica") is coded as 1,
+# and the rest ("Others") is coded as 0.
+iris$species_num <- as.numeric(iris$Species == "virginica")
+
+# 2) Fit a logistic regression model predicting species_num from Sepal.Length & Sepal.Width
+model <- glm(
+ formula = species_num ~ Sepal.Length + Sepal.Width,
+ data = iris,
+ family = binomial(link = "logit")
+)
+
+# 3) Generate predicted classes: "Virginica" vs. "Others"
+predicted <- factor(
+ as.numeric(predict(model, type = "response") > 0.5),
+ levels = c(1, 0),
+ labels = c("Virginica", "Others")
+)
+
+# 3.1) Generate actual classes
+actual <- factor(
+ x = iris$species_num,
+ levels = c(1, 0),
+ labels = c("Virginica", "Others")
+)
+
+# For cross-entropy, we need predicted probabilities for each class.
+# Since it's a binary model, we create a 2-column matrix:
+# 1st column = P("Virginica")
+# 2nd column = P("Others") = 1 - P("Virginica")
+predicted_probs <- predict(model, type = "response")
+response_matrix <- cbind(predicted_probs, 1 - predicted_probs)
+
+# 4) Evaluate unweighted cross-entropy
+# 'entropy' takes (actual, response_matrix, normalize=TRUE/FALSE).
+# The factor 'actual' must have the positive class (Virginica) as its first level.
+unweighted_CrossEntropy <- entropy(
+ actual = actual, # factor
+ response = response_matrix, # numeric matrix of probabilities
+ normalize = TRUE # normalize = TRUE
+)
+
+# 5) Evaluate weighted cross-entropy
+# We introduce a weight vector, for example:
+weights <- iris$Petal.Length / mean(iris$Petal.Length)
+weighted_CrossEntropy <- weighted.entropy(
+ actual = actual,
+ response = response_matrix,
+ w = weights,
+ normalize = TRUE
+)
+
+# 6) Print Results
+cat(
+ "Unweighted Cross-Entropy:", unweighted_CrossEntropy,
+ "Weighted Cross-Entropy:", weighted_CrossEntropy,
+ sep = "\n"
+)
diff --git a/man/examples/scr_RelativeRootMeanSquaredError.R b/man/examples/scr_RelativeRootMeanSquaredError.R
new file mode 100644
index 00000000..83526072
--- /dev/null
+++ b/man/examples/scr_RelativeRootMeanSquaredError.R
@@ -0,0 +1,30 @@
+# 1) fit a linear
+# regression
+model <- lm(
+ mpg ~ .,
+ data = mtcars
+)
+
+# 1.1) define actual
+# and predicted values
+# to measure performance
+actual <- mtcars$mpg
+predicted <- fitted(model)
+
+# 2) evaluate in-sample model
+# performance using Relative Root Mean Squared Error (RRMSE)
+cat(
+ "IQR Relative Root Mean Squared Error", rrmse(
+ actual = actual,
+ predicted = predicted,
+ normalization = 2
+ ),
+ "IQR Relative Root Mean Squared Error (weighted)", weighted.rrmse(
+ actual = actual,
+ predicted = predicted,
+ w = mtcars$mpg/mean(mtcars$mpg),
+ normalization = 2
+ ),
+ sep = "\n"
+)
+
diff --git a/man/examples/scr_RelativeRootSquaredError.R b/man/examples/scr_RootRelativeSquaredError.R
similarity index 100%
rename from man/examples/scr_RelativeRootSquaredError.R
rename to man/examples/scr_RootRelativeSquaredError.R
diff --git a/man/fbeta.Rd b/man/fbeta.Rd
index fcf7a38a..6741ab5a 100644
--- a/man/fbeta.Rd
+++ b/man/fbeta.Rd
@@ -177,6 +177,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
\code{\link{fmi.factor}()},
@@ -200,6 +201,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
\code{\link{fpr.factor}()},
@@ -220,6 +222,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/fdr.Rd b/man/fdr.Rd
index 8f9ee12a..9029da38 100644
--- a/man/fdr.Rd
+++ b/man/fdr.Rd
@@ -172,6 +172,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fer.factor}()},
\code{\link{fmi.factor}()},
@@ -195,6 +196,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fer.factor}()},
\code{\link{fpr.factor}()},
@@ -215,6 +217,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/fer.Rd b/man/fer.Rd
index 0b37c7a9..4ce1f0dd 100644
--- a/man/fer.Rd
+++ b/man/fer.Rd
@@ -171,6 +171,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fmi.factor}()},
@@ -194,6 +195,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fpr.factor}()},
@@ -214,6 +216,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/figures/README-ROC-1.png b/man/figures/README-ROC-1.png
index 11a3ae08..41564a89 100644
Binary files a/man/figures/README-ROC-1.png and b/man/figures/README-ROC-1.png differ
diff --git a/man/figures/README-performance-1.png b/man/figures/README-performance-1.png
new file mode 100644
index 00000000..8729a92a
Binary files /dev/null and b/man/figures/README-performance-1.png differ
diff --git a/man/figures/README-performance-2.png b/man/figures/README-performance-2.png
new file mode 100644
index 00000000..75f4ede3
Binary files /dev/null and b/man/figures/README-performance-2.png differ
diff --git a/man/figures/README-performance-classification-1.png b/man/figures/README-performance-classification-1.png
index c837ceea..fa407ffd 100644
Binary files a/man/figures/README-performance-classification-1.png and b/man/figures/README-performance-classification-1.png differ
diff --git a/man/figures/README-performance-regression-1.png b/man/figures/README-performance-regression-1.png
index dc3449b0..75f4ede3 100644
Binary files a/man/figures/README-performance-regression-1.png and b/man/figures/README-performance-regression-1.png differ
diff --git a/man/fmi.Rd b/man/fmi.Rd
index f582c138..7b59a67e 100644
--- a/man/fmi.Rd
+++ b/man/fmi.Rd
@@ -130,6 +130,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
diff --git a/man/fpr.Rd b/man/fpr.Rd
index f722f310..4633f76d 100644
--- a/man/fpr.Rd
+++ b/man/fpr.Rd
@@ -186,6 +186,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -209,6 +210,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -229,6 +231,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/huberloss.Rd b/man/huberloss.Rd
index ae098f15..de6b0920 100644
--- a/man/huberloss.Rd
+++ b/man/huberloss.Rd
@@ -101,6 +101,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -113,6 +114,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -133,6 +135,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/jaccard.Rd b/man/jaccard.Rd
index 5b94a0dd..0a4d2f02 100644
--- a/man/jaccard.Rd
+++ b/man/jaccard.Rd
@@ -201,6 +201,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -224,6 +225,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -244,6 +246,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/mae.Rd b/man/mae.Rd
index b271991f..65479e22 100644
--- a/man/mae.Rd
+++ b/man/mae.Rd
@@ -81,6 +81,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -93,6 +94,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -113,6 +115,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/mape.Rd b/man/mape.Rd
index d6a2ebab..b1101999 100644
--- a/man/mape.Rd
+++ b/man/mape.Rd
@@ -82,6 +82,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -94,6 +95,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -114,6 +116,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/mcc.Rd b/man/mcc.Rd
index 523b7040..a600c3fb 100644
--- a/man/mcc.Rd
+++ b/man/mcc.Rd
@@ -158,6 +158,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -181,6 +182,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -201,6 +203,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/mpe.Rd b/man/mpe.Rd
index 88568edd..a281a3b2 100644
--- a/man/mpe.Rd
+++ b/man/mpe.Rd
@@ -83,6 +83,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -95,6 +96,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -115,6 +117,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/mse.Rd b/man/mse.Rd
index 82a9018c..e20a2a03 100644
--- a/man/mse.Rd
+++ b/man/mse.Rd
@@ -83,6 +83,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -95,6 +96,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -115,6 +117,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/nlr.Rd b/man/nlr.Rd
index 37a355e5..ed2aa7e2 100644
--- a/man/nlr.Rd
+++ b/man/nlr.Rd
@@ -8,11 +8,11 @@
\alias{weighted.nlr}
\title{Compute the \eqn{\text{negative}} \eqn{\text{likelihood}} \eqn{\text{ratio}}}
\usage{
-\method{nlr}{factor}(actual, predicted, micro = NULL, ...)
+\method{nlr}{factor}(actual, predicted, ...)
-\method{weighted.nlr}{factor}(actual, predicted, w, micro = NULL, ...)
+\method{weighted.nlr}{factor}(actual, predicted, w, ...)
-\method{nlr}{cmatrix}(x, micro = NULL, ...)
+\method{nlr}{cmatrix}(x, ...)
nlr(...)
@@ -23,9 +23,6 @@ weighted.nlr(...)
\item{predicted}{A vector of <\link{factor}>-vector of \link{length} \eqn{n}, and \eqn{k} levels.}
-\item{micro}{A <\link{logical}>-value of \link{length} \eqn{1} (default: \link{NULL}). If \link{TRUE} it returns the
-micro average across all \eqn{k} classes, if \link{FALSE} it returns the macro average.}
-
\item{...}{Arguments passed into other methods}
\item{w}{A <\link{numeric}>-vector of \link{length} \eqn{n}. \link{NULL} by default.}
@@ -150,6 +147,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -173,6 +171,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -193,6 +192,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/npv.Rd b/man/npv.Rd
index e3fa5acf..b0cc48be 100644
--- a/man/npv.Rd
+++ b/man/npv.Rd
@@ -171,6 +171,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -194,6 +195,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -214,6 +216,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/pinball.Rd b/man/pinball.Rd
index fa841843..3e8091dd 100644
--- a/man/pinball.Rd
+++ b/man/pinball.Rd
@@ -85,6 +85,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -97,6 +98,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -117,6 +119,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/plr.Rd b/man/plr.Rd
index 3b97b580..ab2957b0 100644
--- a/man/plr.Rd
+++ b/man/plr.Rd
@@ -8,11 +8,11 @@
\alias{weighted.plr}
\title{Compute the \eqn{\text{positive}} \eqn{\text{likelihood}} \eqn{\text{ratio}}}
\usage{
-\method{plr}{factor}(actual, predicted, micro = NULL, ...)
+\method{plr}{factor}(actual, predicted, ...)
-\method{weighted.plr}{factor}(actual, predicted, w, micro = NULL, ...)
+\method{weighted.plr}{factor}(actual, predicted, w, ...)
-\method{plr}{cmatrix}(x, micro = NULL, ...)
+\method{plr}{cmatrix}(x, ...)
plr(...)
@@ -23,9 +23,6 @@ weighted.plr(...)
\item{predicted}{A vector of <\link{factor}>-vector of \link{length} \eqn{n}, and \eqn{k} levels.}
-\item{micro}{A <\link{logical}>-value of \link{length} \eqn{1} (default: \link{NULL}). If \link{TRUE} it returns the
-micro average across all \eqn{k} classes, if \link{FALSE} it returns the macro average.}
-
\item{...}{Arguments passed into other methods}
\item{w}{A <\link{numeric}>-vector of \link{length} \eqn{n}. \link{NULL} by default.}
@@ -156,6 +153,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -179,6 +177,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -199,6 +198,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/prROC.Rd b/man/prROC.Rd
index fb5be015..4d72a908 100644
--- a/man/prROC.Rd
+++ b/man/prROC.Rd
@@ -2,34 +2,34 @@
% Please edit documentation in R/RcppExports.R, R/S3_PrecisionRecallCurve.R
\name{prROC.factor}
\alias{prROC.factor}
+\alias{weighted.prROC.factor}
\alias{prROC}
+\alias{weighted.prROC}
\title{Compute the \eqn{\text{reciever}} \eqn{\text{operator}} \eqn{\text{characteristics}}}
\usage{
-\method{prROC}{factor}(actual, response, micro = NULL, thresholds = NULL, na.rm = TRUE, ...)
+\method{prROC}{factor}(actual, response, thresholds = NULL, ...)
+
+\method{weighted.prROC}{factor}(actual, response, w, thresholds = NULL, ...)
prROC(...)
+
+weighted.prROC(...)
}
\arguments{
\item{actual}{A vector of <\link{factor}>- of \link{length} \eqn{n}, and \eqn{k} levels.}
\item{response}{A <\link{numeric}>-vector of \link{length} \eqn{n}. The estimated response probabilities.}
-\item{micro}{A <\link{logical}>-value of \link{length} \eqn{1} (default: \link{NULL}). If \link{TRUE} it returns the
-micro average across all \eqn{k} classes, if \link{FALSE} it returns the macro average.}
-
\item{thresholds}{An optional <\link{numeric}>-vector of non-zero \link{length} (default: \link{NULL}).}
-\item{na.rm}{A <\link{logical}> value of \link{length} \eqn{1} (default: \link{TRUE}). If \link{TRUE}, \link{NA} values are removed from the computation.
-This argument is only relevant when \code{micro != NULL}.
-When \code{na.rm = TRUE}, the computation corresponds to \code{sum(c(1, 2, NA), na.rm = TRUE) / length(na.omit(c(1, 2, NA)))}.
-When \code{na.rm = FALSE}, the computation corresponds to \code{sum(c(1, 2, NA), na.rm = TRUE) / length(c(1, 2, NA))}.}
-
\item{...}{Arguments passed into other methods.}
+
+\item{w}{A <\link{numeric}>-vector of \link{length} \eqn{n}. \link{NULL} by default.}
}
\value{
A \link{data.frame} on the following form,
-\item{thresholds}{<\link{numeric}> Thresholds used to determine \code{\link[=recall]{recall()}} and \code{\link[=precision]{precision()}}}
+\item{threshold}{<\link{numeric}> Thresholds used to determine \code{\link[=recall]{recall()}} and \code{\link[=precision]{precision()}}}
\item{level}{<\link{character}> The level of the actual <\link{factor}>}
\item{label}{<\link{character}> The levels of the actual <\link{factor}>}
\item{recall}{<\link{numeric}> The recall}
@@ -153,6 +153,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -176,6 +177,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -196,6 +198,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/precision.Rd b/man/precision.Rd
index e777ac75..9317bef3 100644
--- a/man/precision.Rd
+++ b/man/precision.Rd
@@ -186,6 +186,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -209,6 +210,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -229,6 +231,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/rae.Rd b/man/rae.Rd
index bd491090..9b3486c6 100644
--- a/man/rae.Rd
+++ b/man/rae.Rd
@@ -84,6 +84,7 @@ Other Regression:
\code{\link{pinball.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -96,6 +97,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -116,6 +118,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/recall.Rd b/man/recall.Rd
index 8bfb7a20..a40f4dc1 100644
--- a/man/recall.Rd
+++ b/man/recall.Rd
@@ -201,6 +201,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -224,6 +225,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -244,6 +246,7 @@ Other Supervised Learning:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/rmse.Rd b/man/rmse.Rd
index 29ac5d74..879c8fa3 100644
--- a/man/rmse.Rd
+++ b/man/rmse.Rd
@@ -84,6 +84,7 @@ Other Regression:
\code{\link{pinball.numeric}()},
\code{\link{rae.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -96,6 +97,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -116,6 +118,7 @@ Other Supervised Learning:
\code{\link{rae.numeric}()},
\code{\link{recall.factor}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/rmsle.Rd b/man/rmsle.Rd
index d829463d..2a549b2b 100644
--- a/man/rmsle.Rd
+++ b/man/rmsle.Rd
@@ -84,6 +84,7 @@ Other Regression:
\code{\link{pinball.numeric}()},
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -96,6 +97,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -116,6 +118,7 @@ Other Supervised Learning:
\code{\link{rae.numeric}()},
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/rrmse.Rd b/man/rrmse.Rd
new file mode 100644
index 00000000..ca6fe3de
--- /dev/null
+++ b/man/rrmse.Rd
@@ -0,0 +1,134 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/RcppExports.R,
+% R/S3_RelativeRootMeanSquaredError.R
+\name{rrmse.numeric}
+\alias{rrmse.numeric}
+\alias{weighted.rrmse.numeric}
+\alias{rrmse}
+\alias{weighted.rrmse}
+\title{Compute the \eqn{\text{relative}} \eqn{\text{root}} \eqn{\text{mean}} \eqn{\text{squared}} \eqn{\text{error}}}
+\usage{
+\method{rrmse}{numeric}(actual, predicted, normalization = 1L, ...)
+
+\method{weighted.rrmse}{numeric}(actual, predicted, w, normalization = 1L, ...)
+
+rrmse(...)
+
+weighted.rrmse(...)
+}
+\arguments{
+\item{actual}{A <\link{numeric}>-vector of \link{length} \eqn{n}. The observed (continuous) response variable.}
+
+\item{predicted}{A <\link{numeric}>-vector of \link{length} \eqn{n}. The estimated (continuous) response variable.}
+
+\item{normalization}{A <\link{numeric}>-value of \link{length} \eqn{1} (default: \eqn{1}). \eqn{0}: \link{mean}-normalization, \eqn{1}: \link{range}-normalization, \eqn{2}: \link{IQR}-normalization.}
+
+\item{...}{Arguments passed into other methods.}
+
+\item{w}{A <\link{numeric}>-vector of \link{length} \eqn{n}. The weight assigned to each observation in the data.}
+}
+\value{
+A <\link{numeric}> vector of \link{length} 1.
+}
+\description{
+The \code{\link[=rrmse]{rrmse()}}-function computes the \href{https://en.wikipedia.org/wiki/Root-mean-square_deviation}{Relative Root Mean Squared Error} between
+the observed and predicted <\link{numeric}> vectors. The \code{\link[=weighted.rrmse]{weighted.rrmse()}} function computes the weighted Relative Root Mean Squared Error.
+}
+\section{Calculation}{
+
+
+The metric is calculated as,
+
+\deqn{
+ \frac{RMSE}{\gamma}
+}
+
+Where \eqn{\gamma} is the normalization factor.
+}
+
+\examples{
+# 1) fit a linear
+# regression
+model <- lm(
+ mpg ~ .,
+ data = mtcars
+)
+
+# 1.1) define actual
+# and predicted values
+# to measure performance
+actual <- mtcars$mpg
+predicted <- fitted(model)
+
+# 2) evaluate in-sample model
+# performance using Relative Root Mean Squared Error (RRMSE)
+cat(
+ "IQR Relative Root Mean Squared Error", rrmse(
+ actual = actual,
+ predicted = predicted,
+ normalization = 2
+ ),
+ "IQR Relative Root Mean Squared Error (weighted)", weighted.rrmse(
+ actual = actual,
+ predicted = predicted,
+ w = mtcars$mpg/mean(mtcars$mpg),
+ normalization = 2
+ ),
+ sep = "\n"
+)
+
+}
+\seealso{
+Other Regression:
+\code{\link{ccc.numeric}()},
+\code{\link{huberloss.numeric}()},
+\code{\link{mae.numeric}()},
+\code{\link{mape.numeric}()},
+\code{\link{mpe.numeric}()},
+\code{\link{mse.numeric}()},
+\code{\link{pinball.numeric}()},
+\code{\link{rae.numeric}()},
+\code{\link{rmse.numeric}()},
+\code{\link{rmsle.numeric}()},
+\code{\link{rrse.numeric}()},
+\code{\link{rsq.numeric}()},
+\code{\link{smape.numeric}()}
+
+Other Supervised Learning:
+\code{\link{ROC.factor}()},
+\code{\link{accuracy.factor}()},
+\code{\link{baccuracy.factor}()},
+\code{\link{ccc.numeric}()},
+\code{\link{ckappa.factor}()},
+\code{\link{cmatrix.factor}()},
+\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
+\code{\link{fbeta.factor}()},
+\code{\link{fdr.factor}()},
+\code{\link{fer.factor}()},
+\code{\link{fpr.factor}()},
+\code{\link{huberloss.numeric}()},
+\code{\link{jaccard.factor}()},
+\code{\link{mae.numeric}()},
+\code{\link{mape.numeric}()},
+\code{\link{mcc.factor}()},
+\code{\link{mpe.numeric}()},
+\code{\link{mse.numeric}()},
+\code{\link{nlr.factor}()},
+\code{\link{npv.factor}()},
+\code{\link{pinball.numeric}()},
+\code{\link{plr.factor}()},
+\code{\link{prROC.factor}()},
+\code{\link{precision.factor}()},
+\code{\link{rae.numeric}()},
+\code{\link{recall.factor}()},
+\code{\link{rmse.numeric}()},
+\code{\link{rmsle.numeric}()},
+\code{\link{rrse.numeric}()},
+\code{\link{rsq.numeric}()},
+\code{\link{smape.numeric}()},
+\code{\link{specificity.factor}()},
+\code{\link{zerooneloss.factor}()}
+}
+\concept{Regression}
+\concept{Supervised Learning}
diff --git a/man/rrse.Rd b/man/rrse.Rd
index 632e302a..b6b5f400 100644
--- a/man/rrse.Rd
+++ b/man/rrse.Rd
@@ -58,28 +58,19 @@ model <- lm(
actual <- mtcars$mpg
predicted <- fitted(model)
-
-# 2) calculate the metric
-# with delta 0.5
-huberloss(
- actual = actual,
- predicted = predicted,
- delta = 0.5
-)
-
-# 3) caclulate weighted
-# metric using arbitrary weights
-w <- rbeta(
- n = 1e3,
- shape1 = 10,
- shape2 = 2
-)
-
-huberloss(
- actual = actual,
- predicted = predicted,
- delta = 0.5,
- w = w
+# 2) evaluate in-sample model
+# performance using Relative Root Squared Errror (RRSE)
+cat(
+ "Relative Root Squared Errror", rrse(
+ actual = actual,
+ predicted = predicted,
+ ),
+ "Relative Root Squared Errror (weighted)", weighted.rrse(
+ actual = actual,
+ predicted = predicted,
+ w = mtcars$mpg/mean(mtcars$mpg)
+ ),
+ sep = "\n"
)
}
\seealso{
@@ -94,6 +85,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()}
@@ -105,6 +97,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -126,6 +119,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
\code{\link{specificity.factor}()},
diff --git a/man/rsq.Rd b/man/rsq.Rd
index d9b81f3c..2ed536a1 100644
--- a/man/rsq.Rd
+++ b/man/rsq.Rd
@@ -89,6 +89,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{smape.numeric}()}
@@ -100,6 +101,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -121,6 +123,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{smape.numeric}()},
\code{\link{specificity.factor}()},
diff --git a/man/smape.Rd b/man/smape.Rd
index 357c359f..d4da7795 100644
--- a/man/smape.Rd
+++ b/man/smape.Rd
@@ -85,6 +85,7 @@ Other Regression:
\code{\link{rae.numeric}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()}
@@ -96,6 +97,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -117,6 +119,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{specificity.factor}()},
diff --git a/man/specificity.Rd b/man/specificity.Rd
index a5158d8b..024d9967 100644
--- a/man/specificity.Rd
+++ b/man/specificity.Rd
@@ -202,6 +202,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -225,6 +226,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -246,6 +248,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/man/zerooneloss.Rd b/man/zerooneloss.Rd
index 312cdc80..31d13ac3 100644
--- a/man/zerooneloss.Rd
+++ b/man/zerooneloss.Rd
@@ -143,6 +143,7 @@ Other Classification:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -166,6 +167,7 @@ Other Supervised Learning:
\code{\link{ckappa.factor}()},
\code{\link{cmatrix.factor}()},
\code{\link{dor.factor}()},
+\code{\link{entropy.factor}()},
\code{\link{fbeta.factor}()},
\code{\link{fdr.factor}()},
\code{\link{fer.factor}()},
@@ -187,6 +189,7 @@ Other Supervised Learning:
\code{\link{recall.factor}()},
\code{\link{rmse.numeric}()},
\code{\link{rmsle.numeric}()},
+\code{\link{rrmse.numeric}()},
\code{\link{rrse.numeric}()},
\code{\link{rsq.numeric}()},
\code{\link{smape.numeric}()},
diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp
index 0baad8d4..7925bbb0 100644
--- a/src/RcppExports.cpp
+++ b/src/RcppExports.cpp
@@ -11,732 +11,789 @@ Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif
-// accuracy
-NumericVector accuracy(const IntegerVector& actual, const IntegerVector& predicted);
-RcppExport SEXP _SLmetrics_accuracy(SEXP actualSEXP, SEXP predictedSEXP) {
+// Accuracy
+Rcpp::NumericVector Accuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_Accuracy(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- rcpp_result_gen = Rcpp::wrap(accuracy(actual, predicted));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ rcpp_result_gen = Rcpp::wrap(Accuracy(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weighted_accuracy
-NumericVector weighted_accuracy(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w);
-RcppExport SEXP _SLmetrics_weighted_accuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+// weighted_Accuracy
+Rcpp::NumericVector weighted_Accuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_weighted_Accuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_accuracy(actual, predicted, w));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_Accuracy(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// accuracy_cmatrix
-NumericVector accuracy_cmatrix(const NumericMatrix& x);
-RcppExport SEXP _SLmetrics_accuracy_cmatrix(SEXP xSEXP) {
+// cmatrix_Accuracy
+Rcpp::NumericVector cmatrix_Accuracy(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_Accuracy(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- rcpp_result_gen = Rcpp::wrap(accuracy_cmatrix(x));
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Accuracy(x));
return rcpp_result_gen;
END_RCPP
}
-// baccuracy
-NumericVector baccuracy(const IntegerVector& actual, const IntegerVector& predicted, const bool& adjust, bool na_rm);
-RcppExport SEXP _SLmetrics_baccuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
+// BalancedAccuracy
+Rcpp::NumericVector BalancedAccuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const bool& adjust, bool na_rm);
+RcppExport SEXP _SLmetrics_BalancedAccuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< const bool& >::type adjust(adjustSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(baccuracy(actual, predicted, adjust, na_rm));
+ rcpp_result_gen = Rcpp::wrap(BalancedAccuracy(actual, predicted, adjust, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_baccuracy
-NumericVector weighted_baccuracy(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, const bool& adjust, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_baccuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
+// weighted_BalancedAccuracy
+Rcpp::NumericVector weighted_BalancedAccuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, const bool& adjust, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_BalancedAccuracy(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< const bool& >::type adjust(adjustSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_baccuracy(actual, predicted, w, adjust, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_BalancedAccuracy(actual, predicted, w, adjust, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// baccuracy_cmatrix
-NumericVector baccuracy_cmatrix(const NumericMatrix& x, const bool& adjust, bool na_rm);
-RcppExport SEXP _SLmetrics_baccuracy_cmatrix(SEXP xSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
+// cmatrix_BalancedAccuracy
+Rcpp::NumericVector cmatrix_BalancedAccuracy(const NumericMatrix& x, const bool& adjust, bool na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_BalancedAccuracy(SEXP xSEXP, SEXP adjustSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< const bool& >::type adjust(adjustSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(baccuracy_cmatrix(x, adjust, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_BalancedAccuracy(x, adjust, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// ckappa
-NumericVector ckappa(const IntegerVector& actual, const IntegerVector& predicted, const double& beta);
-RcppExport SEXP _SLmetrics_ckappa(SEXP actualSEXP, SEXP predictedSEXP, SEXP betaSEXP) {
+// CohensKappa
+Rcpp::NumericVector CohensKappa(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const double& beta);
+RcppExport SEXP _SLmetrics_CohensKappa(SEXP actualSEXP, SEXP predictedSEXP, SEXP betaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- rcpp_result_gen = Rcpp::wrap(ckappa(actual, predicted, beta));
+ rcpp_result_gen = Rcpp::wrap(CohensKappa(actual, predicted, beta));
return rcpp_result_gen;
END_RCPP
}
-// weighted_ckappa
-NumericVector weighted_ckappa(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, const double& beta);
-RcppExport SEXP _SLmetrics_weighted_ckappa(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP betaSEXP) {
+// weighted_CohensKappa
+Rcpp::NumericVector weighted_CohensKappa(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, const double& beta);
+RcppExport SEXP _SLmetrics_weighted_CohensKappa(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP betaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_ckappa(actual, predicted, w, beta));
+ rcpp_result_gen = Rcpp::wrap(weighted_CohensKappa(actual, predicted, w, beta));
return rcpp_result_gen;
END_RCPP
}
-// ckappa_cmatrix
-NumericVector ckappa_cmatrix(const NumericMatrix& x, const double& beta);
-RcppExport SEXP _SLmetrics_ckappa_cmatrix(SEXP xSEXP, SEXP betaSEXP) {
+// cmatrix_CohensKappa
+Rcpp::NumericVector cmatrix_CohensKappa(const Rcpp::NumericMatrix& x, const double& beta);
+RcppExport SEXP _SLmetrics_cmatrix_CohensKappa(SEXP xSEXP, SEXP betaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- rcpp_result_gen = Rcpp::wrap(ckappa_cmatrix(x, beta));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_CohensKappa(x, beta));
return rcpp_result_gen;
END_RCPP
}
-// cmatrix
-Rcpp::NumericMatrix cmatrix(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::Nullable& w);
-RcppExport SEXP _SLmetrics_cmatrix(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+// UnweightedConfusionMatrix
+Rcpp::NumericMatrix UnweightedConfusionMatrix(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_UnweightedConfusionMatrix(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const Rcpp::Nullable& >::type w(wSEXP);
- rcpp_result_gen = Rcpp::wrap(cmatrix(actual, predicted, w));
+ rcpp_result_gen = Rcpp::wrap(UnweightedConfusionMatrix(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// dor
-NumericVector dor(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro);
-RcppExport SEXP _SLmetrics_dor(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP) {
+// WeightedConfusionMatrix
+Rcpp::NumericMatrix WeightedConfusionMatrix(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_WeightedConfusionMatrix(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(WeightedConfusionMatrix(actual, predicted, w));
+ return rcpp_result_gen;
+END_RCPP
+}
+// CrossEntropy
+double CrossEntropy(const IntegerVector& actual, const NumericMatrix& response, const bool normalize);
+RcppExport SEXP _SLmetrics_CrossEntropy(SEXP actualSEXP, SEXP responseSEXP, SEXP normalizeSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(dor(actual, predicted, micro));
+ Rcpp::traits::input_parameter< const NumericMatrix& >::type response(responseSEXP);
+ Rcpp::traits::input_parameter< const bool >::type normalize(normalizeSEXP);
+ rcpp_result_gen = Rcpp::wrap(CrossEntropy(actual, response, normalize));
return rcpp_result_gen;
END_RCPP
}
-// weighted_dor
-NumericVector weighted_dor(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro);
-RcppExport SEXP _SLmetrics_weighted_dor(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP) {
+// weighted_CrossEntropy
+double weighted_CrossEntropy(const IntegerVector& actual, const NumericMatrix& response, const NumericVector& w, const bool normalize);
+RcppExport SEXP _SLmetrics_weighted_CrossEntropy(SEXP actualSEXP, SEXP responseSEXP, SEXP wSEXP, SEXP normalizeSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const NumericMatrix& >::type response(responseSEXP);
Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_dor(actual, predicted, w, micro));
+ Rcpp::traits::input_parameter< const bool >::type normalize(normalizeSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_CrossEntropy(actual, response, w, normalize));
return rcpp_result_gen;
END_RCPP
}
-// dor_cmatrix
-NumericVector dor_cmatrix(const NumericMatrix& x, Nullable micro);
-RcppExport SEXP _SLmetrics_dor_cmatrix(SEXP xSEXP, SEXP microSEXP) {
+// LogLoss
+double LogLoss(const IntegerVector& actual, const NumericMatrix& response, const bool normalize);
+RcppExport SEXP _SLmetrics_LogLoss(SEXP actualSEXP, SEXP responseSEXP, SEXP normalizeSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(dor_cmatrix(x, micro));
+ Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const NumericMatrix& >::type response(responseSEXP);
+ Rcpp::traits::input_parameter< const bool >::type normalize(normalizeSEXP);
+ rcpp_result_gen = Rcpp::wrap(LogLoss(actual, response, normalize));
return rcpp_result_gen;
END_RCPP
}
-// fbeta
-NumericVector fbeta(const IntegerVector& actual, const IntegerVector& predicted, const double& beta, Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_fbeta(SEXP actualSEXP, SEXP predictedSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_LogLoss
+double weighted_LogLoss(const IntegerVector& actual, const NumericMatrix& response, const NumericVector& w, const bool normalize);
+RcppExport SEXP _SLmetrics_weighted_LogLoss(SEXP actualSEXP, SEXP responseSEXP, SEXP wSEXP, SEXP normalizeSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const NumericMatrix& >::type response(responseSEXP);
+ Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< const bool >::type normalize(normalizeSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_LogLoss(actual, response, w, normalize));
+ return rcpp_result_gen;
+END_RCPP
+}
+// DiagnosticOddsRatio
+Rcpp::NumericVector DiagnosticOddsRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_DiagnosticOddsRatio(SEXP actualSEXP, SEXP predictedSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ rcpp_result_gen = Rcpp::wrap(DiagnosticOddsRatio(actual, predicted));
+ return rcpp_result_gen;
+END_RCPP
+}
+// weighted_DiagnosticOddsRatio
+Rcpp::NumericVector weighted_DiagnosticOddsRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_weighted_DiagnosticOddsRatio(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_DiagnosticOddsRatio(actual, predicted, w));
+ return rcpp_result_gen;
+END_RCPP
+}
+// cmatrix_DiagnosticOddsRatio
+Rcpp::NumericVector cmatrix_DiagnosticOddsRatio(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_DiagnosticOddsRatio(SEXP xSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ rcpp_result_gen = Rcpp::wrap(cmatrix_DiagnosticOddsRatio(x));
+ return rcpp_result_gen;
+END_RCPP
+}
+// FBetaScore
+Rcpp::NumericVector FBetaScore(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const double& beta, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_FBetaScore(SEXP actualSEXP, SEXP predictedSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fbeta(actual, predicted, beta, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(FBetaScore(actual, predicted, beta, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_fbeta
-NumericVector weighted_fbeta(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, const double& beta, Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_fbeta(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_FBetaScore
+Rcpp::NumericVector weighted_FBetaScore(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, const double& beta, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_FBetaScore(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_fbeta(actual, predicted, w, beta, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_FBetaScore(actual, predicted, w, beta, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fbeta_cmatrix
-NumericVector fbeta_cmatrix(const NumericMatrix& x, const double& beta, Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_fbeta_cmatrix(SEXP xSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_FBetaScore
+Rcpp::NumericVector cmatrix_FBetaScore(const Rcpp::NumericMatrix& x, const double& beta, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_FBetaScore(SEXP xSEXP, SEXP betaSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< const double& >::type beta(betaSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fbeta_cmatrix(x, beta, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_FBetaScore(x, beta, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fdr
-NumericVector fdr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fdr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// FalseDiscoveryRate
+Rcpp::NumericVector FalseDiscoveryRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_FalseDiscoveryRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fdr(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(FalseDiscoveryRate(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_fdr
-NumericVector weighted_fdr(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_fdr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_FalseDiscoveryRate
+Rcpp::NumericVector weighted_FalseDiscoveryRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_FalseDiscoveryRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_fdr(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_FalseDiscoveryRate(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fdr_cmatrix
-NumericVector fdr_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fdr_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_FalseDiscoveryRate
+Rcpp::NumericVector cmatrix_FalseDiscoveryRate(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_FalseDiscoveryRate(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fdr_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_FalseDiscoveryRate(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fer
-NumericVector fer(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fer(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// FalseOmissionRate
+Rcpp::NumericVector FalseOmissionRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_FalseOmissionRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fer(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(FalseOmissionRate(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_fer
-NumericVector weighted_fer(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_fer(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_FalseOmissionRate
+Rcpp::NumericVector weighted_FalseOmissionRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_FalseOmissionRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_fer(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_FalseOmissionRate(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fer_cmatrix
-NumericVector fer_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fer_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_FalseOmissionRate
+Rcpp::NumericVector cmatrix_FalseOmissionRate(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_FalseOmissionRate(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fer_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_FalseOmissionRate(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fpr
-NumericVector fpr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fpr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// FalsePositiveRate
+Rcpp::NumericVector FalsePositiveRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_FalsePositiveRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fpr(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(FalsePositiveRate(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_fpr
-NumericVector weighted_fpr(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_fpr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_FalsePositiveRate
+Rcpp::NumericVector weighted_FalsePositiveRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_FalsePositiveRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_fpr(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_FalsePositiveRate(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fpr_cmatrix
-NumericVector fpr_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fpr_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_FalsePositiveRate
+Rcpp::NumericVector cmatrix_FalsePositiveRate(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_FalsePositiveRate(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fpr_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_FalsePositiveRate(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fallout
-NumericVector fallout(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fallout(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// Fallout
+Rcpp::NumericVector Fallout(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_Fallout(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fallout(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Fallout(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_fallout
-NumericVector weighted_fallout(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_fallout(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Fallout
+Rcpp::NumericVector weighted_Fallout(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_Fallout(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_fallout(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Fallout(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fallout_cmatrix
-NumericVector fallout_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_fallout_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Fallout
+Rcpp::NumericVector cmatrix_Fallout(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Fallout(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(fallout_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Fallout(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// fmi
-Rcpp::NumericVector fmi(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
-RcppExport SEXP _SLmetrics_fmi(SEXP actualSEXP, SEXP predictedSEXP) {
+// FowlkesMallowsIndex
+Rcpp::NumericVector FowlkesMallowsIndex(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_FowlkesMallowsIndex(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- rcpp_result_gen = Rcpp::wrap(fmi(actual, predicted));
+ rcpp_result_gen = Rcpp::wrap(FowlkesMallowsIndex(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// fmi_cmatrix
-Rcpp::NumericVector fmi_cmatrix(const NumericMatrix& x);
-RcppExport SEXP _SLmetrics_fmi_cmatrix(SEXP xSEXP) {
+// cmatrix_FowlkesMallowsIndexClass
+Rcpp::NumericVector cmatrix_FowlkesMallowsIndexClass(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_FowlkesMallowsIndexClass(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- rcpp_result_gen = Rcpp::wrap(fmi_cmatrix(x));
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ rcpp_result_gen = Rcpp::wrap(cmatrix_FowlkesMallowsIndexClass(x));
return rcpp_result_gen;
END_RCPP
}
-// jaccard
-NumericVector jaccard(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_jaccard(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// JaccardIndex
+Rcpp::NumericVector JaccardIndex(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_JaccardIndex(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(jaccard(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(JaccardIndex(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_jaccard
-NumericVector weighted_jaccard(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_jaccard(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_JaccardIndex
+Rcpp::NumericVector weighted_JaccardIndex(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_JaccardIndex(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_jaccard(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_JaccardIndex(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// jaccard_cmatrix
-NumericVector jaccard_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_jaccard_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_JaccardIndex
+Rcpp::NumericVector cmatrix_JaccardIndex(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_JaccardIndex(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(jaccard_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_JaccardIndex(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// csi
-NumericVector csi(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_csi(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// CriticalSuccessIndex
+Rcpp::NumericVector CriticalSuccessIndex(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_CriticalSuccessIndex(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(csi(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(CriticalSuccessIndex(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_csi
-NumericVector weighted_csi(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_csi(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_CriticalSuccessIndex
+Rcpp::NumericVector weighted_CriticalSuccessIndex(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_CriticalSuccessIndex(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_csi(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_CriticalSuccessIndex(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// csi_cmatrix
-NumericVector csi_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_csi_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_CriticalSuccessIndex
+Rcpp::NumericVector cmatrix_CriticalSuccessIndex(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_CriticalSuccessIndex(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(csi_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_CriticalSuccessIndex(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tscore
-NumericVector tscore(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tscore(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// ThreatScore
+Rcpp::NumericVector ThreatScore(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_ThreatScore(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tscore(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(ThreatScore(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_tscore
-NumericVector weighted_tscore(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_tscore(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_ThreatScore
+Rcpp::NumericVector weighted_ThreatScore(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_ThreatScore(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_tscore(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_ThreatScore(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tscore_cmatrix
-NumericVector tscore_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tscore_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_ThreatScore
+Rcpp::NumericVector cmatrix_ThreatScore(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_ThreatScore(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tscore_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_ThreatScore(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// mcc
-Rcpp::NumericVector mcc(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
-RcppExport SEXP _SLmetrics_mcc(SEXP actualSEXP, SEXP predictedSEXP) {
+// MatthewsCorrelationCoefficient
+Rcpp::NumericVector MatthewsCorrelationCoefficient(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_MatthewsCorrelationCoefficient(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- rcpp_result_gen = Rcpp::wrap(mcc(actual, predicted));
+ rcpp_result_gen = Rcpp::wrap(MatthewsCorrelationCoefficient(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weigthed_mcc
-Rcpp::NumericVector weigthed_mcc(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector w);
-RcppExport SEXP _SLmetrics_weigthed_mcc(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+// weigthed_MatthewsCorrelationCoefficient
+Rcpp::NumericVector weigthed_MatthewsCorrelationCoefficient(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector w);
+RcppExport SEXP _SLmetrics_weigthed_MatthewsCorrelationCoefficient(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< const Rcpp::NumericVector >::type w(wSEXP);
- rcpp_result_gen = Rcpp::wrap(weigthed_mcc(actual, predicted, w));
+ rcpp_result_gen = Rcpp::wrap(weigthed_MatthewsCorrelationCoefficient(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// mcc_cmatrix
-Rcpp::NumericVector mcc_cmatrix(const Rcpp::NumericMatrix& x);
-RcppExport SEXP _SLmetrics_mcc_cmatrix(SEXP xSEXP) {
+// cmatrix_MatthewsCorrelationCoefficient
+Rcpp::NumericVector cmatrix_MatthewsCorrelationCoefficient(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_MatthewsCorrelationCoefficient(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
- rcpp_result_gen = Rcpp::wrap(mcc_cmatrix(x));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_MatthewsCorrelationCoefficient(x));
return rcpp_result_gen;
END_RCPP
}
-// phi
-Rcpp::NumericVector phi(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
-RcppExport SEXP _SLmetrics_phi(SEXP actualSEXP, SEXP predictedSEXP) {
+// PhiCoefficient
+Rcpp::NumericVector PhiCoefficient(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_PhiCoefficient(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- rcpp_result_gen = Rcpp::wrap(phi(actual, predicted));
+ rcpp_result_gen = Rcpp::wrap(PhiCoefficient(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weighted_phi
-Rcpp::NumericVector weighted_phi(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector w);
-RcppExport SEXP _SLmetrics_weighted_phi(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+// weighted_PhiCoefficient
+Rcpp::NumericVector weighted_PhiCoefficient(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector w);
+RcppExport SEXP _SLmetrics_weighted_PhiCoefficient(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< const Rcpp::NumericVector >::type w(wSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_phi(actual, predicted, w));
+ rcpp_result_gen = Rcpp::wrap(weighted_PhiCoefficient(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// phi_cmatrix
-Rcpp::NumericVector phi_cmatrix(const Rcpp::NumericMatrix& x);
-RcppExport SEXP _SLmetrics_phi_cmatrix(SEXP xSEXP) {
+// cmatrix_PhiCoefficient
+Rcpp::NumericVector cmatrix_PhiCoefficient(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_PhiCoefficient(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
- rcpp_result_gen = Rcpp::wrap(phi_cmatrix(x));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_PhiCoefficient(x));
return rcpp_result_gen;
END_RCPP
}
-// nlr
-NumericVector nlr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro);
-RcppExport SEXP _SLmetrics_nlr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP) {
+// NegativeLikelihoodRatio
+Rcpp::NumericVector NegativeLikelihoodRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_NegativeLikelihoodRatio(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(nlr(actual, predicted, micro));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ rcpp_result_gen = Rcpp::wrap(NegativeLikelihoodRatio(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weighted_nlr
-NumericVector weighted_nlr(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro);
-RcppExport SEXP _SLmetrics_weighted_nlr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP) {
+// weighted_NegativeLikelihoodRatio
+Rcpp::NumericVector weighted_NegativeLikelihoodRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_weighted_NegativeLikelihoodRatio(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_nlr(actual, predicted, w, micro));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_NegativeLikelihoodRatio(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// nlr_cmatrix
-NumericVector nlr_cmatrix(const NumericMatrix& x, Nullable micro);
-RcppExport SEXP _SLmetrics_nlr_cmatrix(SEXP xSEXP, SEXP microSEXP) {
+// cmatrix_NegativeLikelihoodRatio
+Rcpp::NumericVector cmatrix_NegativeLikelihoodRatio(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_NegativeLikelihoodRatio(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(nlr_cmatrix(x, micro));
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ rcpp_result_gen = Rcpp::wrap(cmatrix_NegativeLikelihoodRatio(x));
return rcpp_result_gen;
END_RCPP
}
-// npv
-NumericVector npv(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_npv(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// NegativePredictitveValue
+Rcpp::NumericVector NegativePredictitveValue(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_NegativePredictitveValue(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(npv(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(NegativePredictitveValue(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_npv
-NumericVector weighted_npv(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_npv(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_NegativePredictitveValue
+Rcpp::NumericVector weighted_NegativePredictitveValue(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_NegativePredictitveValue(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_npv(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_NegativePredictitveValue(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// npv_cmatrix
-NumericVector npv_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_npv_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_NegativePredictitveValue
+Rcpp::NumericVector cmatrix_NegativePredictitveValue(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_NegativePredictitveValue(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(npv_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_NegativePredictitveValue(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// plr
-NumericVector plr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro);
-RcppExport SEXP _SLmetrics_plr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP) {
+// PositiveLikelihoodRatio
+Rcpp::NumericVector PositiveLikelihoodRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_PositiveLikelihoodRatio(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(plr(actual, predicted, micro));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ rcpp_result_gen = Rcpp::wrap(PositiveLikelihoodRatio(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weighted_plr
-NumericVector weighted_plr(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro);
-RcppExport SEXP _SLmetrics_weighted_plr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP) {
+// weighted_PositiveLikelihoodRatio
+Rcpp::NumericVector weighted_PositiveLikelihoodRatio(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_weighted_PositiveLikelihoodRatio(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_plr(actual, predicted, w, micro));
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_PositiveLikelihoodRatio(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// plr_cmatrix
-NumericVector plr_cmatrix(const NumericMatrix& x, Nullable micro);
-RcppExport SEXP _SLmetrics_plr_cmatrix(SEXP xSEXP, SEXP microSEXP) {
+// cmatrix_PositiveLikelihoodRatio
+Rcpp::NumericVector cmatrix_PositiveLikelihoodRatio(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_PositiveLikelihoodRatio(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
- rcpp_result_gen = Rcpp::wrap(plr_cmatrix(x, micro));
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ rcpp_result_gen = Rcpp::wrap(cmatrix_PositiveLikelihoodRatio(x));
return rcpp_result_gen;
END_RCPP
}
-// precision
-Rcpp::NumericVector precision(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_precision(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// Precision
+Rcpp::NumericVector Precision(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_Precision(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -744,13 +801,13 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(precision(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Precision(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_precision
-Rcpp::NumericVector weighted_precision(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_precision(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Precision
+Rcpp::NumericVector weighted_Precision(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_Precision(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -759,26 +816,26 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_precision(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Precision(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// precision_cmatrix
-Rcpp::NumericVector precision_cmatrix(const NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_precision_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Precision
+Rcpp::NumericVector cmatrix_Precision(const NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Precision(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(precision_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Precision(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// ppv
-Rcpp::NumericVector ppv(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_ppv(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// PositivePredictiveValue
+Rcpp::NumericVector PositivePredictiveValue(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_PositivePredictiveValue(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -786,13 +843,13 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(ppv(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(PositivePredictiveValue(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_ppv
-Rcpp::NumericVector weighted_ppv(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_ppv(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_PositivePredictiveValue
+Rcpp::NumericVector weighted_PositivePredictiveValue(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_PositivePredictiveValue(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -801,41 +858,53 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_ppv(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_PositivePredictiveValue(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// ppv_cmatrix
-Rcpp::NumericVector ppv_cmatrix(const NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_ppv_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_PositivePredictiveValue
+Rcpp::NumericVector cmatrix_PositivePredictiveValue(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_PositivePredictiveValue(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(ppv_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_PositivePredictiveValue(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// prROC
-Rcpp::DataFrame prROC(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, Nullable micro, Rcpp::Nullable thresholds, const bool& na_rm);
-RcppExport SEXP _SLmetrics_prROC(SEXP actualSEXP, SEXP responseSEXP, SEXP microSEXP, SEXP thresholdsSEXP, SEXP na_rmSEXP) {
+// PrecisionRecallCurve
+Rcpp::DataFrame PrecisionRecallCurve(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, Rcpp::Nullable thresholds);
+RcppExport SEXP _SLmetrics_PrecisionRecallCurve(SEXP actualSEXP, SEXP responseSEXP, SEXP thresholdsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type response(responseSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type thresholds(thresholdsSEXP);
- Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(prROC(actual, response, micro, thresholds, na_rm));
+ rcpp_result_gen = Rcpp::wrap(PrecisionRecallCurve(actual, response, thresholds));
+ return rcpp_result_gen;
+END_RCPP
+}
+// weighted_PrecisionRecallCurve
+Rcpp::DataFrame weighted_PrecisionRecallCurve(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, const Rcpp::NumericVector& w, Rcpp::Nullable thresholds);
+RcppExport SEXP _SLmetrics_weighted_PrecisionRecallCurve(SEXP actualSEXP, SEXP responseSEXP, SEXP wSEXP, SEXP thresholdsSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type response(responseSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type thresholds(thresholdsSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_PrecisionRecallCurve(actual, response, w, thresholds));
return rcpp_result_gen;
END_RCPP
}
-// recall
-Rcpp::NumericVector recall(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_recall(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// Recall
+Rcpp::NumericVector Recall(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_Recall(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -843,13 +912,13 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(recall(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Recall(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_recall
-Rcpp::NumericVector weighted_recall(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_recall(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Recall
+Rcpp::NumericVector weighted_Recall(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_Recall(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -858,26 +927,26 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_recall(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Recall(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// recall_cmatrix
-Rcpp::NumericVector recall_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_recall_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Recall
+Rcpp::NumericVector cmatrix_Recall(const NumericMatrix& x, Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Recall(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(recall_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Recall(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// sensitivity
-Rcpp::NumericVector sensitivity(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_sensitivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// Sensitivity
+Rcpp::NumericVector Sensitivity(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_Sensitivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -885,13 +954,13 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(sensitivity(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Sensitivity(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_sensitivity
-Rcpp::NumericVector weighted_sensitivity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_sensitivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Sensitivity
+Rcpp::NumericVector weighted_Sensitivity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_Sensitivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -900,26 +969,26 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_sensitivity(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Sensitivity(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// sensitivity_cmatrix
-Rcpp::NumericVector sensitivity_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_sensitivity_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Sensitivity
+Rcpp::NumericVector cmatrix_Sensitivity(const NumericMatrix& x, Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Sensitivity(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(sensitivity_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Sensitivity(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tpr
-Rcpp::NumericVector tpr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tpr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// TruePositiveRate
+Rcpp::NumericVector TruePositiveRate(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_TruePositiveRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -927,13 +996,13 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tpr(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(TruePositiveRate(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_tpr
-Rcpp::NumericVector weighted_tpr(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
-RcppExport SEXP _SLmetrics_weighted_tpr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_TruePositiveRate
+Rcpp::NumericVector weighted_TruePositiveRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, bool na_rm);
+RcppExport SEXP _SLmetrics_weighted_TruePositiveRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
@@ -942,20 +1011,20 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_tpr(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_TruePositiveRate(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tpr_cmatrix
-Rcpp::NumericVector tpr_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tpr_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_TruePositiveRate
+Rcpp::NumericVector cmatrix_TruePositiveRate(const NumericMatrix& x, Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_TruePositiveRate(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tpr_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_TruePositiveRate(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
@@ -972,180 +1041,192 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
-// ROC
-Rcpp::DataFrame ROC(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, Nullable micro, Rcpp::Nullable thresholds, const bool& na_rm);
-RcppExport SEXP _SLmetrics_ROC(SEXP actualSEXP, SEXP responseSEXP, SEXP microSEXP, SEXP thresholdsSEXP, SEXP na_rmSEXP) {
+// RecieverOperatorCharacteristics
+Rcpp::DataFrame RecieverOperatorCharacteristics(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, Rcpp::Nullable thresholds);
+RcppExport SEXP _SLmetrics_RecieverOperatorCharacteristics(SEXP actualSEXP, SEXP responseSEXP, SEXP thresholdsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type response(responseSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< Rcpp::Nullable >::type thresholds(thresholdsSEXP);
- Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(ROC(actual, response, micro, thresholds, na_rm));
+ rcpp_result_gen = Rcpp::wrap(RecieverOperatorCharacteristics(actual, response, thresholds));
return rcpp_result_gen;
END_RCPP
}
-// specificity
-NumericVector specificity(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_specificity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_RecieverOperatorCharacteristics
+Rcpp::DataFrame weighted_RecieverOperatorCharacteristics(const Rcpp::IntegerVector& actual, const Rcpp::NumericVector& response, const Rcpp::NumericVector& w, Rcpp::Nullable thresholds);
+RcppExport SEXP _SLmetrics_weighted_RecieverOperatorCharacteristics(SEXP actualSEXP, SEXP responseSEXP, SEXP wSEXP, SEXP thresholdsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type response(responseSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type thresholds(thresholdsSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_RecieverOperatorCharacteristics(actual, response, w, thresholds));
+ return rcpp_result_gen;
+END_RCPP
+}
+// Specificity
+Rcpp::NumericVector Specificity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_Specificity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(specificity(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Specificity(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_specificity
-NumericVector weighted_specificity(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_specificity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Specificity
+Rcpp::NumericVector weighted_Specificity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_Specificity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_specificity(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Specificity(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// specificity_cmatrix
-NumericVector specificity_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_specificity_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Specificity
+Rcpp::NumericVector cmatrix_Specificity(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Specificity(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(specificity_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Specificity(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tnr
-NumericVector tnr(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tnr(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// TrueNegativeRate
+Rcpp::NumericVector TrueNegativeRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_TrueNegativeRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tnr(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(TrueNegativeRate(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_tnr
-NumericVector weighted_tnr(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_tnr(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_TrueNegativeRate
+Rcpp::NumericVector weighted_TrueNegativeRate(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_TrueNegativeRate(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_tnr(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_TrueNegativeRate(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// tnr_cmatrix
-NumericVector tnr_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_tnr_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_TrueNegativeRate
+Rcpp::NumericVector cmatrix_TrueNegativeRate(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_TrueNegativeRate(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(tnr_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_TrueNegativeRate(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// selectivity
-NumericVector selectivity(const IntegerVector& actual, const IntegerVector& predicted, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_selectivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// Selectivity
+Rcpp::NumericVector Selectivity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_Selectivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(selectivity(actual, predicted, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(Selectivity(actual, predicted, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// weighted_selectivity
-NumericVector weighted_selectivity(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_weighted_selectivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// weighted_Selectivity
+Rcpp::NumericVector weighted_Selectivity(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_weighted_Selectivity(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const IntegerVector& >::type actual(actualSEXP);
- Rcpp::traits::input_parameter< const IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_selectivity(actual, predicted, w, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(weighted_Selectivity(actual, predicted, w, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// selectivity_cmatrix
-NumericVector selectivity_cmatrix(const NumericMatrix& x, Nullable micro, const bool& na_rm);
-RcppExport SEXP _SLmetrics_selectivity_cmatrix(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
+// cmatrix_Selectivity
+Rcpp::NumericVector cmatrix_Selectivity(const Rcpp::NumericMatrix& x, Rcpp::Nullable micro, const bool& na_rm);
+RcppExport SEXP _SLmetrics_cmatrix_Selectivity(SEXP xSEXP, SEXP microSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
- Rcpp::traits::input_parameter< const NumericMatrix& >::type x(xSEXP);
- Rcpp::traits::input_parameter< Nullable >::type micro(microSEXP);
+ Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
+ Rcpp::traits::input_parameter< Rcpp::Nullable >::type micro(microSEXP);
Rcpp::traits::input_parameter< const bool& >::type na_rm(na_rmSEXP);
- rcpp_result_gen = Rcpp::wrap(selectivity_cmatrix(x, micro, na_rm));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_Selectivity(x, micro, na_rm));
return rcpp_result_gen;
END_RCPP
}
-// zerooneloss
-Rcpp::NumericVector zerooneloss(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
-RcppExport SEXP _SLmetrics_zerooneloss(SEXP actualSEXP, SEXP predictedSEXP) {
+// ZeroOneLoss
+Rcpp::NumericVector ZeroOneLoss(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted);
+RcppExport SEXP _SLmetrics_ZeroOneLoss(SEXP actualSEXP, SEXP predictedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- rcpp_result_gen = Rcpp::wrap(zerooneloss(actual, predicted));
+ rcpp_result_gen = Rcpp::wrap(ZeroOneLoss(actual, predicted));
return rcpp_result_gen;
END_RCPP
}
-// weighted_zerooneloss
-Rcpp::NumericVector weighted_zerooneloss(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const NumericVector& w);
-RcppExport SEXP _SLmetrics_weighted_zerooneloss(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
+// weighted_ZeroOneLoss
+Rcpp::NumericVector weighted_ZeroOneLoss(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w);
+RcppExport SEXP _SLmetrics_weighted_ZeroOneLoss(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type actual(actualSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type predicted(predictedSEXP);
- Rcpp::traits::input_parameter< const NumericVector& >::type w(wSEXP);
- rcpp_result_gen = Rcpp::wrap(weighted_zerooneloss(actual, predicted, w));
+ Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type w(wSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_ZeroOneLoss(actual, predicted, w));
return rcpp_result_gen;
END_RCPP
}
-// zerooneloss_cmatrix
-Rcpp::NumericVector zerooneloss_cmatrix(const Rcpp::NumericMatrix& x);
-RcppExport SEXP _SLmetrics_zerooneloss_cmatrix(SEXP xSEXP) {
+// cmatrix_ZeroOneLoss
+Rcpp::NumericVector cmatrix_ZeroOneLoss(const Rcpp::NumericMatrix& x);
+RcppExport SEXP _SLmetrics_cmatrix_ZeroOneLoss(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::NumericMatrix& >::type x(xSEXP);
- rcpp_result_gen = Rcpp::wrap(zerooneloss_cmatrix(x));
+ rcpp_result_gen = Rcpp::wrap(cmatrix_ZeroOneLoss(x));
return rcpp_result_gen;
END_RCPP
}
@@ -1384,6 +1465,33 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
+// RelativeRootMeanSquaredError
+double RelativeRootMeanSquaredError(const std::vector& actual, const std::vector& predicted, const int& normalization);
+RcppExport SEXP _SLmetrics_RelativeRootMeanSquaredError(SEXP actualSEXP, SEXP predictedSEXP, SEXP normalizationSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const std::vector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const std::vector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const int& >::type normalization(normalizationSEXP);
+ rcpp_result_gen = Rcpp::wrap(RelativeRootMeanSquaredError(actual, predicted, normalization));
+ return rcpp_result_gen;
+END_RCPP
+}
+// weighted_RelativeRootMeanSquaredError
+double weighted_RelativeRootMeanSquaredError(const std::vector& actual, const std::vector& predicted, const std::vector w, const int& normalization);
+RcppExport SEXP _SLmetrics_weighted_RelativeRootMeanSquaredError(SEXP actualSEXP, SEXP predictedSEXP, SEXP wSEXP, SEXP normalizationSEXP) {
+BEGIN_RCPP
+ Rcpp::RObject rcpp_result_gen;
+ Rcpp::RNGScope rcpp_rngScope_gen;
+ Rcpp::traits::input_parameter< const std::vector& >::type actual(actualSEXP);
+ Rcpp::traits::input_parameter< const std::vector& >::type predicted(predictedSEXP);
+ Rcpp::traits::input_parameter< const std::vector >::type w(wSEXP);
+ Rcpp::traits::input_parameter< const int& >::type normalization(normalizationSEXP);
+ rcpp_result_gen = Rcpp::wrap(weighted_RelativeRootMeanSquaredError(actual, predicted, w, normalization));
+ return rcpp_result_gen;
+END_RCPP
+}
// rmse
double rmse(const std::vector& actual, const std::vector& predicted);
RcppExport SEXP _SLmetrics_rmse(SEXP actualSEXP, SEXP predictedSEXP) {
@@ -1486,90 +1594,97 @@ END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
- {"_SLmetrics_accuracy", (DL_FUNC) &_SLmetrics_accuracy, 2},
- {"_SLmetrics_weighted_accuracy", (DL_FUNC) &_SLmetrics_weighted_accuracy, 3},
- {"_SLmetrics_accuracy_cmatrix", (DL_FUNC) &_SLmetrics_accuracy_cmatrix, 1},
- {"_SLmetrics_baccuracy", (DL_FUNC) &_SLmetrics_baccuracy, 4},
- {"_SLmetrics_weighted_baccuracy", (DL_FUNC) &_SLmetrics_weighted_baccuracy, 5},
- {"_SLmetrics_baccuracy_cmatrix", (DL_FUNC) &_SLmetrics_baccuracy_cmatrix, 3},
- {"_SLmetrics_ckappa", (DL_FUNC) &_SLmetrics_ckappa, 3},
- {"_SLmetrics_weighted_ckappa", (DL_FUNC) &_SLmetrics_weighted_ckappa, 4},
- {"_SLmetrics_ckappa_cmatrix", (DL_FUNC) &_SLmetrics_ckappa_cmatrix, 2},
- {"_SLmetrics_cmatrix", (DL_FUNC) &_SLmetrics_cmatrix, 3},
- {"_SLmetrics_dor", (DL_FUNC) &_SLmetrics_dor, 3},
- {"_SLmetrics_weighted_dor", (DL_FUNC) &_SLmetrics_weighted_dor, 4},
- {"_SLmetrics_dor_cmatrix", (DL_FUNC) &_SLmetrics_dor_cmatrix, 2},
- {"_SLmetrics_fbeta", (DL_FUNC) &_SLmetrics_fbeta, 5},
- {"_SLmetrics_weighted_fbeta", (DL_FUNC) &_SLmetrics_weighted_fbeta, 6},
- {"_SLmetrics_fbeta_cmatrix", (DL_FUNC) &_SLmetrics_fbeta_cmatrix, 4},
- {"_SLmetrics_fdr", (DL_FUNC) &_SLmetrics_fdr, 4},
- {"_SLmetrics_weighted_fdr", (DL_FUNC) &_SLmetrics_weighted_fdr, 5},
- {"_SLmetrics_fdr_cmatrix", (DL_FUNC) &_SLmetrics_fdr_cmatrix, 3},
- {"_SLmetrics_fer", (DL_FUNC) &_SLmetrics_fer, 4},
- {"_SLmetrics_weighted_fer", (DL_FUNC) &_SLmetrics_weighted_fer, 5},
- {"_SLmetrics_fer_cmatrix", (DL_FUNC) &_SLmetrics_fer_cmatrix, 3},
- {"_SLmetrics_fpr", (DL_FUNC) &_SLmetrics_fpr, 4},
- {"_SLmetrics_weighted_fpr", (DL_FUNC) &_SLmetrics_weighted_fpr, 5},
- {"_SLmetrics_fpr_cmatrix", (DL_FUNC) &_SLmetrics_fpr_cmatrix, 3},
- {"_SLmetrics_fallout", (DL_FUNC) &_SLmetrics_fallout, 4},
- {"_SLmetrics_weighted_fallout", (DL_FUNC) &_SLmetrics_weighted_fallout, 5},
- {"_SLmetrics_fallout_cmatrix", (DL_FUNC) &_SLmetrics_fallout_cmatrix, 3},
- {"_SLmetrics_fmi", (DL_FUNC) &_SLmetrics_fmi, 2},
- {"_SLmetrics_fmi_cmatrix", (DL_FUNC) &_SLmetrics_fmi_cmatrix, 1},
- {"_SLmetrics_jaccard", (DL_FUNC) &_SLmetrics_jaccard, 4},
- {"_SLmetrics_weighted_jaccard", (DL_FUNC) &_SLmetrics_weighted_jaccard, 5},
- {"_SLmetrics_jaccard_cmatrix", (DL_FUNC) &_SLmetrics_jaccard_cmatrix, 3},
- {"_SLmetrics_csi", (DL_FUNC) &_SLmetrics_csi, 4},
- {"_SLmetrics_weighted_csi", (DL_FUNC) &_SLmetrics_weighted_csi, 5},
- {"_SLmetrics_csi_cmatrix", (DL_FUNC) &_SLmetrics_csi_cmatrix, 3},
- {"_SLmetrics_tscore", (DL_FUNC) &_SLmetrics_tscore, 4},
- {"_SLmetrics_weighted_tscore", (DL_FUNC) &_SLmetrics_weighted_tscore, 5},
- {"_SLmetrics_tscore_cmatrix", (DL_FUNC) &_SLmetrics_tscore_cmatrix, 3},
- {"_SLmetrics_mcc", (DL_FUNC) &_SLmetrics_mcc, 2},
- {"_SLmetrics_weigthed_mcc", (DL_FUNC) &_SLmetrics_weigthed_mcc, 3},
- {"_SLmetrics_mcc_cmatrix", (DL_FUNC) &_SLmetrics_mcc_cmatrix, 1},
- {"_SLmetrics_phi", (DL_FUNC) &_SLmetrics_phi, 2},
- {"_SLmetrics_weighted_phi", (DL_FUNC) &_SLmetrics_weighted_phi, 3},
- {"_SLmetrics_phi_cmatrix", (DL_FUNC) &_SLmetrics_phi_cmatrix, 1},
- {"_SLmetrics_nlr", (DL_FUNC) &_SLmetrics_nlr, 3},
- {"_SLmetrics_weighted_nlr", (DL_FUNC) &_SLmetrics_weighted_nlr, 4},
- {"_SLmetrics_nlr_cmatrix", (DL_FUNC) &_SLmetrics_nlr_cmatrix, 2},
- {"_SLmetrics_npv", (DL_FUNC) &_SLmetrics_npv, 4},
- {"_SLmetrics_weighted_npv", (DL_FUNC) &_SLmetrics_weighted_npv, 5},
- {"_SLmetrics_npv_cmatrix", (DL_FUNC) &_SLmetrics_npv_cmatrix, 3},
- {"_SLmetrics_plr", (DL_FUNC) &_SLmetrics_plr, 3},
- {"_SLmetrics_weighted_plr", (DL_FUNC) &_SLmetrics_weighted_plr, 4},
- {"_SLmetrics_plr_cmatrix", (DL_FUNC) &_SLmetrics_plr_cmatrix, 2},
- {"_SLmetrics_precision", (DL_FUNC) &_SLmetrics_precision, 4},
- {"_SLmetrics_weighted_precision", (DL_FUNC) &_SLmetrics_weighted_precision, 5},
- {"_SLmetrics_precision_cmatrix", (DL_FUNC) &_SLmetrics_precision_cmatrix, 3},
- {"_SLmetrics_ppv", (DL_FUNC) &_SLmetrics_ppv, 4},
- {"_SLmetrics_weighted_ppv", (DL_FUNC) &_SLmetrics_weighted_ppv, 5},
- {"_SLmetrics_ppv_cmatrix", (DL_FUNC) &_SLmetrics_ppv_cmatrix, 3},
- {"_SLmetrics_prROC", (DL_FUNC) &_SLmetrics_prROC, 5},
- {"_SLmetrics_recall", (DL_FUNC) &_SLmetrics_recall, 4},
- {"_SLmetrics_weighted_recall", (DL_FUNC) &_SLmetrics_weighted_recall, 5},
- {"_SLmetrics_recall_cmatrix", (DL_FUNC) &_SLmetrics_recall_cmatrix, 3},
- {"_SLmetrics_sensitivity", (DL_FUNC) &_SLmetrics_sensitivity, 4},
- {"_SLmetrics_weighted_sensitivity", (DL_FUNC) &_SLmetrics_weighted_sensitivity, 5},
- {"_SLmetrics_sensitivity_cmatrix", (DL_FUNC) &_SLmetrics_sensitivity_cmatrix, 3},
- {"_SLmetrics_tpr", (DL_FUNC) &_SLmetrics_tpr, 4},
- {"_SLmetrics_weighted_tpr", (DL_FUNC) &_SLmetrics_weighted_tpr, 5},
- {"_SLmetrics_tpr_cmatrix", (DL_FUNC) &_SLmetrics_tpr_cmatrix, 3},
+ {"_SLmetrics_Accuracy", (DL_FUNC) &_SLmetrics_Accuracy, 2},
+ {"_SLmetrics_weighted_Accuracy", (DL_FUNC) &_SLmetrics_weighted_Accuracy, 3},
+ {"_SLmetrics_cmatrix_Accuracy", (DL_FUNC) &_SLmetrics_cmatrix_Accuracy, 1},
+ {"_SLmetrics_BalancedAccuracy", (DL_FUNC) &_SLmetrics_BalancedAccuracy, 4},
+ {"_SLmetrics_weighted_BalancedAccuracy", (DL_FUNC) &_SLmetrics_weighted_BalancedAccuracy, 5},
+ {"_SLmetrics_cmatrix_BalancedAccuracy", (DL_FUNC) &_SLmetrics_cmatrix_BalancedAccuracy, 3},
+ {"_SLmetrics_CohensKappa", (DL_FUNC) &_SLmetrics_CohensKappa, 3},
+ {"_SLmetrics_weighted_CohensKappa", (DL_FUNC) &_SLmetrics_weighted_CohensKappa, 4},
+ {"_SLmetrics_cmatrix_CohensKappa", (DL_FUNC) &_SLmetrics_cmatrix_CohensKappa, 2},
+ {"_SLmetrics_UnweightedConfusionMatrix", (DL_FUNC) &_SLmetrics_UnweightedConfusionMatrix, 2},
+ {"_SLmetrics_WeightedConfusionMatrix", (DL_FUNC) &_SLmetrics_WeightedConfusionMatrix, 3},
+ {"_SLmetrics_CrossEntropy", (DL_FUNC) &_SLmetrics_CrossEntropy, 3},
+ {"_SLmetrics_weighted_CrossEntropy", (DL_FUNC) &_SLmetrics_weighted_CrossEntropy, 4},
+ {"_SLmetrics_LogLoss", (DL_FUNC) &_SLmetrics_LogLoss, 3},
+ {"_SLmetrics_weighted_LogLoss", (DL_FUNC) &_SLmetrics_weighted_LogLoss, 4},
+ {"_SLmetrics_DiagnosticOddsRatio", (DL_FUNC) &_SLmetrics_DiagnosticOddsRatio, 2},
+ {"_SLmetrics_weighted_DiagnosticOddsRatio", (DL_FUNC) &_SLmetrics_weighted_DiagnosticOddsRatio, 3},
+ {"_SLmetrics_cmatrix_DiagnosticOddsRatio", (DL_FUNC) &_SLmetrics_cmatrix_DiagnosticOddsRatio, 1},
+ {"_SLmetrics_FBetaScore", (DL_FUNC) &_SLmetrics_FBetaScore, 5},
+ {"_SLmetrics_weighted_FBetaScore", (DL_FUNC) &_SLmetrics_weighted_FBetaScore, 6},
+ {"_SLmetrics_cmatrix_FBetaScore", (DL_FUNC) &_SLmetrics_cmatrix_FBetaScore, 4},
+ {"_SLmetrics_FalseDiscoveryRate", (DL_FUNC) &_SLmetrics_FalseDiscoveryRate, 4},
+ {"_SLmetrics_weighted_FalseDiscoveryRate", (DL_FUNC) &_SLmetrics_weighted_FalseDiscoveryRate, 5},
+ {"_SLmetrics_cmatrix_FalseDiscoveryRate", (DL_FUNC) &_SLmetrics_cmatrix_FalseDiscoveryRate, 3},
+ {"_SLmetrics_FalseOmissionRate", (DL_FUNC) &_SLmetrics_FalseOmissionRate, 4},
+ {"_SLmetrics_weighted_FalseOmissionRate", (DL_FUNC) &_SLmetrics_weighted_FalseOmissionRate, 5},
+ {"_SLmetrics_cmatrix_FalseOmissionRate", (DL_FUNC) &_SLmetrics_cmatrix_FalseOmissionRate, 3},
+ {"_SLmetrics_FalsePositiveRate", (DL_FUNC) &_SLmetrics_FalsePositiveRate, 4},
+ {"_SLmetrics_weighted_FalsePositiveRate", (DL_FUNC) &_SLmetrics_weighted_FalsePositiveRate, 5},
+ {"_SLmetrics_cmatrix_FalsePositiveRate", (DL_FUNC) &_SLmetrics_cmatrix_FalsePositiveRate, 3},
+ {"_SLmetrics_Fallout", (DL_FUNC) &_SLmetrics_Fallout, 4},
+ {"_SLmetrics_weighted_Fallout", (DL_FUNC) &_SLmetrics_weighted_Fallout, 5},
+ {"_SLmetrics_cmatrix_Fallout", (DL_FUNC) &_SLmetrics_cmatrix_Fallout, 3},
+ {"_SLmetrics_FowlkesMallowsIndex", (DL_FUNC) &_SLmetrics_FowlkesMallowsIndex, 2},
+ {"_SLmetrics_cmatrix_FowlkesMallowsIndexClass", (DL_FUNC) &_SLmetrics_cmatrix_FowlkesMallowsIndexClass, 1},
+ {"_SLmetrics_JaccardIndex", (DL_FUNC) &_SLmetrics_JaccardIndex, 4},
+ {"_SLmetrics_weighted_JaccardIndex", (DL_FUNC) &_SLmetrics_weighted_JaccardIndex, 5},
+ {"_SLmetrics_cmatrix_JaccardIndex", (DL_FUNC) &_SLmetrics_cmatrix_JaccardIndex, 3},
+ {"_SLmetrics_CriticalSuccessIndex", (DL_FUNC) &_SLmetrics_CriticalSuccessIndex, 4},
+ {"_SLmetrics_weighted_CriticalSuccessIndex", (DL_FUNC) &_SLmetrics_weighted_CriticalSuccessIndex, 5},
+ {"_SLmetrics_cmatrix_CriticalSuccessIndex", (DL_FUNC) &_SLmetrics_cmatrix_CriticalSuccessIndex, 3},
+ {"_SLmetrics_ThreatScore", (DL_FUNC) &_SLmetrics_ThreatScore, 4},
+ {"_SLmetrics_weighted_ThreatScore", (DL_FUNC) &_SLmetrics_weighted_ThreatScore, 5},
+ {"_SLmetrics_cmatrix_ThreatScore", (DL_FUNC) &_SLmetrics_cmatrix_ThreatScore, 3},
+ {"_SLmetrics_MatthewsCorrelationCoefficient", (DL_FUNC) &_SLmetrics_MatthewsCorrelationCoefficient, 2},
+ {"_SLmetrics_weigthed_MatthewsCorrelationCoefficient", (DL_FUNC) &_SLmetrics_weigthed_MatthewsCorrelationCoefficient, 3},
+ {"_SLmetrics_cmatrix_MatthewsCorrelationCoefficient", (DL_FUNC) &_SLmetrics_cmatrix_MatthewsCorrelationCoefficient, 1},
+ {"_SLmetrics_PhiCoefficient", (DL_FUNC) &_SLmetrics_PhiCoefficient, 2},
+ {"_SLmetrics_weighted_PhiCoefficient", (DL_FUNC) &_SLmetrics_weighted_PhiCoefficient, 3},
+ {"_SLmetrics_cmatrix_PhiCoefficient", (DL_FUNC) &_SLmetrics_cmatrix_PhiCoefficient, 1},
+ {"_SLmetrics_NegativeLikelihoodRatio", (DL_FUNC) &_SLmetrics_NegativeLikelihoodRatio, 2},
+ {"_SLmetrics_weighted_NegativeLikelihoodRatio", (DL_FUNC) &_SLmetrics_weighted_NegativeLikelihoodRatio, 3},
+ {"_SLmetrics_cmatrix_NegativeLikelihoodRatio", (DL_FUNC) &_SLmetrics_cmatrix_NegativeLikelihoodRatio, 1},
+ {"_SLmetrics_NegativePredictitveValue", (DL_FUNC) &_SLmetrics_NegativePredictitveValue, 4},
+ {"_SLmetrics_weighted_NegativePredictitveValue", (DL_FUNC) &_SLmetrics_weighted_NegativePredictitveValue, 5},
+ {"_SLmetrics_cmatrix_NegativePredictitveValue", (DL_FUNC) &_SLmetrics_cmatrix_NegativePredictitveValue, 3},
+ {"_SLmetrics_PositiveLikelihoodRatio", (DL_FUNC) &_SLmetrics_PositiveLikelihoodRatio, 2},
+ {"_SLmetrics_weighted_PositiveLikelihoodRatio", (DL_FUNC) &_SLmetrics_weighted_PositiveLikelihoodRatio, 3},
+ {"_SLmetrics_cmatrix_PositiveLikelihoodRatio", (DL_FUNC) &_SLmetrics_cmatrix_PositiveLikelihoodRatio, 1},
+ {"_SLmetrics_Precision", (DL_FUNC) &_SLmetrics_Precision, 4},
+ {"_SLmetrics_weighted_Precision", (DL_FUNC) &_SLmetrics_weighted_Precision, 5},
+ {"_SLmetrics_cmatrix_Precision", (DL_FUNC) &_SLmetrics_cmatrix_Precision, 3},
+ {"_SLmetrics_PositivePredictiveValue", (DL_FUNC) &_SLmetrics_PositivePredictiveValue, 4},
+ {"_SLmetrics_weighted_PositivePredictiveValue", (DL_FUNC) &_SLmetrics_weighted_PositivePredictiveValue, 5},
+ {"_SLmetrics_cmatrix_PositivePredictiveValue", (DL_FUNC) &_SLmetrics_cmatrix_PositivePredictiveValue, 3},
+ {"_SLmetrics_PrecisionRecallCurve", (DL_FUNC) &_SLmetrics_PrecisionRecallCurve, 3},
+ {"_SLmetrics_weighted_PrecisionRecallCurve", (DL_FUNC) &_SLmetrics_weighted_PrecisionRecallCurve, 4},
+ {"_SLmetrics_Recall", (DL_FUNC) &_SLmetrics_Recall, 4},
+ {"_SLmetrics_weighted_Recall", (DL_FUNC) &_SLmetrics_weighted_Recall, 5},
+ {"_SLmetrics_cmatrix_Recall", (DL_FUNC) &_SLmetrics_cmatrix_Recall, 3},
+ {"_SLmetrics_Sensitivity", (DL_FUNC) &_SLmetrics_Sensitivity, 4},
+ {"_SLmetrics_weighted_Sensitivity", (DL_FUNC) &_SLmetrics_weighted_Sensitivity, 5},
+ {"_SLmetrics_cmatrix_Sensitivity", (DL_FUNC) &_SLmetrics_cmatrix_Sensitivity, 3},
+ {"_SLmetrics_TruePositiveRate", (DL_FUNC) &_SLmetrics_TruePositiveRate, 4},
+ {"_SLmetrics_weighted_TruePositiveRate", (DL_FUNC) &_SLmetrics_weighted_TruePositiveRate, 5},
+ {"_SLmetrics_cmatrix_TruePositiveRate", (DL_FUNC) &_SLmetrics_cmatrix_TruePositiveRate, 3},
{"_SLmetrics_auc", (DL_FUNC) &_SLmetrics_auc, 3},
- {"_SLmetrics_ROC", (DL_FUNC) &_SLmetrics_ROC, 5},
- {"_SLmetrics_specificity", (DL_FUNC) &_SLmetrics_specificity, 4},
- {"_SLmetrics_weighted_specificity", (DL_FUNC) &_SLmetrics_weighted_specificity, 5},
- {"_SLmetrics_specificity_cmatrix", (DL_FUNC) &_SLmetrics_specificity_cmatrix, 3},
- {"_SLmetrics_tnr", (DL_FUNC) &_SLmetrics_tnr, 4},
- {"_SLmetrics_weighted_tnr", (DL_FUNC) &_SLmetrics_weighted_tnr, 5},
- {"_SLmetrics_tnr_cmatrix", (DL_FUNC) &_SLmetrics_tnr_cmatrix, 3},
- {"_SLmetrics_selectivity", (DL_FUNC) &_SLmetrics_selectivity, 4},
- {"_SLmetrics_weighted_selectivity", (DL_FUNC) &_SLmetrics_weighted_selectivity, 5},
- {"_SLmetrics_selectivity_cmatrix", (DL_FUNC) &_SLmetrics_selectivity_cmatrix, 3},
- {"_SLmetrics_zerooneloss", (DL_FUNC) &_SLmetrics_zerooneloss, 2},
- {"_SLmetrics_weighted_zerooneloss", (DL_FUNC) &_SLmetrics_weighted_zerooneloss, 3},
- {"_SLmetrics_zerooneloss_cmatrix", (DL_FUNC) &_SLmetrics_zerooneloss_cmatrix, 1},
+ {"_SLmetrics_RecieverOperatorCharacteristics", (DL_FUNC) &_SLmetrics_RecieverOperatorCharacteristics, 3},
+ {"_SLmetrics_weighted_RecieverOperatorCharacteristics", (DL_FUNC) &_SLmetrics_weighted_RecieverOperatorCharacteristics, 4},
+ {"_SLmetrics_Specificity", (DL_FUNC) &_SLmetrics_Specificity, 4},
+ {"_SLmetrics_weighted_Specificity", (DL_FUNC) &_SLmetrics_weighted_Specificity, 5},
+ {"_SLmetrics_cmatrix_Specificity", (DL_FUNC) &_SLmetrics_cmatrix_Specificity, 3},
+ {"_SLmetrics_TrueNegativeRate", (DL_FUNC) &_SLmetrics_TrueNegativeRate, 4},
+ {"_SLmetrics_weighted_TrueNegativeRate", (DL_FUNC) &_SLmetrics_weighted_TrueNegativeRate, 5},
+ {"_SLmetrics_cmatrix_TrueNegativeRate", (DL_FUNC) &_SLmetrics_cmatrix_TrueNegativeRate, 3},
+ {"_SLmetrics_Selectivity", (DL_FUNC) &_SLmetrics_Selectivity, 4},
+ {"_SLmetrics_weighted_Selectivity", (DL_FUNC) &_SLmetrics_weighted_Selectivity, 5},
+ {"_SLmetrics_cmatrix_Selectivity", (DL_FUNC) &_SLmetrics_cmatrix_Selectivity, 3},
+ {"_SLmetrics_ZeroOneLoss", (DL_FUNC) &_SLmetrics_ZeroOneLoss, 2},
+ {"_SLmetrics_weighted_ZeroOneLoss", (DL_FUNC) &_SLmetrics_weighted_ZeroOneLoss, 3},
+ {"_SLmetrics_cmatrix_ZeroOneLoss", (DL_FUNC) &_SLmetrics_cmatrix_ZeroOneLoss, 1},
{"_SLmetrics_rsq", (DL_FUNC) &_SLmetrics_rsq, 3},
{"_SLmetrics_weighted_rsq", (DL_FUNC) &_SLmetrics_weighted_rsq, 4},
{"_SLmetrics_ccc", (DL_FUNC) &_SLmetrics_ccc, 3},
@@ -1588,6 +1703,8 @@ static const R_CallMethodDef CallEntries[] = {
{"_SLmetrics_weighted_pinball", (DL_FUNC) &_SLmetrics_weighted_pinball, 5},
{"_SLmetrics_rae", (DL_FUNC) &_SLmetrics_rae, 2},
{"_SLmetrics_weighted_rae", (DL_FUNC) &_SLmetrics_weighted_rae, 3},
+ {"_SLmetrics_RelativeRootMeanSquaredError", (DL_FUNC) &_SLmetrics_RelativeRootMeanSquaredError, 3},
+ {"_SLmetrics_weighted_RelativeRootMeanSquaredError", (DL_FUNC) &_SLmetrics_weighted_RelativeRootMeanSquaredError, 4},
{"_SLmetrics_rmse", (DL_FUNC) &_SLmetrics_rmse, 2},
{"_SLmetrics_weighted_rmse", (DL_FUNC) &_SLmetrics_weighted_rmse, 3},
{"_SLmetrics_rmsle", (DL_FUNC) &_SLmetrics_rmsle, 2},
diff --git a/src/classification_Accuracy.cpp b/src/classification_Accuracy.cpp
index d5c921d5..1b25e697 100644
--- a/src/classification_Accuracy.cpp
+++ b/src/classification_Accuracy.cpp
@@ -8,25 +8,28 @@ using namespace Rcpp;
//' @method accuracy factor
//' @export
// [[Rcpp::export(accuracy.factor)]]
-NumericVector accuracy(const IntegerVector& actual, const IntegerVector& predicted) {
- AccuracyMetric foo; // Instantiate AccuracyMetric
- return classification_base(actual, predicted, foo);
+Rcpp::NumericVector Accuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted)
+{
+ AccuracyClass cook;
+ return recipe(cook, actual, predicted);
}
//' @rdname accuracy
//' @method weighted.accuracy factor
//' @export
// [[Rcpp::export(weighted.accuracy.factor)]]
-NumericVector weighted_accuracy(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w) {
- AccuracyMetric foo; // Instantiate AccuracyMetric
- return classification_base(actual, predicted, w, foo);
+Rcpp::NumericVector weighted_Accuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w)
+{
+ AccuracyClass cook;
+ return recipe(cook, actual, predicted, w);
}
//' @rdname accuracy
//' @method accuracy cmatrix
//' @export
// [[Rcpp::export(accuracy.cmatrix)]]
-NumericVector accuracy_cmatrix(const NumericMatrix& x) {
- AccuracyMetric foo; // Instantiate AccuracyMetric
- return classification_base(x, foo);
+Rcpp::NumericVector cmatrix_Accuracy(const Rcpp::NumericMatrix& x)
+{
+ AccuracyClass cook;
+ return recipe(cook, x);
}
diff --git a/src/classification_Accuracy.h b/src/classification_Accuracy.h
index 85299799..e689fec1 100644
--- a/src/classification_Accuracy.h
+++ b/src/classification_Accuracy.h
@@ -6,13 +6,9 @@
#define EIGEN_USE_MKL_ALL
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
-/*
- Simplified AccuracyMetric class:
- Calculates accuracy as (tp + tn) / N.
-*/
-class AccuracyMetric : public classification {
+class AccuracyClass : public classification {
public:
- // Compute overall accuracy
+
Rcpp::NumericVector compute(const Eigen::MatrixXd& matrix) const override {
// 0) set sizes
@@ -34,4 +30,4 @@ class AccuracyMetric : public classification {
}
};
-#endif // CLASSIFICATION_ACCURACY_H
+#endif
diff --git a/src/classification_BalancedAccuracy.cpp b/src/classification_BalancedAccuracy.cpp
index 2736abf8..cb23b672 100644
--- a/src/classification_BalancedAccuracy.cpp
+++ b/src/classification_BalancedAccuracy.cpp
@@ -8,25 +8,28 @@ using namespace Rcpp;
//' @method baccuracy factor
//' @export
// [[Rcpp::export(baccuracy.factor)]]
-NumericVector baccuracy(const IntegerVector& actual, const IntegerVector& predicted, const bool& adjust = false, bool na_rm = true) {
- BalancedAccuracyMetric foo; // Instantiate BalancedAccuracyMetric
- return classification_base(actual, predicted, foo, adjust, na_rm);
+Rcpp::NumericVector BalancedAccuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const bool& adjust = false, bool na_rm = true)
+{
+ BalancedAccuracyClass cook(adjust, na_rm);
+ return recipe(cook, actual, predicted);
}
//' @rdname baccuracy
//' @method weighted.baccuracy factor
//' @export
// [[Rcpp::export(weighted.baccuracy.factor)]]
-NumericVector weighted_baccuracy(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, const bool& adjust = false, bool na_rm = true) {
- BalancedAccuracyMetric foo; // Instantiate BalancedAccuracyMetric
- return classification_base(actual, predicted, w, foo, adjust, na_rm);
+Rcpp::NumericVector weighted_BalancedAccuracy(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, const bool& adjust = false, bool na_rm = true)
+{
+ BalancedAccuracyClass cook(adjust, na_rm);
+ return recipe(cook, actual, predicted, w);
}
//' @rdname baccuracy
//' @method baccuracy cmatrix
//' @export
// [[Rcpp::export(baccuracy.cmatrix)]]
-NumericVector baccuracy_cmatrix(const NumericMatrix& x, const bool& adjust = false, bool na_rm = true) {
- BalancedAccuracyMetric foo; // Instantiate BalancedAccuracyMetric
- return classification_base(x, foo, adjust, na_rm);
+Rcpp::NumericVector cmatrix_BalancedAccuracy(const NumericMatrix& x, const bool& adjust = false, bool na_rm = true)
+{
+ BalancedAccuracyClass cook(adjust, na_rm);
+ return recipe(cook, x);
}
diff --git a/src/classification_BalancedAccuracy.h b/src/classification_BalancedAccuracy.h
index 7a0f8ad8..febc3272 100644
--- a/src/classification_BalancedAccuracy.h
+++ b/src/classification_BalancedAccuracy.h
@@ -7,16 +7,18 @@
#define EIGEN_USE_MKL_ALL
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
-/*
- BalancedAccuracyMetric class:
- Calculates the average recall across classes,
- with an optional adjustment for chance agreement.
-*/
+class BalancedAccuracyClass : public classification {
+
+private:
+ bool adjust;
+ bool na_rm;
-class BalancedAccuracyMetric : public classification {
public:
+ // Constructor
+ BalancedAccuracyClass(bool adjust, bool na_rm)
+ : adjust(adjust), na_rm(na_rm) {}
- Rcpp::NumericVector compute(const Eigen::MatrixXd& matrix, bool adjust, bool na_rm) const override {
+ Rcpp::NumericVector compute(const Eigen::MatrixXd& matrix) const override {
// 0) define values
Eigen::ArrayXd output(1);
Eigen::ArrayXd tp(matrix.rows());
@@ -59,4 +61,4 @@ class BalancedAccuracyMetric : public classification {
};
-#endif // CLASSIFICATION_BALANCED_ACCURACY_H
+#endif
diff --git a/src/classification_CohensKappa.cpp b/src/classification_CohensKappa.cpp
index ffb44cbd..c815ebd4 100644
--- a/src/classification_CohensKappa.cpp
+++ b/src/classification_CohensKappa.cpp
@@ -8,25 +8,28 @@ using namespace Rcpp;
//' @method ckappa factor
//' @export
// [[Rcpp::export(ckappa.factor)]]
-NumericVector ckappa(const IntegerVector& actual, const IntegerVector& predicted, const double& beta = 0.0) {
- CohensKappaMetric foo; // Instantiate CohensKappaMetric
- return classification_base(actual, predicted, foo, beta);
+Rcpp::NumericVector CohensKappa(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const double& beta = 0.0)
+{
+ CohensKappaClass cook(beta);
+ return recipe(cook, actual, predicted);
}
//' @rdname ckappa
//' @method weighted.ckappa factor
//' @export
// [[Rcpp::export(weighted.ckappa.factor)]]
-NumericVector weighted_ckappa(const IntegerVector& actual, const IntegerVector& predicted, const NumericVector& w, const double& beta = 0.0) {
- CohensKappaMetric foo; // Instantiate CohensKappaMetric
- return classification_base(actual, predicted, w, foo, beta);
+Rcpp::NumericVector weighted_CohensKappa(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w, const double& beta = 0.0)
+{
+ CohensKappaClass cook(beta);
+ return recipe(cook, actual, predicted, w);
}
//' @rdname ckappa
//' @method ckappa cmatrix
//' @export
// [[Rcpp::export(ckappa.cmatrix)]]
-NumericVector ckappa_cmatrix(const NumericMatrix& x, const double& beta = 0.0) {
- CohensKappaMetric foo; // Instantiate CohensKappaMetric
- return classification_base(x, foo, beta);
+Rcpp::NumericVector cmatrix_CohensKappa(const Rcpp::NumericMatrix& x, const double& beta = 0.0)
+{
+ CohensKappaClass cook(beta);
+ return recipe(cook, x);
}
diff --git a/src/classification_CohensKappa.h b/src/classification_CohensKappa.h
index f5633cc7..d8cac7cc 100644
--- a/src/classification_CohensKappa.h
+++ b/src/classification_CohensKappa.h
@@ -6,72 +6,72 @@
#define EIGEN_USE_MKL_ALL
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
-/*
- * Calculation of Cohen's Kappa statistic
- * This class provides methods to compute the Cohen's Kappa with penalization.
- */
-class CohensKappaMetric : public classification {
-public:
- Rcpp::NumericVector compute(const Eigen::MatrixXd& matrix, double beta) const override {
-
- // 0) initialize containers
- Eigen::MatrixXd penalizing_matrix(matrix.cols(), matrix.cols());
- Eigen::VectorXd row_sum(matrix.cols()), col_sum(matrix.cols());
-
- // 1) populate the
- // matrix
- penalizing_matrix = penalizingMatrix(matrix.cols(), beta);
-
- // 2)
- double N = matrix.sum();
- double N_inv = 1.0 / N;
-
- // 3)
- row_sum = matrix.rowwise().sum();
- col_sum = matrix.colwise().sum();
-
- // 4) Calculate weighted disagreement (observed agreement with penalizing matrix)
- double n_disagree = (matrix.cwiseProduct(penalizing_matrix)).sum();
-
- // 5) Calculate expected agreement by chance (weighted)
- double n_chance = (row_sum * col_sum.transpose() * N_inv).cwiseProduct(penalizing_matrix).sum();
-
- // Step 5: Return penalized kappa statistic
- double kappa = 1.0 - (n_disagree / n_chance);
-
- return Rcpp::wrap(kappa);
-
- }
-
-private:
-
- inline __attribute__((always_inline)) Eigen::MatrixXd penalizingMatrix(const int& n, const double& power) const {
-
- /*
- Returns a diagonal matrix, with diag(0)
- */
-
- Eigen::MatrixXd matrix(n, n);
-
- double* mat_data = matrix.data();
-
- for (int i = 0; i < n; ++i) {
- for (int j = i; j < n; ++j) {
- double value = std::pow(std::abs(j - i), power);
-
- double* upper_elem = mat_data + i * n + j;
- double* lower_elem = mat_data + j * n + i;
- double* diag_elem = mat_data + i * n + i;
-
- *upper_elem = value;
- *lower_elem = value;
- *diag_elem = 0.0;
+class CohensKappaClass : public classification {
+
+ private:
+
+ double beta;
+
+ inline __attribute__((always_inline)) Eigen::MatrixXd penalizingMatrix(const int& n, const double& power) const {
+
+ Eigen::MatrixXd matrix(n, n);
+
+ double* mat_data = matrix.data();
+
+ for (int i = 0; i < n; ++i) {
+ for (int j = i; j < n; ++j) {
+ double value = std::pow(std::abs(j - i), power);
+
+ double* upper_elem = mat_data + i * n + j;
+ double* lower_elem = mat_data + j * n + i;
+ double* diag_elem = mat_data + i * n + i;
+
+ *upper_elem = value;
+ *lower_elem = value;
+ *diag_elem = 0.0;
+ }
}
- }
- return matrix;
+ return matrix;
- }
+ }
+
+
+ public:
+
+ CohensKappaClass(double beta)
+ : beta(beta) {}
+
+ Rcpp::NumericVector compute(const Eigen::MatrixXd& matrix) const override {
+
+ // 0) initialize containers
+ Eigen::MatrixXd penalizing_matrix(matrix.cols(), matrix.cols());
+ Eigen::VectorXd row_sum(matrix.cols()), col_sum(matrix.cols());
+
+ // 1) populate the
+ // matrix
+ penalizing_matrix = penalizingMatrix(matrix.cols(), beta);
+
+ // 2)
+ double N = matrix.sum();
+ double N_inv = 1.0 / N;
+
+ // 3)
+ row_sum = matrix.rowwise().sum();
+ col_sum = matrix.colwise().sum();
+
+ // 4) Calculate weighted disagreement (observed agreement with penalizing matrix)
+ double n_disagree = (matrix.cwiseProduct(penalizing_matrix)).sum();
+
+ // 5) Calculate expected agreement by chance (weighted)
+ double n_chance = (row_sum * col_sum.transpose() * N_inv).cwiseProduct(penalizing_matrix).sum();
+
+ // Step 5: Return penalized kappa statistic
+ double kappa = 1.0 - (n_disagree / n_chance);
+
+ return Rcpp::wrap(kappa);
+
+ }
};
diff --git a/src/classification_ConfusionMatrix.cpp b/src/classification_ConfusionMatrix.cpp
index 3ee71ac2..918971c4 100644
--- a/src/classification_ConfusionMatrix.cpp
+++ b/src/classification_ConfusionMatrix.cpp
@@ -1,6 +1,6 @@
// [[Rcpp::depends(RcppEigen)]]
#include
-#include "classification_Helpers.h"
+#include "classification_ConfusionMatrix.h"
#include
using namespace Rcpp;
@@ -8,39 +8,18 @@ using namespace Rcpp;
//' @method cmatrix factor
//' @export
// [[Rcpp::export(cmatrix.factor)]]
-Rcpp::NumericMatrix cmatrix(
- const Rcpp::IntegerVector& actual,
- const Rcpp::IntegerVector& predicted,
- const Rcpp::Nullable& w = R_NilValue) {
-
- // 1) declare the output matrix
- // compiler doesn't recognize it in if-statements
- Rcpp::NumericMatrix output;
-
- // 1.1) extract levels (classes)
- // from the actual-vector and the length
- Rcpp::CharacterVector levels = actual.attr("levels");
- int k = levels.length() + 1;
-
- // 2) Determine the weights
- // these are what determines
- // the content of the confusion matrix
- if (w.isNull()) {
-
- output = Rcpp::wrap(confusionMatrix(actual, predicted, k));
-
- } else {
-
- output = Rcpp::wrap(confusionMatrix(actual, predicted, k, w));
-
- }
-
- // 3) preare the matrix output
- // by adding column and rownames
- // and classes
- Rcpp::rownames(output) = levels;
- Rcpp::colnames(output) = levels;
- output.attr("class") = "cmatrix";
+Rcpp::NumericMatrix UnweightedConfusionMatrix(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted)
+{
+ ConfusionMatrixClass args(actual, predicted);
+ return args.constructMatrix();
+}
- return output;
+//' @rdname cmatrix
+//' @method weighted.cmatrix factor
+//' @export
+// [[Rcpp::export(weighted.cmatrix.factor)]]
+Rcpp::NumericMatrix WeightedConfusionMatrix(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted, const Rcpp::NumericVector& w)
+{
+ ConfusionMatrixClass args(actual, predicted);
+ return args.constructMatrix(w);
}
diff --git a/src/classification_ConfusionMatrix.h b/src/classification_ConfusionMatrix.h
new file mode 100644
index 00000000..dcda4f47
--- /dev/null
+++ b/src/classification_ConfusionMatrix.h
@@ -0,0 +1,111 @@
+#ifndef CLASSIFICATION_CONFUSION_MATRIX_H
+#define CLASSIFICATION_CONFUSION_MATRIX_H
+
+#include
+#include
+#define EIGEN_USE_MKL_ALL
+EIGEN_MAKE_ALIGNED_OPERATOR_NEW
+
+class ConfusionMatrixClass {
+ protected:
+ Rcpp::IntegerVector actual_;
+ Rcpp::IntegerVector predicted_;
+ Rcpp::CharacterVector levels_;
+ int k_;
+
+ void prepareLevels() {
+ levels_ = actual_.attr("levels");
+ k_ = levels_.length() + 1;
+ }
+
+ Rcpp::NumericMatrix finalizeMatrix(const Eigen::MatrixXd& matrix) const {
+ Rcpp::NumericMatrix output = Rcpp::wrap(matrix);
+ Rcpp::rownames(output) = levels_;
+ Rcpp::colnames(output) = levels_;
+ output.attr("class") = "cmatrix";
+ return output;
+ }
+
+
+ template
+ MatrixType computeMatrix() const {
+ MatrixType placeholder = MatrixType::Zero(k_, k_).eval();
+ const int n = actual_.size();
+
+ const int* actual_ptr = actual_.begin();
+ const int* predicted_ptr = predicted_.begin();
+ auto matrix_ptr = placeholder.data();
+
+ int i = 0;
+ for (; i <= n - 6; i += 6) {
+ ++matrix_ptr[predicted_ptr[i] * k_ + actual_ptr[i]];
+ ++matrix_ptr[predicted_ptr[i + 1] * k_ + actual_ptr[i + 1]];
+ ++matrix_ptr[predicted_ptr[i + 2] * k_ + actual_ptr[i + 2]];
+ ++matrix_ptr[predicted_ptr[i + 3] * k_ + actual_ptr[i + 3]];
+ ++matrix_ptr[predicted_ptr[i + 4] * k_ + actual_ptr[i + 4]];
+ ++matrix_ptr[predicted_ptr[i + 5] * k_ + actual_ptr[i + 5]];
+ }
+
+ for (; i < n; ++i) {
+ ++matrix_ptr[predicted_ptr[i] * k_ + actual_ptr[i]];
+ }
+
+ return placeholder.block(1, 1, k_ - 1, k_ - 1);
+ }
+
+ template
+ MatrixType computeMatrix(const Rcpp::NumericVector& weights) const {
+ MatrixType placeholder = MatrixType::Zero(k_, k_).eval();
+ const int n = actual_.size();
+
+ const int* actual_ptr = actual_.begin();
+ const int* predicted_ptr = predicted_.begin();
+ const double* weights_ptr = weights.begin();
+ auto matrix_ptr = placeholder.data();
+
+ int i = 0;
+ for (; i <= n - 6; i += 6) {
+ matrix_ptr[predicted_ptr[i] * k_ + actual_ptr[i]] += weights_ptr[i];
+ matrix_ptr[predicted_ptr[i + 1] * k_ + actual_ptr[i + 1]] += weights_ptr[i + 1];
+ matrix_ptr[predicted_ptr[i + 2] * k_ + actual_ptr[i + 2]] += weights_ptr[i + 2];
+ matrix_ptr[predicted_ptr[i + 3] * k_ + actual_ptr[i + 3]] += weights_ptr[i + 3];
+ matrix_ptr[predicted_ptr[i + 4] * k_ + actual_ptr[i + 4]] += weights_ptr[i + 4];
+ matrix_ptr[predicted_ptr[i + 5] * k_ + actual_ptr[i + 5]] += weights_ptr[i + 5];
+ }
+
+ for (; i < n; ++i) {
+ matrix_ptr[predicted_ptr[i] * k_ + actual_ptr[i]] += weights_ptr[i];
+ }
+
+ return placeholder.block(1, 1, k_ - 1, k_ - 1);
+ }
+
+ public:
+
+ ConfusionMatrixClass(const Rcpp::IntegerVector& actual, const Rcpp::IntegerVector& predicted)
+ : actual_(actual), predicted_(predicted) {
+ prepareLevels();}
+
+ /*
+ InputMatrix: An Eigen::MatrixXd passed internally to other classification functions
+ constructMatrix: A Rcpp::NumericMatrix passed directly to R
+ */
+
+ // Unweighted Confusion Matrices
+ Eigen::MatrixXd InputMatrix() const {
+ return computeMatrix();}
+
+ Rcpp::NumericMatrix constructMatrix() const {
+ Eigen::MatrixXd matrix = computeMatrix();
+ return finalizeMatrix(matrix);}
+
+ // Weighted Confusion Matrices
+ Eigen::MatrixXd InputMatrix(const Rcpp::NumericVector& weights) const {
+ return computeMatrix(weights);}
+
+ Rcpp::NumericMatrix constructMatrix(const Rcpp::NumericVector& weights) const {
+ Eigen::MatrixXd matrix = computeMatrix