aiq.profiler.forecasting.model_trainer#

Attributes#

Classes#

ModelTrainer

Orchestrates data preprocessing, training, and returning

Functions#

create_model(...)

A simple factory method that returns a model instance

Module Contents#

logger#
create_model(
model_type: str,
) aiq.profiler.forecasting.models.ForecastingBaseModel#

A simple factory method that returns a model instance based on the input string. Extend this with more model classes (e.g., PolynomialModel, RandomForestModel, etc.).

class ModelTrainer(model_type: str = DEFAULT_MODEL_TYPE)#

Orchestrates data preprocessing, training, and returning a fitted model.

model_type: e.g. “linear” matrix_length: how many rows to keep or pad in each input matrix

model_type = 'randomforest'#
_model#
train(
raw_stats: list[list[aiq.data_models.intermediate_step.IntermediateStep]],
) aiq.profiler.forecasting.models.ForecastingBaseModel#
raw_matrices: a list of 2D arrays, each shaped (n_rows, 4)

This is the ‘unprocessed’ data from the user.

Returns:

A fitted model (BaseModel).