Produce rules & coefficients for the RuleFit model
# S3 method for xrf coef(object, lambda = "lambda.min", ...)
an object of class "xrf"
the lasso penalty parameter to be applied as in 'glmnet'
ignored arguments
m <- xrf(Petal.Length ~ ., iris, xgb_control = list(nrounds = 2, max_depth = 2), family = 'gaussian') linear_model_coefficients <- coef(m, lambda = 'lambda.1se')
Run the code above in your browser using DataLab