Description Usage Arguments Super classes Public fields Methods
A ModelBase class.
1 2 3 4 5 |
object |
a ModelBase object. |
newdata |
a data.frame object. |
x |
a ModelBase object. |
dymiumCore::Generic
-> dymiumCore::Model
-> ModelBase
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.
new()
Constructor function.
ModelBase$new(params, formula, type = "custom", preprocessing_fn = NULL)
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.
NULL
print()
print method.
ModelBase$print()
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
.
ModelBase$predict()
summary()
summary method.
ModelBase$summary()
clone()
The objects of this class are cloneable with this method.
ModelBase$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.