ModelBase: The base class of all the Model classes.

Description Usage Arguments Super classes Public fields Methods

Description

A ModelBase class.

Usage

1
2
3
4
5
## S3 method for class 'ModelBase'
predict(object, newdata)

## S3 method for class 'ModelBase'
summary(x)

Arguments

object

a ModelBase object.

newdata

a data.frame object.

x

a ModelBase object.

Super classes

dymiumCore::Generic -> dymiumCore::Model -> ModelBase

Public fields

params

named numeric()
a named numerical vector containing parameter values of the model object.

type

character(1)
type of the model.

formula

formula()
model formula.

terms

character(1)
terms of the model. This gets generated using stats::terms on formula during initialisation.

Methods

Public methods

Inherited methods

Method new()

Constructor function.

Usage
ModelBase$new(params, formula, type = "custom", preprocessing_fn = NULL)
Arguments
params

a named numeric().

formula

a model formula().

type

type of the model.

preprocessing_fn

a pre-processing function that gets applied to the data given to the predict method before making the prediction.

Returns

NULL


Method print()

print method.

Usage
ModelBase$print()

Method predict()

an abstract method. Once implemented it should accept newdata as the first argument and returns a numeric() vector or a data.frame() that contains the predicted probabilities calculated using self$params and newdata.

Usage
ModelBase$predict()

Method summary()

summary method.

Usage
ModelBase$summary()

Method clone()

The objects of this class are cloneable with this method.

Usage
ModelBase$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


dymium-org/dymiumModel documentation built on June 23, 2020, 11:01 a.m.