Model: Model Class

Description Usage Arguments Value Active bindings Methods

Description

A class defines the model specifications.

Usage

1
2
3
4
5
6
new_model(
  engine = NULL,
  preproc_calls = NULL,
  fit_params = NULL,
  fit_param_specs = NULL
)

Arguments

engine

A character scalar of model engines.

preproc_calls

A PreprocCalls class object.

fit_params

A FitParams class object. If NULL, FitParams with an emtpy list parameter is created.

fit_param_specs

A FitParamSpecs class object. If NULL, default specs is used. (If defined by the pacakge)

Value

A new Model class object.

Active bindings

engine

A model engine.

fit_params

FitParams class object.

fit_param_specs

A FitParamSpecs class object.

preproc_calls

A PreprocCalls class object.

has_fit_param_specs

Wheather the model has fit_param_specs.

spec

A list of model specifications.

data_call

A call used to convert a data.frame to the format suited for the model input.

fit_call

A call in fit routine.

pred_call

A call in predict routine.

Methods

Public methods


Method new()

Construct a new Model class object.

Usage
Model$new(
  engine = NULL,
  preproc_calls = NULL,
  fit_params = NULL,
  fit_param_specs = NULL
)
Arguments
engine

A character scalar of model engines.

preproc_calls

A PreprocCalls class object.

fit_params

A FitParams class object. If NULL, FitParams with an emtpy list parameter is created.

fit_param_specs

A FitParamSpecs class object. If NULL, default specs is used. (If defined by the pacakge)

Returns

A new Model class object


Method print()

Print object.

Usage
Model$print()

Method get_fit_call_by_key()

Get a model's fit call by a fit_params key.

Usage
Model$get_fit_call_by_key(fit_param_key = NULL)
Arguments
fit_param_key

A character or integer scalar of the fit_params keys.

Returns

A call of the model fit.


Method get_fit_call()

Get a model's fit call by a fit_param.

Usage
Model$get_fit_call(fit_param = NULL)
Arguments
fit_param

A list of fit parameters.

Returns

A call of the model fit.


Method clone()

The objects of this class are cloneable with this method.

Usage
Model$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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