Skip to content

Train Classifier (Logistic Regression) Node

AI/ML/Classification

Fit/Train a Logistic Regression classifier with L2 regularization. Handles binary and multi-class targets and yields interpretable coefficients plus calibrated probabilities. The solver expects features on a comparable scale - fit a Feature Scaler first if your columns have very different ranges.

fit_logistic_regressionml
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.
8/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 Logistic Regression training

Data Source

String
source

Choose which backend supplies the training data

Default Database
Database

Mode

String
mode

Auto picks the binary solver for two classes and the multinomial (softmax) solver for more. Binary and Multinomial force one of them.

Default Auto
AutoBinaryMultinomial

Alpha (L2)

Float
alpha

Weight of the L2 penalty on the coefficients. 0 disables regularization, larger values shrink the model harder.

Default 1
Range 0 to 1000

Fit Intercept

Boolean
fit_intercept

Fit a bias term. Disable only when the features are already centered.

Default true

Max Iterations

Integer
max_iterations

Upper bound on LBFGS iterations. Raise it when training accuracy stays at the baseline.

Default 100
Range 1 to 100000

Gradient Tolerance

Float
gradient_tolerance

Smallest gradient norm that still continues the solver. Smaller means a tighter fit and more iterations.

Default 0.0001

Threshold

Float
threshold

Probability above which linfa's positive class is predicted. You do not choose that class: linfa assigns it to whichever label sorts second, which for a typical imbalanced dataset is the majority class. Raising the threshold therefore makes the OTHER class — usually the rare one — more likely to be predicted. The class the threshold actually governs is logged when training runs. Binary mode only, ignored for multinomial targets.

Default 0.5
Range 0 to 1

Output Pins

2

Done

Execution
exec_out

Activated once training completes

Model

Struct
model

Thread-safe handle to the trained Logistic Regression classifier

NodeMLModelNodeMLModel1 fields
model_refstringrequired
Schema enforced

Node Info

Internal name
fit_logistic_regression
Category
AI/ML/Classification