plot.L0Learn {L0Learn} | R Documentation |
Plots the regularization path for a given gamma.
## S3 method for class 'L0Learn'
plot(x, gamma = 0, showLines = FALSE, ...)
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 |
A ggplot
object.
# 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)