Transformer
Module: strata.base • Kind: trait • Traits: Estimator
Source: strata/base/estimator.mojo
trait Transformer(Estimator)from strata.base import TransformerInterface for data preprocessing transformers.
Methods Overview
Section titled “Methods Overview”| Method | Description |
|---|---|
Transformer.fit() |
Fit the estimator to the provided input data. |
Transformer.transform() |
Transform input features using the fitted parameters. |
Transformer.fit_transform() |
Fit the estimator to X and return the transformed output. |
Method Details
Section titled “Method Details”Transformer.fit()
Section titled “Transformer.fit()”def fit[in_dtype: DType](mut self, X: Matrix[in_dtype])Fit the estimator to the provided input data.
| Parameter | Type | Description |
|---|---|---|
X |
Matrix[in_dtype] |
Feature matrix. |
Transformer.transform()
Section titled “Transformer.transform()”def transform[in_dtype: DType]( self, X: Matrix[in_dtype],) -> Matrix[in_dtype]Transform input features using the fitted parameters.
| Parameter | Type | Description |
|---|---|---|
X |
Matrix[in_dtype] |
Feature matrix. |
Returns: Matrix[in_dtype]
Transformer.fit_transform()
Section titled “Transformer.fit_transform()”def fit_transform[in_dtype: DType]( mut self, X: Matrix[in_dtype],) -> Matrix[in_dtype]Fit the estimator to X and return the transformed output.
| Parameter | Type | Description |
|---|---|---|
X |
Matrix[in_dtype] |
Feature matrix. |
Returns: Matrix[in_dtype]