Description Usage Arguments Details Value References See Also Examples
View source: R/update_data_cat.R
update_data_cat
selects the sample to the labeled dataset according to
it's index
1 | update_data_cat(ind, splitted, data, train, labeled_ids, unlabeled_ids)
|
ind |
A numeric value denotes the index of selected sample. |
splitted |
A list containing the datasets which we will use in the categorical case. Note that the element of the splitted is the collections of samples from Classes 0 and Classes k. |
data |
A matrix denotes all the data including the labeled samples and the unlabeled samples. Note that the first column of the dataset is the response variable, that's the labels and the rest is the explanatory variables. |
train |
A matrix for the labeled samples. |
labeled_ids |
A numeric vector for the unique identification of the labeled dataset |
unlabeled_ids |
A numeric vector for the unique identification of the unlabeled dataset |
update_data_cat chooses the sample based on the index from all the training dataset if the data has no ordinal relation. Specifically, we remove the index of the choosed sample from the unlabeled dataset and add the index to the labeled dataset. Then, combine the selected sample with the existing training data set.
splitted |
a list containing the datasets which we add a new sample into it |
newY |
the label of the choosed sample |
train |
the dataset used for training the model after adding the new sample |
labeled_ids |
the id of the labeled dataset after updating |
unlabeled_ids |
the id of the unlabeled dataset after updating |
Li, J., Chen, Z., Wang, Z., & Chang, Y. I. (2020). Active learning in multiple-class classification problems via individualized binary models. Computational Statistics & Data Analysis, 145, 106911. doi:10.1016/j.csda.2020.106911
1 | ## For an example, see example(seq_cat_model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.