Skip to content

Train Regressor (GLM / Tweedie) Node

AI/ML/Regression

Fit/Train a Generalized Linear Model. Pick the distribution that matches the target: Normal for unbounded values, Poisson for counts, Gamma for positive skewed amounts, Inverse Gaussian for heavy tails.

fit_glmml
Inputs8
Outputs2
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.
6/10Medium
GovernancePolicy, audit, or compliance impact.
8/10High
ReliabilityOperational stability considerations.
7/10High
CostExternal or compute cost impact.
7/10High

Input Pins

8

Input

Execution
exec_in

Execution trigger that begins GLM training

Data Source

String
source

Choose which backend supplies the training data

Default Database
Database

Distribution

String
distribution

Target distribution: Normal (power 0, any value), Poisson (power 1, counts >= 0), Gamma (power 2, values > 0), Inverse Gaussian (power 3, values > 0), or Custom to set the Tweedie power directly

Default Normal
NormalPoissonGammaInverse GaussianCustom

Tweedie Power

Float
power

Free Tweedie power, only used when Distribution is Custom. Values in (0, 1) do not describe any distribution and are rejected; (1, 2) is compound Poisson-Gamma.

Default 0
Range -5 to 5

Alpha (L2 Penalty)

Float
alpha

Strength of the L2 penalty on the coefficients. 0 fits an unpenalized GLM.

Default 1
Range 0 to 1000

Fit Intercept

Boolean
fit_intercept

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

Default true

Max Iterations

Integer
max_iter

Iteration cap for the L-BFGS solver. Defaults to 1000 instead of the library default of 100, which is too low to converge on unscaled real-world features.

Default 1000
Range 1 to 1000000

Tolerance

Float
tol

Gradient tolerance that stops the L-BFGS solver. Smaller values fit tighter but need more iterations.

Default 0.0001
Range 1e-12 to 1

Output Pins

2

Done

Execution
exec_out

Activated once training completes

Model

Struct
model

Thread-safe handle to the trained generalized linear model

NodeMLModelNodeMLModel1 fields
model_refstringrequired
Schema enforced

Node Info

Internal name
fit_glm
Category
AI/ML/Regression