Transfer Learning Pipeline#
To enable scalable and easy-to-run machine learning experiments on time-series data, SimbaML offers multiple pipelines covering data pre-processing, training, and evaluation of ML models. The transfer learning pipeline can be run by passing it the corresponding config file.
Configure Pipeline#
All provided machine learning pipelines of SimbaML can be configured based on config files. This way, users can change the models that are going to be trained, their hyperparameters, specify details for preprocessing and much more.
1# Define the models to be used for training
2[[models]]
3id = "KerasDenseNeuralNetworkTransferLearning"
4normalizer = true
5[models.training_params]
6epochs = 10
7patience = 5
8batch_size = 32
9validation_split = 0.2
10verbose = 0
11[models.archictecture_params]
12units = [32, 32]
13activation = "relu"
14
15# Define the metrics to be used for evaluating the model
16metrics = [
17 "r_square",
18 "mean_absolute_error",
19 "mean_squared_error",
20 "mean_absolute_percentage_error",
21 "root_mean_squared_error",
22 "normalized_root_mean_squared_error",
23]
24
25# Define data configurations
26[data]
27observed = "/tests/prediction/time_series/test_data/num_species_1/real/"
28synthetic = "/tests/prediction/time_series/test_data/num_species_1/simulated/"
29test_split = 0.2
30split_axis = "vertical"
31
32# Define the time series configurations
33[data.time_series]
34input_length = 1
35output_length = 1
36input_features = ["Infected", "Recovered"]
37output_features = ["Infected", "Recovered"]
38
39# Define the plugins you wrote to use your own models
40plugins = [
41 "tests.example_plugin",
42 "simba_ml.prediction.time_series.models.keras"
43]
44
45# If you include this section, the results will be logged to wandb
46# make sure to specify the right project and entity
47# [logging]
48# project = "your-wandb-project"
49# entity = "your-wandb-entity"
Start Pipeline#
$ simba_ml start-prediction transfer_learning –config-path transfer_learning_pipeline.toml