API Reference 2 Original Algorithms

openmoa.regressors

API reference for OpenMOA's original regression algorithms. Both regressors are designed for streams with evolving feature spaces, extending their classification counterparts (FESL and OASF) to continuous target prediction.

Original Regressors
FESLRegressor OASFRegressor

§1   FESLRegressor

class FESLRegressor regression · src/openmoa/regressor/_fesl_regressor.py  ·  Inheritance: Regressor

Full name: Feature Evolvable Streaming Learning — Regression

FESL regression handles feature-space transitions by maintaining two linear models, one per feature space (S1 and S2). During an overlap window straddling the transition point, it accumulates instances from both spaces and learns a mapping matrix M: S2 → S1 via Ridge Regression. After the transition, predictions are a weighted ensemble: ŷ = α1·w1·x1 + α2·w2·M·x2, where ensemble weights are updated based on per-model squared loss.

Constructor
signature
FESLRegressor(
    schema: Schema,
    s1_feature_indices: list[int],
    s2_feature_indices: list[int],
    overlap_size: int = 50,
    switch_point: int = 500,
    ensemble_method: str = "combination",
    learning_rate_scale: float = 1.0,
    random_seed: int = 1,
)
ParameterTypeDefaultDescription
schemaSchemarequiredStream schema
s1_feature_indiceslist[int]requiredFeature indices for the first (original) feature space S1
s2_feature_indiceslist[int]requiredFeature indices for the second (new) feature space S2
overlap_sizeint50Number of instances in the overlap buffer used to learn the mapping matrix M
switch_pointint500Instance index at which the feature space transition begins
ensemble_methodstr"combination""combination": weighted ensemble of both models;  "selection": use the better-performing model only
learning_rate_scalefloat1.0Scales the learning rate during weight updates
random_seedint1RNG seed
Attributes
AttributeTypeDescription
w1ndarrayWeight vector for feature space S1
w2ndarrayWeight vector for feature space S2
MndarrayMapping matrix from S2 to S1 (learned via Ridge Regression during overlap)
alpha1floatEnsemble weight for model 1
alpha2floatEnsemble weight for model 2
d1intDimensionality of S1
d2intDimensionality of S2
BintOverlap buffer size
T1intSwitch point instance index
overlap_X1listBuffered S1 features during overlap period
overlap_X2listBuffered S2 features during overlap period
Methods
MethodSignatureReturnsDescription
train(instance: Instance) → NoneNoneUpdates weight vectors via squared loss gradient; during overlap period accumulates buffer; when buffer full learns mapping matrix M and updates ensemble weights
predict(instance: Instance) → floatfloat"combination": returns α1·w1·x1 + α2·w2·M·x2;  "selection": returns prediction from the better-performing model only

§2   OASFRegressor

class OASFRegressor regression sparse · src/openmoa/regressor/_oasf_regressor.py  ·  Inheritance: Regressor

Full name: Online Active Sparse Feature Learning — Regression

OASF regression extends the classification ring-buffer architecture to continuous targets using a Passive-Aggressive ε-insensitive loss (PA-R). It adds CUR matrix decomposition regularization (eta) that constrains the weight matrix relative to the recent feature window X_cur, improving generalization under feature-space changes. The weight matrix W auto-expands for incremental feature streams and shrinks logically for decremental ones.

Constructor
signature
OASFRegressor(
    schema: Schema,
    lambda_param: float = 0.01,
    mu: float = 10.0,
    eta: float = 1.0,
    L: int = 100,
    d_max: int = 1000,
    random_seed: int = 1,
)
ParameterTypeDefaultDescription
schemaSchemarequiredStream schema
lambda_paramfloat0.01L₁,₂ sparsity shrinkage threshold
mufloat10.0PA penalty parameter (controls update step size; regression default is larger than classification)
etafloat1.0CUR regularization coefficient — strength of feature-window constraint
Lint100Sliding window length (number of weight vector columns in ring buffer)
d_maxint1000Pre-allocated maximum feature dimension
random_seedint1RNG seed
Attributes
AttributeTypeDescription
Wndarray (d_max, L)Ring buffer of weight vectors
X_curndarrayFeature window used for CUR regularization
current_dimintCurrent feature dimensionality
lambda_paramfloatL₁,₂ sparsity threshold
mufloatPA penalty parameter
etafloatCUR regularization coefficient
LintSliding window size
Methods
MethodSignatureReturnsDescription
train(instance: Instance) → NoneNoneSelects incremental or decremental PA-R update based on feature-space change; applies L₁,₂ sparsity shrinkage; updates CUR feature window X_cur
predict(instance: Instance) → floatfloatLinear prediction using the latest weight column in the ring buffer
Comparison with OASFClassifier
ItemOASFClassifierOASFRegressor
Loss functionHinge loss (PA)ε-insensitive loss (PA-R)
Default mu1.010.0
Extra regularizationNoneCUR matrix decomposition (eta)
OutputClass label (int)Continuous value (float)

Algorithm Coverage

Of the 10 original OpenMOA algorithms, only 2 implement regression. The remaining 8 are classification-only.

FESLRegressor Regression ✓
OASFRegressor Regression ✓
RSOLClassifier Classification only
FOBOSClassifier Classification only
FTRLClassifier Classification only
OVFMClassifier Classification only
OSLMFClassifier Classification only
ORF3VClassifier Classification only
OLD3SClassifier Classification only
OWSSClassifier Classification only
CapyMOA regressors: OpenMOA also exposes CapyMOA regression algorithms (FIMTDD, ORTO, SOKNL, etc.) via the same Regressor interface. See the CapyMOA API Reference for their documentation.