Generated reference › Incremental Regression Linear Predict — Machine Learning/Incremental Learning
kind: generated#block#machine-learning-incremental-learning

Incremental Regression Linear Predict — Machine Learning/Incremental Learning

y

Machine_Learning/Incremental_Learning/Incremental_Regression_Linear_Predict · 2 input / 1 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++

Description#

The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.

Incremental Regression Linear Predict

Machine Learning / Incremental Learning

Predicts the response of one observation with the linear regression model an IncrementalRegressionLinear Fit block puts on its bus: yfit = xs·β + b, where xs is x standardized by the bus's Mu and Sigma (each predictor less its mean, over its standard deviation). This is Simulink's IncrementalRegressionLinear Predict block (Statistics and Machine Learning Toolbox).

Ports

  • mdl (bus) – the model bus of an IncrementalRegressionLinear Fit block with the same number of predictors: Beta, Bias, IsWarm, CanPredict, Mu, Sigma and Epsilon. Beta, Bias, CanPredict, Mu and Sigma are read.
  • x – one observation of the P predictors, a row [1,P].
  • yfit – the predicted response, [1,1]; 0 while the bus's CanPredict is false.

Parameters

  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

When a run is refused

An x that is not a row, or a bus that is not the shape an IncrementalRegressionLinear Fit block writes for x's width.

Code export

Six targets: Python, MATLAB, Java, Rust, C and C++, each reading the bus's elements and scoring in the live block's order. The hardware targets (VHDL, Verilog, SystemVerilog) and PLC Structured Text carry no bus, so an export to one stops and names the block.

Simulink bridge

None. Simulink's block takes its learner as InitialLearner, the name of an incrementalRegressionLinear object in the MATLAB workspace, rather than as dialog parameters, so there is nothing in its dialog to map onto.

Notes

  • Algebraic and stateless: the output depends only on this step's bus and x.
  • Verified against R2026a: fed by its Fit block over 120 steps in four configurations, yfit agrees with Simulink's block within 2×10−14.

Code facts#

FactValue
registered typeMachine_Learning/Incremental_Learning/Incremental_Regression_Linear_Predict
familyMachine_Learning/Incremental_Learning
solver environment classICoreBlock_0_Machine_Learning_1_Incremental_Learning_2_Incremental_Regression_Linear_Predict
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Machine_Learning/Incremental_Learning/Incremental_Regression_Linear_Predict/ICoreBlock_0_Machine_Learning_1_Incremental_Learning_2_Incremental_Regression_Linear_Predict.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Machine_Learning/Incremental_Learning/Incremental_Regression_Linear_Predict/ICoreBlock_0_Machine_Learning_1_Incremental_Learning_2_Incremental_Regression_Linear_Predict.h
default size on canvas160 × 70 px
ports at insert2 in, 1 out
code generators implementedPython, MATLAB, Java, Rust, C, C++

Ports#

#DirectionSignal typeDescription label
1inICoreBusmdl
2inICoreDoublex
3outICoreDoubleyfit

Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.

Configuration variables#

No config variable beyond the Sampling Time (s) every block carries.

Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.

supportSupport::None
Simulink pathstatsIncremental/Regression/Linear/IncrementalRegressionLinear Predict
port-count rulePortsParam::None
SampleTime parameteryes

Caveat (shown to the user): no bridge: Simulink's IncrementalRegressionLinear Predict block takes its learner as InitialLearner, the NAME of an incrementalRegressionLinear object in the MATLAB workspace, not as dialog parameters -- there is nothing in its dialog to map onto

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:

  • B0 every stimulus in the sample errored — cross-checks skipped

The verdict above is tools/docs/check_block_descriptions.py (P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.

File banner (developer view)#

The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).

IncrementalRegressionLinear Predict -- the response of one observation under a model on a bus statsIncremental/Regression/Linear/IncrementalRegressionLinear Predict, MEASURED on R2026a 2026-10-02 (BLOCKS_TO_ADD_TOOLBOXES.md statsIncremental, on FEATURES_TO_ADD.md BF1): two inputs, the model bus and x, one output, yfit. The model is read entirely off the bus: x is standardized by the bus's Mu and Sigma (an entry of Mu that is 0 is not subtracted, a Sigma of 0 or 1 does not divide, as MATLAB writes it), then yfit = xs.Beta + Bias, the sum in predictor order. While the bus's CanPredict is false, yfit is 0, as Simulink's block answers. Against Simulink's block, fed by its Fit block, over 120 steps in four configurations: within 2e-14.

The bus must be the shape an IncrementalRegressionLinear Fit block writes for x's width; the build refuses any other by name.

Sample results#

No stimulus produced a sampled output in this rig — Incorrect bus shape reaching port: ICore Blocks/Home/Incremental Regression Linear Predict/ICoreBus-In-0 requires { Beta: ICoreDouble [1x1], Bias: ICoreDouble [1x1], IsWarm: ICoreBool [1x1], CanPredict: ICoreBool [1x1], Mu: ICoreDouble [1x1], Sigma: ICoreDouble [1x1], Epsilon: ICoreDouble [1x1] }, ICore Blocks/Home/Bus Creator/ICoreBus-Out-0 carries { a: ICoreDouble [1x1], b: ICoreDouble [1x1] }. That is a fact about the single-block rig, not a verdict on the block: an offline batch fit, a block whose output only appears at onSolverFinish, or one that needs a driven environment cannot be exercised alone.

Category unsampled · sample time 0.1 · 60 steps · commit 68af3e6d2 · produced by docsSample --out <folder> --blocks Incremental_Regression_Linear_Fit Incremental_Regression_Linear_Predict Incremental_Classification_Linear_Fit Incremental_Classification_Linear_Predict --steps 60

Sample data: docs/generated/samples/Machine_Learning__Incremental_Learning__Incremental_Regression_Linear_Predict.json