Recm | R Documentation |
Recm Robust ensemble classifier machine (Recm)
Recm Robust ensemble classifier machine (Recm)
An object that holds data and an ensemble of classifiers The ensemble is composed of XGBoost classifiers trained on binarized labels.
A list of classifiers, each trained on a random sample of the training data.
name
the object's name
data_mode
string vector, dictates the types of data engineeering, acceptable values include combination of: original quartiles pairs ranks sigpairs
signatures
lists of variables, must be in data, that will be used together, and compared to other signatures
file_name
the data file
data
the data.table used to train and test
the
data column used as label, the target
data_split
numeric value indicating percent data to make into training data
train_data
the data.table used to train the ensemble
train_label
the vector used as the training label
test_data
the data.table used as test data
test_label
the vector used as test data labels
data_colnames
the column names used to train the models
unique_labels
the unique set of labels
the
ensemble of predictors
the
table of predictions, collecting from the ensbl list of predictors
the
table of predictions, collecting from the ensbl list of predictors
the
data column used as label, the target
the
ensemble of predictors
the
table of predictions, collecting from the ensbl list of predictors
the
table of predictions, collecting from the ensbl list of predictors
new()
Create a new 'Recm' object.
Recm$new(name = NA)
name
The object is named.
A new 'recm' object.
greet()
Creates a printable representation of the object.
Recm$greet()
A character string representing the object.
read_data()
Reads the data file.
Recm$read_data(file_name, sep, header)
file_name
The name of the file.
sep
The separting character ',' or '\t'
read_train_data()
Reads the data file.
Recm$read_train_data(file_name, sep, header)
file_name
The name of the file.
sep
The separting character ',' or '\t'
read_test_data()
Reads the data file.
Recm$read_test_data(file_name, sep, header)
file_name
The name of the file.
sep
The separting character ',' or '\t'
header
boolean, whether the table has a header line
data_eng()
Data engineering, replaces the object's data.table.
Recm$data_eng(data_source = NULL)
data_setup()
Does some setup processing on the data file, drop columns, split data into train and test, and identify the label column.
Recm$data_setup( file_name = NULL, sep = NULL, data_mode = NULL, signatures = NULL, label_name = NULL, sample_id = NULL, drop_list = NULL, data_split = NULL )
file_name
string, the name of the file
sep
string, the separating character
data_mode
string,
label_name
string, the column name indicating the target label
drop_list
a vector of strings indicating what columns to drop
data_split
numeric value, the percent of data to use in training
train_data_setup()
Does some setup processing on the training data file, drop columns and identify the label column.
Recm$train_data_setup( file_name = NULL, sep = NULL, data_mode = NULL, signatures = NULL, label_name = NULL, sample_id = NULL, drop_list = NULL )
label_name
string, the column name indicating the target label
drop_list
a vector of strings indicating what columns to drop
test_data_setup()
Does some setup processing on the test data file, drop columns and identify the label column. The data_mode and signatures will have already been set in training.
Recm$test_data_setup( file_name = NULL, sep = NULL, label_name = NULL, sample_id = NULL, drop_list = NULL )
label_name
string, the column name indicating the target label
drop_list
a vector of strings indicating what columns to drop
binarize_label()
Recm$binarize_label(label, x)
build_label_ensemble()
Builds list of ensembles of XGBoost object, each classifying one binary label.
Recm$build_label_ensemble(size, params)
size
numeric, number of classifiers
mode
character vector, what types of data modalities to make. possible: pairs, quartiles, set-pairs
label
string, the label vector of each data example
max_depth
numeric, the depth of the tree in XGBoost
eta
numeric, the eta param of XGBoost, speed of learning
nrounds
numeric, the number of training rounds
nthreads
numeric, the number of threads to use in processing
objective
string, binary:logistic, see xgboost docs
A ensemble object is added to the list of objects in recm$enbl.
build_pred_table()
Recm$build_pred_table()
remap_multiclass_labels()
Recm$remap_multiclass_labels(label)
unmap_multiclass_labels()
Recm$unmap_multiclass_labels(labels)
build_final_ensemble()
Recm$build_final_ensemble(size, params)
train_models()
Recm$train_models(perc)
train_final()
Recm$train_final(perc)
ensemble_predict()
Recm$ensemble_predict(data, combine_function)
predict()
Recm$predict(data, combine_function)
print_error()
Recm$print_error(label, root, threshold)
accuracy()
Recm$accuracy(labels, calls)
precision()
Recm$precision(cmdf, i)
sensitivity()
Recm$sensitivity(cmdf, i)
specificity()
Recm$specificity(cmdf, i)
classification_metrics()
Recm$classification_metrics()
importance()
Recm$importance()
results()
Recm$results(include_label = FALSE)
autopred()
Recm$autopred( data_file = NULL, sep = NULL, label_name = NULL, sample_id = NULL, drop_list = NULL, data_split = NULL, data_mode = NULL, signatures = NULL, size = NULL, params = NULL, train_perc = NULL, combine_function = NULL )
clone()
The objects of this class are cloneable with this method.
Recm$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.