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.

Parameters#

model_type: str, default = “randomforest”

The type of model to train. Options include “linear” and “randomforest”.

model_type = 'randomforest'#
_model#
train(
raw_stats: list[list[aiq.profiler.intermediate_property_adapter.IntermediatePropertyAdaptor]],
) aiq.profiler.forecasting.models.ForecastingBaseModel#

Train the model using the raw_stats training data.

Parameters#

raw_stats: list[list[IntermediatePropertyAdaptor]]

Stats collected by the profiler.

Returns#

ForecastingBaseModel

A fitted model.