Description Usage Arguments Value Reference See Also Examples
Constructs Asymptotically Bias-Corrected Regularized Linear Discriminant Analysis.
1 |
x |
Input matrix or data.frame of dimension |
y |
A numeric vector or factor of class labels. Factor should have either two levels or be
a vector with two distinct values.
If |
gamma |
Regularization parameter gamma in the ABC-RLDA discriminant function given by: W_ABCRLDA = gamma (x - (x0 + x1)/2) H (x0 - x1) + log(C_01/C_10) + omega_opt H = (I_p + gamma Sigma_hat)^-1 Formulas and derivations for parameters used in above equation can be found in the article under reference section. |
cost |
Parameter that controls the overall misclassification costs. This is a vector of length 1 or 2 where the first value is C_10 (represents the cost of assigning label 1 when the true label is 0) and the second value, if provided, is C_01 (represents the cost of assigning label 0 when the true label is 1). The default setting is c(0.5, 0.5), so both classes have equal misclassification costs If a single value is provided, it should be normalized to lie between 0 and 1 (but not including 0 or 1). This value will be assigned to C_10 while C_01 will be equal to 1 - C_10. |
bias_correction |
Takes in a boolean value.
If |
An object of class "abcrlda" is returned which can be used for class prediction (see predict()).
a |
Coefficient vector of a discriminant hyperplane: W(x) = a' x + m. |
m |
Intercept of discriminant hyperplane: W(x) = a'x + m. |
cost |
Vector of cost values that are used to construct ABC-RLDA. |
ncost |
Normalized cost such that C_10 + C_01 = 1. |
gamma |
Regularization parameter value used in ABC_RLDA discriminant function. |
lev |
Levels corresponding to the labels in y. |
A. Zollanvari, M. Abdirash, A. Dadlani and B. Abibullaev, "Asymptotically Bias-Corrected Regularized Linear Discriminant Analysis for Cost-Sensitive Binary Classification," in IEEE Signal Processing Letters, vol. 26, no. 9, pp. 1300-1304, Sept. 2019. doi: 10.1109/LSP.2019.2918485 URL: https://ieeexplore.ieee.org/document/8720003
Other functions in the package:
cross_validation()
,
da_risk_estimator()
,
grid_search()
,
predict.abcrlda()
,
risk_calculate()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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)
a <- predict(model, train_data)
# same params but more explicit
model <- abcrlda(train_data, train_label, gamma = 0.5, cost = c(0.75, 0.25))
b <- predict(model, train_data)
# same class costs ratio
model <- abcrlda(train_data, train_label, gamma = 0.5, cost = c(3, 1))
c <- predict(model, train_data)
# all this model will give the same predictions
all(a == b & a == c & b == c)
#' [1] TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.