Draw predictions from a RuleFit xrf model
# S3 method for xrf predict( object, newdata, sparse = TRUE, lambda = "lambda.min", type = "response", ... )
an object of class "xrf"
data to predict on
a logical indicating whether a sparse design matrix should be used
the lasso penalty parameter to be applied
the type of predicted value produced
ignored arguments
# NOT RUN { m <- xrf(Petal.Length ~ ., iris, xgb_control = list(nrounds = 20, max_depth = 2), family = 'gaussian') predictions <- predict(m, iris) # }
Run the code above in your browser using DataCamp Workspace