update_data_cat: Add the new sample into labeled dataset from unlabeled...

Description Usage Arguments Details Value References See Also Examples

View source: R/update_data_cat.R

Description

update_data_cat selects the sample to the labeled dataset according to it's index

Usage

1
update_data_cat(ind, splitted, data, train, labeled_ids, unlabeled_ids)

Arguments

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

Details

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.

Value

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

References

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

See Also

update_data_ord

Examples

1
## For an example, see example(seq_cat_model)

seqest documentation built on July 2, 2020, 2:28 a.m.