autoplot.LearnerClassifGlmnet: Plot for LearnerClassifGlmnet / LearnerRegrGlmnet /...

View source: R/LearnerClassifGlmnet.R

autoplot.LearnerClassifCVGlmnetR Documentation

Plot for LearnerClassifGlmnet / LearnerRegrGlmnet / LearnerClassifCVGlmnet / LearnerRegrCVGlmnet

Description

Visualizations for mlr3learners::mlr_learners_classif.glmnet, mlr3learners::mlr_learners_regr.glmnet, mlr3learners::mlr_learners_classif.cv_glmnet and mlr3learners::mlr_learners_regr.cv_glmnet using the package ggfortify.

Note that learner-specific plots are experimental and subject to change.

Usage

## S3 method for class 'LearnerClassifCVGlmnet'
autoplot(object, ...)

## S3 method for class 'LearnerClassifGlmnet'
autoplot(object, ...)

## S3 method for class 'LearnerRegrCVGlmnet'
autoplot(object, ...)

## S3 method for class 'LearnerRegrGlmnet'
autoplot(object, ...)

Arguments

object

(mlr3learners::LearnerClassifGlmnet | mlr3learners::LearnerRegrGlmnet | mlr3learners::LearnerRegrCVGlmnet | mlr3learners::LearnerRegrCVGlmnet).

...

(any): Additional arguments, passed down to ggparty::autoplot.party().

Value

ggplot2::ggplot() object.

Theme

The theme_mlr3() and viridis color maps are applied by default to all autoplot() methods. To change this behavior set options(mlr3.theme = FALSE).

References

Tang Y, Horikoshi M, Li W (2016). “ggfortify: Unified Interface to Visualize Statistical Result of Popular R Packages.” The R Journal, 8(2), 474–485. doi: 10.32614/RJ-2016-060.

Examples

## Not run: 
library(mlr3)
library(mlr3viz)
library(mlr3learners)

# classification
task = tsk("sonar")
learner = lrn("classif.glmnet")
learner$train(task)
autoplot(learner)

# regression
task = tsk("mtcars")
learner = lrn("regr.glmnet")
learner$train(task)
autoplot(learner)

## End(Not run)

mlr-org/mlr3viz documentation built on Nov. 24, 2022, 3:47 p.m.