perturb_dataset | R Documentation |
Given a boolean matrix, randomly add False Positives (FP), False Negatives (FN) and Missing data following user defined rates. In the final matrix, missing data is represented by the value 3.
perturb_dataset(dataset, FP_rate = 0, FN_rate = 0, MIS_rate = 0)
dataset |
a matrix/sparse matrix |
FP_rate |
False Positive rate |
FN_rate |
False Negative rate |
MIS_rate |
Missing Data rate |
Note that CIMICE does not support dataset with missing data natively, so using MIS_rate != 0 will then require some pre-processing.
the new, perturbed, matrix
require(dplyr) example_dataset() %>% make_generator_stub() %>% set_generator_edges( list( "D", "A, D", 1 , "A", "A, D", 1 , "A, D", "A, C, D", 1 , "A, D", "A, B, D", 1 , "Clonal", "D", 1 , "Clonal", "A", 1 , "D", "D", 1 , "A", "A", 1 , "A, D", "A, D", 1 , "A, C, D", "A, C, D", 1 , "A, B, D", "A, B, D", 1 , "Clonal", "Clonal", 1 )) %>% finalize_generator %>% simulate_generator(3, 10) %>% perturb_dataset(FP_rate = 0.01, FN_rate = 0.1, MIS_rate = 0.12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.