model_info {DALEX} | R Documentation |
Exract info from model
Description
This generic function let user extract base information about model. The function returns a named list of class model_info
that
contain about package of model, version and task type. For wrappers like mlr
or caret
both, package and wrapper inforamtion
are stored
Usage
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'lm'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'randomForest'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'svm'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'glm'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'lrm'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'glmnet'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'cv.glmnet'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'ranger'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'gbm'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'model_fit'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'train'
model_info(model, is_multiclass = FALSE, ...)
## S3 method for class 'rpart'
model_info(model, is_multiclass = FALSE, ...)
## Default S3 method:
model_info(model, is_multiclass = FALSE, ...)
Arguments
model |
- model object |
is_multiclass |
- if TRUE and task is classification, then multitask classification is set. Else is omitted. If |
... |
- another arguments |
Details
Currently supported packages are:
class
cv.glmnet
andglmnet
- models created with glmnet packageclass
glm
- generalized linear modelsclass
lrm
- models created with rms package,class
model_fit
- models created with parsnip packageclass
lm
- linear models created withstats::lm
class
ranger
- models created with ranger packageclass
randomForest
- random forest models created with randomForest packageclass
svm
- support vector machines models created with the e1071 packageclass
train
- models created with caret packageclass
gbm
- models created with gbm package
Value
A named list of class model_info
Examples
aps_lm_model4 <- lm(m2.price ~., data = apartments)
model_info(aps_lm_model4)
library("ranger")
model_regr_rf <- ranger::ranger(status~., data = HR, num.trees = 50, probability = TRUE)
model_info(model_regr_rf, is_multiclass = TRUE)