Regressor
Module: strata.base • Kind: trait • Traits: Estimator
Source: strata/base/estimator.mojo
trait Regressor(Estimator)from strata.base import RegressorInterface for supervised regression models.
Methods Overview
Section titled “Methods Overview”| Method | Description |
|---|---|
Regressor.fit() |
Fit the regressor to training data (X, y). |
Regressor.predict() |
Predict continuous target values for input samples. |
Method Details
Section titled “Method Details”Regressor.fit()
Section titled “Regressor.fit()”def fit[feat_dtype: DType, target_dtype: DType]( mut self, X: Matrix[feat_dtype], y: List[Scalar[target_dtype]],)Fit the regressor to training data (X, y).
| Parameter | Type | Description |
|---|---|---|
X |
Matrix[feat_dtype] |
Feature matrix. |
y |
List[Scalar[target_dtype]] |
Target vector / class labels. |
Regressor.predict()
Section titled “Regressor.predict()”def predict[feat_dtype: DType]( self, X: Matrix[feat_dtype],) -> List[Scalar[feat_dtype]]Predict continuous target values for input samples.
| Parameter | Type | Description |
|---|---|---|
X |
Matrix[feat_dtype] |
Feature matrix. |
Returns: List[Scalar[feat_dtype]]