An R6 Class that provides an interface to scikit-learn regression models.
Public fields
model
The underlying sklearn model
residuals
Model residuals
df.residual
Degrees of freedom of residuals
Methods
Method new()
Create a new Regressor object
Arguments
model_name
Name of the sklearn model to use
...
Additional parameters passed to the sklearn model
Method fit()
Fit the model to training data
Usage
Regressor$fit(x, y, calibration = FALSE, seed = 42L, ...)
Arguments
x
Feature matrix
y
Target vector
calibration
Logical flag to indicate if calibration of residuals should be used
seed
Seed for random number generator
Make predictions on new data
Usage
Regressor$predict(
newdata,
method = c("none", "splitconformal", "surrogate", "bootstrap", "tsbootstrap",
"bayesian"),
nsim = 250L,
level = 95,
seed = 123
)
Arguments
newdata
New data to predict on
method
Method for computing prediction intervals
nsim
Number of simulations for bootstrap/tsbootstrap
level
Confidence level for prediction intervals
seed
Random seed
Method clone()
The objects of this class are cloneable with this method.
Usage
Regressor$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.