Options: Options Class

Description Usage Arguments Value Active bindings Methods

Description

A class stores all machine learning project Option. This class checks if the option have valid values each other. (e.g. All data in Datasets have the label variable described in the formulas, or all models support the task type, etc.)

Methods that do actual tasks are not defined in the classs. The concept is, gather the all options in one place and pass it to Task and Project classes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
new_options(
  formulas = NULL,
  datasets = NULL,
  seeds = NULL,
  models = NULL,
  measure = NULL,
  show_progress = TRUE,
  keep_data = FALSE,
  parallel = FALSE
)

Arguments

formulas

A Formulas class object.

datasets

A Datasets class object.

seeds

A Seeds class object.

models

A Models class object.

measure

A Measure class object. If NULL, a Measure class object with default metrics are used.

show_progress

A logical scalar wheather to show a progress bar.

keep_data

A logical scalar wheather to keep original data. If TRUE, the original dataset are kept in predicted values and cross-validation folds.

parallel

A logical scalar wheather to calculate parallely.

Value

A new Options class object

Active bindings

formulas

A Formulas class object.

datasets

A Datasets class object.

seeds

A Seeds class object.

models

A Models class object.

measure

A Measure class object.

show_progress

Wheather to show progress messages.

keep_data

Wheather to keep data.

parallel

Wheather to calculate parallely.

labels

A vector of labels (response variable).

label_var

A label (response) variable name.

label_levels

Levels of label (response) variable.

task_type

A task type.

Methods

Public methods


Method new()

Construct a new Options class object.

Usage
Options$new(
  formulas = NULL,
  datasets = NULL,
  seeds = NULL,
  models = NULL,
  measure = NULL,
  show_progress = TRUE,
  keep_data = FALSE,
  parallel = FALSE
)
Arguments
formulas

A Formulas class object.

datasets

A Datasets class object.

seeds

A Seeds class object.

models

A Models class object.

measure

A Measure class object. If NULL, a Measure class object with default metrics are used.

show_progress

A logical scalar wheather to show a progress bar.

keep_data

A logical scalar wheather to keep original data. If TRUE, the original dataset are kept in predicted values and cross-validation folds.

parallel

A logical scalar wheather to calculate parallely.

Returns

A new Options class object


Method print()

Print object.

Usage
Options$print()

Method print_options()

Print Options object.

Usage
Options$print_options(title = " Options ", key_width = 10L)
Arguments
title

A character scalar of printed title.

key_width

A integer scalar of key column width.


Method clone()

The objects of this class are cloneable with this method.

Usage
Options$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


five-dots/ml4e documentation built on June 19, 2020, 4:26 p.m.