Task: Task Class

Description Active bindings Methods

Description

A base class describe a machine learning task specification. A task is defined by a Options and keys which is named character vector specifiyng option's key. The main functionality is evaluate quoted call arguments and assign the acutal values to be called in the later task.

Active bindings

options

A Options object.

keys

A named character vector of keys.

formulas

A Formulas object.

datasets

A Datasets object.

seeds

A Seeds object.

models

A Models object.

measure

A Measure object.

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.

show_progress

Wheather to show progress messages.

keep_data

Wheather to keep data.

parallel

Wheather to calculate parallely.

formula

A tasks' formula.

dataset

A task's dataset.

train

A task's train data.

test

A task's test data.

resample_call

A task's resample call.

seed

A task's seed.

model

A task's model.

search_seed

A task's search seed for resampling.

cv_seed

A task's cv seed for resampling.

model_seed

A task's model seed.

id_col

A task's datasets' id_col.

test_ids

A task's datasets' test_ids.

preproc_call

A task's preproc call.

data_call

A task's data call.

fit_call

A task's fit call.

pred_call

A task's prediction call.

has_test_labels

Wheather the dataset has test labels.

result

A task result.

done

Wheather the task is finished.

Methods

Public methods


Method new()

Construct a new Task class object.

Usage
Task$new(options = NULL, keys = NULL)
Arguments
options

A Options class object.

keys

A named character vector of keys. Names must be "formula", "dataset", "resample", "seed", "model", "preproc", "fit_param" and values must be key of the each options.

Returns

A new Task class object


Method print()

Print object.

Usage
Task$print()

Method print_task()

Print task object.

Usage
Task$print_task(title = " Task ", key_width = 14L)
Arguments
title

A character scalar of printed title.

key_width

A integer scalar of key column width.


Method eval_call_args()

Evaluate call arguments in the task environment.

Usage
Task$eval_call_args(call = NULL)
Arguments
call

call object.

Returns

A call object.


Method clone()

The objects of this class are cloneable with this method.

Usage
Task$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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