Skip to content

Train Regressor (Ridge/Lasso/ElasticNet) Node

AI/ML/Regression

Fit/Train a penalized linear regression model. Ridge shrinks all coefficients, Lasso drives irrelevant ones to exactly zero (feature selection), Elastic Net mixes both.

fit_elastic_netml
Inputs8
Outputs3
Security exposure6/10
Packageml

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
6/10Medium
PrivacyPotential sensitivity of processed data.
6/10Medium
PerformanceRuntime or resource pressure.
7/10High
GovernancePolicy, audit, or compliance impact.
8/10High
ReliabilityOperational stability considerations.
7/10High
CostExternal or compute cost impact.
8/10High

Input Pins

8

Input

Execution
exec_in

Execution trigger that begins regression training

Data Source

String
source

Choose which backend supplies the training data

Default Database
Database

Penalty Type

String
penalty_type

Ridge = pure L2 (keeps all features, handles correlated ones well), Lasso = pure L1 (zeroes out weak features), ElasticNet = a blend controlled by L1 Ratio

Default ElasticNet
ElasticNetRidgeLasso

Penalty (Alpha)

Float
penalty

Overall regularization strength. 0 means ordinary least squares, larger values shrink the coefficients harder.

Default 1
Range 0 to 1000

L1 Ratio

Float
l1_ratio

Share of the penalty spent on L1 vs L2. Only used when Penalty Type is ElasticNet; Ridge forces 0.0 and Lasso forces 1.0.

Default 0.5
Range 0 to 1

Fit Intercept

Boolean
with_intercept

Fit a bias term. Disable only when the data is already centered.

Default true

Max Iterations

Integer
max_iterations

Upper bound on coordinate descent passes. The solver stops silently at this cap, so a convergence warning is logged when it is hit.

Default 1000
Range 1 to 1000000

Tolerance

Float
tolerance

Convergence tolerance for coordinate descent. Smaller values give a tighter fit at the cost of more iterations.

Default 0.0001
Range 1e-12 to 1

Output Pins

3

Done

Execution
exec_out

Activated once training completes

Model

Struct
model

Thread-safe handle to the trained penalized regression model

NodeMLModelNodeMLModel1 fields
model_refstringrequired
Schema enforced

Coefficients

Struct
coefficients

Fitted coefficients and intercept. With Lasso, coefficients that are exactly zero mark features the model discarded.

LinearCoefficientsLinearCoefficients3 fields
coefficientsArray<number:double>required

Feature coefficients (one per input dimension)

itemsnumber:doublearray item
format double
interceptnumber:doublerequired

The y-intercept (bias term)

format double
n_featuresinteger:uintrequired

Number of input features

format uintmin 0

Node Info

Internal name
fit_elastic_net
Category
AI/ML/Regression