plot.L0Learn: Plot Regularization Path

View source: R/plot.R

plot.L0LearnR Documentation

Plot Regularization Path

Description

Plots the regularization path for a given gamma.

Usage

## S3 method for class 'L0Learn'
plot(x, gamma = 0, showLines = FALSE, ...)

Arguments

x

The output of L0Learn.fit

gamma

The value of gamma at which to plot.

showLines

If TRUE, the lines connecting the points in the plot are shown.

...

ignore

Value

A ggplot object.

Examples

# Generate synthetic data for this example
data <- GenSynthetic(n=100,p=20,k=10,seed=1)
X = data$X
y = data$y
# Fit an L0 Model
fit <- L0Learn.fit(X, y, penalty="L0")
plot(fit, gamma=0)


L0Learn documentation built on March 7, 2023, 8:18 p.m.