BaseEstimator {less} | R Documentation |
A dummy base R6 class that provides get_all_fields, get_attributes and set_random_state functionalities for estimators
R6 Class of BaseEstimator
get_all_fields()
Auxiliary function returning the name of all private and public fields of the self class
BaseEstimator$get_all_fields()
TestClass <- R6::R6Class(classname = "TestClass", inherit = BaseEstimator, private = list(random_state = NULL)) exampleClass <- TestClass$new() exampleClass$get_all_fields()
get_attributes()
Auxiliary function returning the name and values of all private and public fields of the self class
BaseEstimator$get_attributes()
exampleClass$get_attributes()
set_random_state()
Auxiliary function that sets random state attribute of the self class
BaseEstimator$set_random_state(random_state)
random_state
seed number to be set as random state
self
exampleClass$set_random_state(2022)
clone()
The objects of this class are cloneable with this method.
BaseEstimator$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `BaseEstimator$get_all_fields`
## ------------------------------------------------
TestClass <- R6::R6Class(classname = "TestClass",
inherit = BaseEstimator,
private = list(random_state = NULL))
exampleClass <- TestClass$new()
exampleClass$get_all_fields()
## ------------------------------------------------
## Method `BaseEstimator$get_attributes`
## ------------------------------------------------
exampleClass$get_attributes()
## ------------------------------------------------
## Method `BaseEstimator$set_random_state`
## ------------------------------------------------
exampleClass$set_random_state(2022)