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.
§1 FESLRegressor
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,
)
| Parameter | Type | Default | Description |
| schema | Schema | required | Stream schema |
| s1_feature_indices | list[int] | required | Feature indices for the first (original) feature space S1 |
| s2_feature_indices | list[int] | required | Feature indices for the second (new) feature space S2 |
| overlap_size | int | 50 | Number of instances in the overlap buffer used to learn the mapping matrix M |
| switch_point | int | 500 | Instance index at which the feature space transition begins |
| ensemble_method | str | "combination" | "combination": weighted ensemble of both models; "selection": use the better-performing model only |
| learning_rate_scale | float | 1.0 | Scales the learning rate during weight updates |
| random_seed | int | 1 | RNG seed |
Attributes
| Attribute | Type | Description |
| w1 | ndarray | Weight vector for feature space S1 |
| w2 | ndarray | Weight vector for feature space S2 |
| M | ndarray | Mapping matrix from S2 to S1 (learned via Ridge Regression during overlap) |
| alpha1 | float | Ensemble weight for model 1 |
| alpha2 | float | Ensemble weight for model 2 |
| d1 | int | Dimensionality of S1 |
| d2 | int | Dimensionality of S2 |
| B | int | Overlap buffer size |
| T1 | int | Switch point instance index |
| overlap_X1 | list | Buffered S1 features during overlap period |
| overlap_X2 | list | Buffered S2 features during overlap period |
Methods
| Method | Signature | Returns | Description |
| train | (instance: Instance) → None | None | Updates 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) → float | float | "combination": returns α1·w1·x1 + α2·w2·M·x2; "selection": returns prediction from the better-performing model only |
§2 OASFRegressor
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,
)
| Parameter | Type | Default | Description |
| schema | Schema | required | Stream schema |
| lambda_param | float | 0.01 | L₁,₂ sparsity shrinkage threshold |
| mu | float | 10.0 | PA penalty parameter (controls update step size; regression default is larger than classification) |
| eta | float | 1.0 | CUR regularization coefficient — strength of feature-window constraint |
| L | int | 100 | Sliding window length (number of weight vector columns in ring buffer) |
| d_max | int | 1000 | Pre-allocated maximum feature dimension |
| random_seed | int | 1 | RNG seed |
Attributes
| Attribute | Type | Description |
| W | ndarray (d_max, L) | Ring buffer of weight vectors |
| X_cur | ndarray | Feature window used for CUR regularization |
| current_dim | int | Current feature dimensionality |
| lambda_param | float | L₁,₂ sparsity threshold |
| mu | float | PA penalty parameter |
| eta | float | CUR regularization coefficient |
| L | int | Sliding window size |
Methods
| Method | Signature | Returns | Description |
| train | (instance: Instance) → None | None | Selects incremental or decremental PA-R update based on feature-space change; applies L₁,₂ sparsity shrinkage; updates CUR feature window X_cur |
| predict | (instance: Instance) → float | float | Linear prediction using the latest weight column in the ring buffer |
Comparison with OASFClassifier
| Item | OASFClassifier | OASFRegressor |
| Loss function | Hinge loss (PA) | ε-insensitive loss (PA-R) |
| Default mu | 1.0 | 10.0 |
| Extra regularization | None | CUR matrix decomposition (eta) |
| Output | Class 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.