I got an exercise, where I need to train a linear regression model and get some information about the model:
- linear relationship between my chosen variable and the other variables
- which variables are important for the model
- significance
It´s easy to create an model with the lm-function, so that I can interpret it with summary(mod).
mod <- lm(cars$height ~ ., data = cars)
The summary()-MEthod returns everything: r-squared, coefficients, p-value, significance ...
But when Im training my model like:
library(mlr)
lrn = makeLearner("regr.ksvm")
mod = train(learner = lrn, task = task)
pred = predict(object = mod, newdata = test)
performance(pred = pred, measures = list(mse, arsq))
I´m just getting the mse and r-squareZd. How to get to the other information like significance, important variables ... Is there a hance to get access to this mod?
Thanks for help