Models#

MyoGestic supports following models out of the box: CatBoost, Sklearn, and RaulNet.

Each model is registered with Registry and must provide four functions: train, save, load, and predict.

Classifier vs Regressor#

Models are registered with is_classifier=True or is_classifier=False. Classifiers predict a single integer label (e.g., gesture class), while regressors predict a vector of continuous values (e.g., joint angles). The is_classifier flag determines which output-processing path the OutputSystemTemplate uses at runtime.

Temporal Preservation#

Some models (e.g., RaulNet CNNs) operate on time-series windows and require features that preserve the temporal dimension. These models are registered with requires_temporal_preservation=True and feature_window_size=<int>. The Training UI uses these flags to filter the feature list so that only compatible features are shown.

Note

To add a new model type, implement the four functions and register it via register_model(). See the Add a Model tutorial for a step-by-step guide.

CatBoost#

train(model, dataset, is_classifier, logger)

Train a CatBoost model.

save(model_path, model)

Save a CatBoost model.

load(model_path, model)

Load a CatBoost model.

predict(model, input, is_classifier)

Predict with a CatBoost model.

Sklearn#

train(model, dataset, is_classifier, _)

Train a sklearn model.

save(model_path, model)

Save a sklearn model.

load(model_path, _)

Load a sklearn model.

predict(model, input, is_classifier)

Predict with a sklearn model.

RaulNet#

train(model, dataset, _, gui_logger)

Train a RaulNet model using preprocessed features from the dataset.

save(_, __)

Return the path of the last saved RaulNet model checkpoint.

load(model_path, model)

Load a RaulNet model from checkpoint.

predict(model, input_data, is_classifier)

Predict with a RaulNet model.