vaeac generates numerical values. This function converts categorical features to from numerics with class labels 1,2,...,K, to factors with the original and class labels.

vaeac_postprocess_data(data, vaeac_model_state_list)

Arguments

data

data.table containing the data generated by a vaeac model

vaeac_model_state_list

List. The returned list from the vaeac_preprocess_data function or a loaded checkpoint list of a saved vaeac object.

Value

data.table with the generated data from a vaeac model where the categorical features now have the original class names.

Author

Lars Henry Berge Olsen

Examples

if (FALSE) {
data <- data.table(matrix(rgamma(500 * 3, 2), ncol = 3))
preprocessed <- vaeac_preprocess_data(data)
preprocessed$data_preprocessed
postprocessed <- vaeac_postprocess_data(preprocessed$data_preprocessed, preprocessed)
postprocessed
all.equal(data, postprocessed)
}