Skip to main content

MLCore::ClassificationPipelineConfig

MLCore::ClassificationPipelineConfig

Full configuration for the classification pipeline.

#include <ClassificationPipeline.hpp>

Public Attributes

Name
std::string model_name
Name of the model to use (must be registered in the registry).
MLModelParametersBase const * model_params
Model-specific parameters (optional — nullptr uses defaults).
std::string feature_tensor_key
DataManager key of the TensorData to use as the feature matrix.
LabelAssemblyConfig label_config
Label assembly configuration (which labeling mode to use).
std::string label_interval_key
DataManager key of the DigitalIntervalSeries for interval-based labels.
std::string label_event_key
DataManager key of the DigitalEventSeries for event-based labels.
std::string training_interval_key
DataManager key of a DigitalIntervalSeries defining the training region.
std::string validation_interval_key
DataManager key of a DigitalIntervalSeries defining the validation region.
std::size_t max_cv_folds
Maximum number of leave-one-interval-out cross-validation folds.
ConversionConfig conversion_config
Feature conversion configuration.
bool balance_classes
Whether to apply class balancing before training.
BalancingConfig balancing_config
Class balancing configuration (used if balance_classes is true).
PredictionRegionConfig prediction_region
Where to make predictions after training.
PredictionWriterConfig output_config
Configuration for writing prediction outputs.
std::string time_key_str
Time key string for time frame lookups.
bool defer_dm_writes
If true, skip DataManager writes and store output in the result.

Public Attributes Documentation

variable model_name

std::string model_name;

Name of the model to use (must be registered in the registry).

E.g., “Random Forest”, “Naive Bayes”, “Logistic Regression”

variable model_params

MLModelParametersBase const  * model_params = nullptr;

Model-specific parameters (optional — nullptr uses defaults).

Must match the concrete parameter type expected by the chosen model.

variable feature_tensor_key

std::string feature_tensor_key;

DataManager key of the TensorData to use as the feature matrix.

The tensor must be 2D with time-indexed rows (RowType::TimeFrameIndex).

variable label_config

LabelAssemblyConfig label_config;

Label assembly configuration (which labeling mode to use).

variable label_interval_key

std::string label_interval_key;

DataManager key of the DigitalIntervalSeries for interval-based labels.

Required when label_config holds LabelFromIntervals. Ignored for other labeling modes.

variable label_event_key

std::string label_event_key;

DataManager key of the DigitalEventSeries for event-based labels.

Required when label_config holds LabelFromEvents. Ignored for other labeling modes.

variable training_interval_key

std::string training_interval_key;

DataManager key of a DigitalIntervalSeries defining the training region.

When non-empty, only feature rows whose TimeFrameIndex falls within one of the intervals in this series are used for training. Rows outside the training region are excluded from label assembly, class balancing, and model fitting, but may still be used for prediction.

When empty, all rows in the feature tensor are used for training.

variable validation_interval_key

std::string validation_interval_key;

DataManager key of a DigitalIntervalSeries defining the validation region.

When non-empty, only frames within these intervals are used for computing validation metrics. Unlike the old heuristic (“everything outside training = validation”), this explicitly specifies which intervals have known labels for evaluation.

Validation intervals are NOT used for training.

variable max_cv_folds

std::size_t max_cv_folds = 5;

Maximum number of leave-one-interval-out cross-validation folds.

When > 0 and at least 2 training intervals exist, the pipeline holds out each training interval in turn (up to this many), retrains on the rest, and predicts the held-out interval with boundary constraints. Set to 0 to disable cross-validation.

variable conversion_config

ConversionConfig conversion_config;

Feature conversion configuration.

Controls NaN dropping, z-score normalization, etc.

variable balance_classes

bool balance_classes = false;

Whether to apply class balancing before training.

variable balancing_config

BalancingConfig balancing_config;

Class balancing configuration (used if balance_classes is true).

variable prediction_region

PredictionRegionConfig prediction_region;

Where to make predictions after training.

variable output_config

PredictionWriterConfig output_config;

Configuration for writing prediction outputs.

variable time_key_str

std::string time_key_str = "time";

Time key string for time frame lookups.

Identifies which TimeFrame the feature tensor’s rows are indexed by. Used for label assembly (interval lookups) and output writing.

variable defer_dm_writes

bool defer_dm_writes = false;

If true, skip DataManager writes and store output in the result.

When running from a background thread, DataManager writes trigger observer callbacks that may manipulate Qt widgets, which is undefined behavior. Set this to true and perform the writes on the main thread instead.


Updated on 2026-11-13 at 20:25:42 +0000