When to use it
Predict a continuous outcome when you want lasso-style feature selection AND ridge-style stability, especially with groups of correlated predictors, where pure lasso would arbitrarily keep one and drop the rest.
When not to: You need valid p-values, standard errors, or confidence intervals on the coefficients (this penalized estimator does not provide them; use ordinary linear regression), or predictors are largely uncorrelated and you specifically want the sparsest possible model (pure lasso, l1_ratio=1, may be the more natural choice), or you specifically want to keep every predictor with only shrinkage and no selection (pure ridge, l1_ratio=0).
Step by step
Open it from the menu
Click Regression in the menu bar; under Shrinkage choose Elastic Net Regression.
Fill in the form
Choose the columns: What you want to predict or explain, Columns that may explain it. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: λ selection, Alpha (λ), L1 ratio, CV folds, Standardize predictors. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| What you want to predict or explain Response required | One numeric column. Continuous outcome variable (Y / dependent). |
|---|---|
| Columns that may explain it Predictors required | One numeric column. One or more numeric predictor columns (X). |
| λ selection | How to choose the overall penalty strength λ (alpha): 'cv' picks it by cross-validation at your l1_ratio (recommended; avoids the all-coefficients-zero trap of a fixed λ); 'manual' uses the Alpha you set below. Default: cv. |
| Alpha (λ) | Overall regularization strength when λ selection = manual. Larger = stronger penalty / more shrinkage. Default: 1. |
| L1 ratio | Mix of L1 vs L2: 1 = pure lasso, 0 = pure ridge, 0.5 = even blend. Default: 0.5. |
| CV folds | Number of cross-validation folds when λ selection = cv. Default: 5. |
| Standardize predictors | Z-score predictors before fitting so the penalty is scale-fair (recommended). Default: on. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Linearity
If it does not hold: Elastic Net models the outcome as a LINEAR function of the (possibly transformed) predictors; genuine curvature in the true relationship is not captured and biases predictions systematically in regions where the relationship bends.
How to check: Not checked by KernelStats: no residual or linearity diagnostic is run for this method, unlike Linear Regression's diagnostics; inspect residual plots manually or compare against a nonlinear alternative (e.g. Generalized Additive Model (GAM), Spline Regression).
- Normality (of residuals, not of the raw data)
If it does not hold: Any informal reading of the coefficient magnitudes as evidence of importance implicitly leans on the same normal-errors assumption as ordinary least squares; non-normal or heteroscedastic residuals are not flagged here the way they are for Linear Regression.
How to check: Not checked by KernelStats: no residual normality or homoscedasticity diagnostic is computed for this method.
A worked example
Predicting penguin body mass from three correlated measurements (flipper length, bill length, bill depth), standardized, with the penalty strength chosen by 5-fold cross-validation at l1_ratio = 0.5.
Result: Cross-validation selects alpha = 1.40; all three predictors are kept, with standardized coefficients of +324 g per SD for flipper length, +142 g for bill length and -91 g for bill depth; R-squared = 0.66 (below the unpenalized fit's, the price of the shrinkage).
Flipper length and bill length are correlated size-related measurements, and the L2 component keeps both in the model with shrunken, stabilized coefficients rather than forcing a choice between them; the lower R-squared is the bias the penalty buys in exchange for stability, which is why cross-validated error, not R-squared, is the number to compare against other models.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Which measurements drive penguin body mass, with correlated predictors handled gracefully?
- Explain the elastic Net regression in plain words.
- What does overfitting mean?
Last reviewed November 16, 2026.
