evaluation_stage: Evaluation stage for binary classification syberia models.

Description Usage Arguments Details Value

View source: R/evaluation_stage.r

Description

A helper stage for evaluating a binary classification model according to the metrics: AUC, a confusion matrix, and a validation plot.

Usage

1
evaluation_stage(evaluation_parameters)

Arguments

evaluation_parameters

list. These come from the syberia model and must be in the following format:

  • output. The prefix of the CSV and PNG to which to output the results of the validation. For example, if you put "output/foo", then "output/foo.csv" will be a CSV file containing a data.frame with the columns "dep_var", "score", and id_column, where the score refers to predicted score, hand, "output/foo.png" will contain a decile validation plot of the results.

  • percent. The percent of the data that was used for training. Currently, only sequential splits of training and validation are supported until syberia introduces a better mechanism for data partitions. The default is 0.8.

  • dep_var. (Optional) The name of the dependent variable in the evaluated data. The default is "dep_var".

  • id_column. (Optional) The name of an identifying column in your pre-data-munged data.frame. This will be included in the validation output CSV. If not given, no ID column will be included.

  • cutoff. (Optional) A cutoff for binary classification predictions: above the cutoff means a prediction 1, and otherwise a 0. The default is 0.5.

  • random_sample (Optional) An indicator for specifying whether the one has used random sample to setup validation data.

  • seed (Optional) the seed used to generate the random validation set.

  • times (Optional) number of times one wants to draw random sample, right now only supports 1.

Details

The evaluation stage parameters that can be controlled through the syberia model file are described in the evaluation_parameters argument. For example, just like how you can set import = list(...) to control what data gets imported in your syberia model, you can write evaluation = list(output = 'foo', percent = 0.6, ...) to control what happens during this evaluation_stage.

Value

a stageRunner that performs AUC, confusing matrix, and validation plotting.


robertzk/syberiaStages documentation built on May 27, 2019, 11:38 a.m.