Description Usage Arguments Value Examples
View source: R/calculate_AUC_base.R
the base function of calculate_AUCs: build the model and calculate the AUCs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | calculate_AUC_base(
n01_all = c(800, 800),
n01_p = c(15, 15),
n_train_sets = c(c(15, 15), c(30, 30), c(60, 60), c(120, 120), c(150, 150)),
n01_test = c(300, 300),
seed = 1,
method = "pca2_mvnorm",
model = c("svm", "randomforest"),
func = NULL,
data_generation = list(dist = "t-distribution", sigma = list(class_0 = diag(5),
class_1 = diag(5)), df = c(10, 10), delta = c(rep(0, 5), rep(2, 5))),
data_input = NULL,
true_data_to_compare = 1
)
|
n01_all |
size of all data labeled as class 0/1. For example, n01_all=c(800,800) represents that the size of all data labeled as class 0 is 800 and the size of all data labeled as class 1 is also 800. |
n01_p |
size of pilot data labeled as class 0/1. For example, n01_p=c(15,15) represents that the size of pilot data labeled as class 0 is 15 and the size of pilot data labeled as class 1 is also 15. |
n_train_sets |
size sets of training data labeled as class 0/1. For example, n_train_sets=c(c(30,30),c(90,90),c(150,150)) represents that we try 3 different sets of training data and the training size of the first set is c(30,30). |
n01_test |
number of test data labeled as class 0/1. size of all data labeled as class 0/1. For example, n01_test=c(300,300) represents that the size of test data labeled as class 0 is 300 and the size of test data labeled as class 1 is also 300. |
seed |
the seed you want to use to run simulations. |
method |
Choose the method you want to use: "pca2_mvnorm" , "gaussian_copula" or "smote"( |
model |
base classification model.
|
func |
If you set "model" to "self", you have to pass your self-defined model function. This function should be able to take "x_train" and "y_train" as the first two inputs to train the model and then take "x_test" as the third input and return the predicted scores of x_test data. For example, |
data_generation |
a parameter list that you can tell the function about the distribution and parameters you want to use to generate the data.
|
data_input |
Its default value is NULL and the function will use the "data_generation" parameter to generate the data. If "data_input" is not NULL, the function will ignore the "data_generation" parameter and "n01_all" parameter, and use the "data_input" as the data.
Your "data_input" should be a list with "x_data" matrix and "y_data" matrix. For example, |
true_data_to_compare |
0/1 variable, whether to have the true data to compare with generated data (which could make the output matrix double): if input_data==NULL(run the simulations), we will generate the true data automatically and calculate the AUCs; if you give us the input_data, please make sure that you give us sufficient input data. |
Return the AUCs you want to calculate
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.