Description Usage Arguments Value See Also Examples
Estimates risk and error by applying a constructed classifier (an object of class abcrlda) to a given set of observations.
1 | risk_calculate(object, x_true, y_true)
|
object |
An object of class "abcrlda". |
x_true |
Matrix of values for x for which true class labels are known. |
y_true |
A numeric vector or factor of true class labels. Factor should have either two levels or be a vector with two distinct values.
If |
A list of parameters where
actual_err0 |
Error rate for class 0. |
actual_err1 |
Error rate for class 1. |
actual_errTotal |
Error rate overall. |
actual_normrisk |
Risk value normilized to be between 0 and 1. |
actual_risk |
Risk value without normilization. |
Other functions in the package:
abcrlda()
,
cross_validation()
,
da_risk_estimator()
,
grid_search()
,
predict.abcrlda()
1 2 3 4 5 6 7 | data(iris)
train_data <- iris[which(iris[, ncol(iris)] == "virginica" |
iris[, ncol(iris)] == "versicolor"), 1:4]
train_label <- factor(iris[which(iris[, ncol(iris)] == "virginica" |
iris[, ncol(iris)] == "versicolor"), 5])
model <- abcrlda(train_data, train_label, gamma = 0.5, cost = 0.75)
risk_calculate(model, train_data, train_label)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.