imbrium


Nameimbrium JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/maxmekiska/imbrium
SummaryStandard and Hybrid Deep Learning Multivariate-Multi-Step & Univariate-Multi-Step Time Series Forecasting.
upload_time2024-05-27 00:36:14
maintainerNone
docs_urlNone
authorMaximilian Mekiska
requires_pythonNone
licenseNone
keywords machinelearning keras deeplearning timeseries forecasting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # imbrium [![Downloads](https://pepy.tech/badge/imbrium)](https://pepy.tech/project/imbrium) [![PyPi](https://img.shields.io/pypi/v/imbrium.svg?color=blue)](https://pypi.org/project/imbrium/) [![GitHub license](https://img.shields.io/github/license/maxmekiska/Imbrium?color=black)](https://github.com/maxmekiska/Imbrium/blob/main/LICENSE) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/imbrium.svg)](https://pypi.python.org/project/imbrium/)

## Status

| Build | Status|
|---|---|
| `MAIN BUILD`  |  ![master](https://github.com/maxmekiska/imbrium/actions/workflows/main.yml/badge.svg?branch=main) |
| `DEV BUILD`   |  ![development](https://github.com/maxmekiska/imbrium/actions/workflows/main.yml/badge.svg?branch=development) |

## Pip install

```shell
pip install imbrium
```

Standard and Hybrid Deep Learning Multivariate-Multi-Step & Univariate-Multi-Step
Time Series Forecasting.


                          ██╗███╗░░░███╗██████╗░██████╗░██╗██╗░░░██╗███╗░░░███╗
                            ║████╗░████║██╔══██╗██╔══██╗██║██║░░░██║████╗░████║
                          ██║██╔████╔██║██████╦╝██████╔╝██║██║░░░██║██╔████╔██║
                          ██║██║╚██╔╝██║██╔══██╗██╔══██╗██║██║░░░██║██║╚██╔╝██║
                          ██║██║░╚═╝░██║██████╦╝██║░░██║██║╚██████╔╝██║░╚═╝░██║
                          ╚═╝╚═╝░░░░░╚═╝╚═════╝░╚═╝░░╚═╝╚═╝░╚═════╝░╚═╝░░░░░╚═╝


## Introduction to imbrium

imbrium is a deep learning library that specializes in time series forecasting. Its primary objective is to provide a user-friendly repository of deep learning architectures for this purpose. The focus is on simplifying the process of creating and applying these architectures, with the goal of allowing users to create complex architectures without having to build them from scratch. Instead, the emphasis shifts to high-level configuration of the architectures.


## imbrium Summary

imbrium is designed to simplify the application of deep learning models for time series forecasting. The library offers a variety of pre-built architectures. The user retains full control over the configuration of each layer, including the number of neurons, the type of activation function, loss function, optimizer, and metrics applied. This allows for the flexibility to adapt the architecture to the specific needs of the forecast task at hand. Imbrium also offers a user-friendly interface for training and evaluating these models, making it easy to quickly iterate and test different configurations.

imbrium uses the sliding window approach to generate forecasts. The sliding window approach in time series forecasting involves moving a fixed-size window - `steps_past` through historical data, using the data within the window as input features. The next data points outside the window are used as the target variables - `steps_future`. This method allows the model to learn sequential patterns and trends in the data, enabling accurate predictions for future points in the time series.


### Get started with imbrium

<details>
  <summary>Expand</summary>
  <br>

Note, if you choose to use TensorBoard, run the following command to display the results:

```shell
 tensorboard --logdir logs/
```

<details>
  <summary>Univariate Pure Predictors</summary>
  <br>


```python
from imbrium import PureUni

# create a PureUni object (numpy array expected)
predictor = PureUni(target = target_numpy_array, evaluation_split = 0.1, validation_split = 0.2)

# the following models are available for a PureUni objects;

# create and fit a muti-layer perceptron model
predictor.create_fit_mlp(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        dense_block_one = 1,
        dense_block_two = 1,
        dense_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a recurrent neural network model
predictor.create_fit_rnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        rnn_block_one = 1,
        rnn_block_two = 1,
        rnn_block_three = 1,
        metrics = "mean_squared_error",
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a long short-term neural network model
predictor.create_fit_lstm(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        lstm_block_one = 1,
        lstm_block_two = 1,
        lstm_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional neural network
predictor = create_fit_cnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        dense_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a gated recurrent unit neural network
predictor.create_fit_gru(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        gru_block_one = 1,
        gru_block_two = 1,
        gru_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional recurrent neural network
predictor.create_fit_birnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        birnn_block_one = 1,
        rnn_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional long short-term memory neural network
predictor.create_fit_bilstm(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        bilstm_block_one = 1,
        lstm_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional gated recurrent neural network
predictor.create_fit_bigru(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        bigru_block_one = 1,
        gru_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.

# in addition, you can add to all models early stopping arguments:

monitor='val_loss',
min_delta=0,
patience=0,
verbose=0,
mode='auto',
baseline=None,
restore_best_weights=False,
start_from_epoch=0


# instpect model structure
predictor.model_blueprint()

# evaluate model performance on testing data
predictor.evaluate_model(board=False)

# get model performance on testing data
predictor.show_evaluation()

# insptect keras model performances via (access dictionary via history key):
predictor.show_performance()

# make predictions via (numpy array expected):
predictor.predict(data)

# save predictor via:
predictor.freeze(absolute_path)

# load saved predictor via:
predictor.retrieve(location)
```

</details>

<details>
  <summary>Multivariate Pure Predictors</summary>
  <br>


```python
from imbrium import PureMulti

# create a PureMulti object (numpy array expected)
predictor = PureMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.1, validation_split = 0.2)

# the following models are available for a PureMulti objects;

# create and fit a muti-layer perceptron model
predictor.create_fit_mlp(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        dense_block_one = 1,
        dense_block_two = 1,
        dense_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a recurrent neural network model
predictor.create_fit_rnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        rnn_block_one = 1,
        rnn_block_two = 1,
        rnn_block_three = 1,
        metrics = "mean_squared_error",
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a long short-term neural network model
predictor.create_fit_lstm(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        lstm_block_one = 1,
        lstm_block_two = 1,
        lstm_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {"neurons": 50, "activation": "relu", "regularization": 0.0}
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional neural network
predictor = create_fit_cnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        dense_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a gated recurrent unit neural network
predictor.create_fit_gru(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        gru_block_one = 1,
        gru_block_two = 1,
        gru_block_three = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional recurrent neural network
predictor.create_fit_birnn(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        birnn_block_one = 1,
        rnn_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional long short-term memory neural network
predictor.create_fit_bilstm(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        bilstm_block_one = 1,
        lstm_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a bidirectional gated recurrent neural network
predictor.create_fit_bigru(
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        bigru_block_one = 1,
        gru_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "neurons": 50,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.

# in addition, you can add to all models early stopping arguments:

monitor='val_loss',
min_delta=0,
patience=0,
verbose=0,
mode='auto',
baseline=None,
restore_best_weights=False,
start_from_epoch=0


# instpect model structure
predictor.model_blueprint()

# evaluate model performance on testing data
predictor.evaluate_model(board=False)

# get model performance on testing data
predictor.show_evaluation()

# insptect keras model performances via (access dictionary via history key):
predictor.show_performance()

# make predictions via (numpy array expected):
predictor.predict(data)

# save predictor via:
predictor.freeze(absolute_path)

# load saved predictor via:
predictor.retrieve(location)
```
</details>

<details>
  <summary>Univariate Hybrid Predictors</summary>
  <br>

```python
from imbrium import HybridUni

# create a HybridUni object (numpy array expected)
predictor = HybridUni(target = target_numpy_array, evaluation_split = 0.1, validation_split = 0.2)

# the following models are available for a HybridUni objects:
# create and fit a convolutional recurrent neural network
predictor.create_fit_cnnrnn(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        rnn_block_one = 1,
        rnn_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional long short-term memory neural network
predictor.create_fit_cnnlstm(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        lstm_block_one = 1,
        lstm_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional gated recurrent unit neural network
predictor.create_fit_cnngru(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        gru_block_one = 1,
        gru_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional recurrent neural network
predictor.create_fit_cnnbirnn(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        birnn_block_one = 1,
        rnn_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional long short-term neural network
predictor.create_fit_cnnbilstm(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        bilstm_block_one = 1,
        lstm_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional gated recurrent neural network
predictor.create_fit_cnnbigru(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        bigru_block_one = 1,
        gru_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.

# in addition, you can add to all models early stopping arguments:

monitor='val_loss',
min_delta=0,
patience=0,
verbose=0,
mode='auto',
baseline=None,
restore_best_weights=False,
start_from_epoch=0


# instpect model structure
predictor.model_blueprint()

# evaluate model performance on testing data
predictor.evaluate_model(board=False)

# get model performance on testing data
predictor.show_evaluation()

# insptect keras model performances via (access dictionary via history key):
predictor.show_performance()

# make predictions via (numpy array expected):
# - when loading/retrieving a saved model, provide sub_seq, steps_past, steps_future in the predict method!
predictor.predict(data, sub_seq=None, steps_past=None, steps_future=None)

# save predictor via:
predictor.freeze(absolute_path)

# load saved predictor via:
predictor.retrieve(location)
```

</details>

<details>
  <summary>Multivariate Hybrid Predictors</summary>
  <br>


```python
from imbrium import HybridMulti

# create a HybridMulti object (numpy array expected)
predictor = HybridMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.1, validation_split = 0.2)

# the following models are available for a HybridMulti objects:
# create and fit a convolutional recurrent neural network
predictor.create_fit_cnnrnn(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        rnn_block_one = 1,
        rnn_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional long short-term memory neural network
predictor.create_fit_cnnlstm(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        lstm_block_one = 1,
        lstm_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional gated recurrent unit neural network
predictor.create_fit_cnngru(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        gru_block_one = 1,
        gru_block_two = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional recurrent neural network
predictor.create_fit_cnnbirnn(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        birnn_block_one = 1,
        rnn_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional long short-term neural network
predictor.create_fit_cnnbilstm(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        bilstm_block_one = 1,
        lstm_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# create and fit a convolutional bidirectional gated recurrent neural network
predictor.create_fit_cnnbigru(
        sub_seq,
        steps_past,
        steps_future,
        optimizer = "adam",
        optimizer_args = None,
        loss = "mean_squared_error",
        metrics = "mean_squared_error",
        conv_block_one = 1,
        conv_block_two = 1,
        bigru_block_one = 1,
        gru_block_one = 1,
        layer_config = {
            "layer0": {
                "config": {
                    "filters": 64,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer1": {
                "config": {
                    "filters": 32,
                    "kernel_size": 1,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer2": {
                "config": {
                    "pool_size": 2,
                }
            },
            "layer3": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                    "dropout": 0.0,
                }
            },
            "layer4": {
                "config": {
                    "neurons": 32,
                    "activation": "relu",
                    "regularization": 0.0,
                }
            },
        },
        epochs = 100,
        batch_size = None,
        show_progress = 1,
        board = False,
)

# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.

# in addition, you can add to all models early stopping arguments:

monitor='val_loss',
min_delta=0,
patience=0,
verbose=0,
mode='auto',
baseline=None,
restore_best_weights=False,
start_from_epoch=0


# instpect model structure
predictor.model_blueprint()

# evaluate model performance on testing data
predictor.evaluate_model(board=False)

# get model performance on testing data
predictor.show_evaluation()

# insptect keras model performances via (access dictionary via history key):
predictor.show_performance()

# make predictions via (numpy array expected):
# - when loading/retrieving a saved model, provide sub_seq, steps_past, steps_future in the predict method!
predictor.predict(data, sub_seq=None, steps_past=None, steps_future=None)

# save predictor via:
predictor.freeze(absolute_path)

# load saved predictor via:
predictor.retrieve(location)
```
</details>

</details>

### Use Case: scaling + hyper parameter optimization

https://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/use-case-1.ipynb

### Integration tests

https://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/IntegrationTest.ipynb


## References

<details>
  <summary>Expand</summary>
  <br>

Brwonlee, J., 2016. Display deep learning model training history in keras [Online]. Available from:
https://machinelearningmastery.com/display-deep-
learning-model-training-history-in-keras/.

Brwonlee, J., 2018a. How to develop convolutional neural network models for time series forecasting [Online]. Available from:
https://machinelearningmastery.com/how-to-develop-convolutional-
neural-network-models-for-time-series-forecasting/.

Brwonlee, J., 2018b. How to develop lstm models for time series forecasting [Online]. Available from:
https://machinelearningmastery.com/how-to-develop-
lstm-models-for-time-series-forecasting/.

Brwonlee, J., 2018c. How to develop multilayer perceptron models for time series forecasting [Online]. Available from:
https://machinelearningmastery.com/how-to-develop-multilayer-
perceptron-models-for-time-series-forecasting/.

</details>


</details>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/maxmekiska/imbrium",
    "name": "imbrium",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "machinelearning, keras, deeplearning, timeseries, forecasting",
    "author": "Maximilian Mekiska",
    "author_email": "maxmekiska@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/68/23/7ffc3dc41ad20b020ca8304ff9f7d9586fb59a60646dbfc8e15cc31133f1/imbrium-3.1.0.tar.gz",
    "platform": null,
    "description": "# imbrium [![Downloads](https://pepy.tech/badge/imbrium)](https://pepy.tech/project/imbrium) [![PyPi](https://img.shields.io/pypi/v/imbrium.svg?color=blue)](https://pypi.org/project/imbrium/) [![GitHub license](https://img.shields.io/github/license/maxmekiska/Imbrium?color=black)](https://github.com/maxmekiska/Imbrium/blob/main/LICENSE) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/imbrium.svg)](https://pypi.python.org/project/imbrium/)\r\n\r\n## Status\r\n\r\n| Build | Status|\r\n|---|---|\r\n| `MAIN BUILD`  |  ![master](https://github.com/maxmekiska/imbrium/actions/workflows/main.yml/badge.svg?branch=main) |\r\n| `DEV BUILD`   |  ![development](https://github.com/maxmekiska/imbrium/actions/workflows/main.yml/badge.svg?branch=development) |\r\n\r\n## Pip install\r\n\r\n```shell\r\npip install imbrium\r\n```\r\n\r\nStandard and Hybrid Deep Learning Multivariate-Multi-Step & Univariate-Multi-Step\r\nTime Series Forecasting.\r\n\r\n\r\n                          \u2588\u2588\u2557\u2588\u2588\u2588\u2557\u2591\u2591\u2591\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2557\u2588\u2588\u2557\u2591\u2591\u2591\u2588\u2588\u2557\u2588\u2588\u2588\u2557\u2591\u2591\u2591\u2588\u2588\u2588\u2557\r\n                            \u2551\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551\u2591\u2591\u2591\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2588\u2588\u2551\r\n                          \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2566\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2588\u2588\u2551\u2591\u2591\u2591\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\r\n                          \u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551\u2591\u2591\u2591\u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2554\u255d\u2588\u2588\u2551\r\n                          \u2588\u2588\u2551\u2588\u2588\u2551\u2591\u255a\u2550\u255d\u2591\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2566\u255d\u2588\u2588\u2551\u2591\u2591\u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2591\u255a\u2550\u255d\u2591\u2588\u2588\u2551\r\n                          \u255a\u2550\u255d\u255a\u2550\u255d\u2591\u2591\u2591\u2591\u2591\u255a\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u255d\u2591\u255a\u2550\u255d\u2591\u2591\u255a\u2550\u255d\u255a\u2550\u255d\u2591\u255a\u2550\u2550\u2550\u2550\u2550\u255d\u2591\u255a\u2550\u255d\u2591\u2591\u2591\u2591\u2591\u255a\u2550\u255d\r\n\r\n\r\n## Introduction to imbrium\r\n\r\nimbrium is a deep learning library that specializes in time series forecasting. Its primary objective is to provide a user-friendly repository of deep learning architectures for this purpose. The focus is on simplifying the process of creating and applying these architectures, with the goal of allowing users to create complex architectures without having to build them from scratch. Instead, the emphasis shifts to high-level configuration of the architectures.\r\n\r\n\r\n## imbrium Summary\r\n\r\nimbrium is designed to simplify the application of deep learning models for time series forecasting. The library offers a variety of pre-built architectures. The user retains full control over the configuration of each layer, including the number of neurons, the type of activation function, loss function, optimizer, and metrics applied. This allows for the flexibility to adapt the architecture to the specific needs of the forecast task at hand. Imbrium also offers a user-friendly interface for training and evaluating these models, making it easy to quickly iterate and test different configurations.\r\n\r\nimbrium uses the sliding window approach to generate forecasts. The sliding window approach in time series forecasting involves moving a fixed-size window - `steps_past` through historical data, using the data within the window as input features. The next data points outside the window are used as the target variables - `steps_future`. This method allows the model to learn sequential patterns and trends in the data, enabling accurate predictions for future points in the time series.\r\n\r\n\r\n### Get started with imbrium\r\n\r\n<details>\r\n  <summary>Expand</summary>\r\n  <br>\r\n\r\nNote, if you choose to use TensorBoard, run the following command to display the results:\r\n\r\n```shell\r\n tensorboard --logdir logs/\r\n```\r\n\r\n<details>\r\n  <summary>Univariate Pure Predictors</summary>\r\n  <br>\r\n\r\n\r\n```python\r\nfrom imbrium import PureUni\r\n\r\n# create a PureUni object (numpy array expected)\r\npredictor = PureUni(target = target_numpy_array, evaluation_split = 0.1, validation_split = 0.2)\r\n\r\n# the following models are available for a PureUni objects;\r\n\r\n# create and fit a muti-layer perceptron model\r\npredictor.create_fit_mlp(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        dense_block_one = 1,\r\n        dense_block_two = 1,\r\n        dense_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a recurrent neural network model\r\npredictor.create_fit_rnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        rnn_block_one = 1,\r\n        rnn_block_two = 1,\r\n        rnn_block_three = 1,\r\n        metrics = \"mean_squared_error\",\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a long short-term neural network model\r\npredictor.create_fit_lstm(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        lstm_block_one = 1,\r\n        lstm_block_two = 1,\r\n        lstm_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional neural network\r\npredictor = create_fit_cnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        dense_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a gated recurrent unit neural network\r\npredictor.create_fit_gru(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        gru_block_one = 1,\r\n        gru_block_two = 1,\r\n        gru_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional recurrent neural network\r\npredictor.create_fit_birnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        birnn_block_one = 1,\r\n        rnn_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional long short-term memory neural network\r\npredictor.create_fit_bilstm(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        bilstm_block_one = 1,\r\n        lstm_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional gated recurrent neural network\r\npredictor.create_fit_bigru(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        bigru_block_one = 1,\r\n        gru_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.\r\n\r\n# in addition, you can add to all models early stopping arguments:\r\n\r\nmonitor='val_loss',\r\nmin_delta=0,\r\npatience=0,\r\nverbose=0,\r\nmode='auto',\r\nbaseline=None,\r\nrestore_best_weights=False,\r\nstart_from_epoch=0\r\n\r\n\r\n# instpect model structure\r\npredictor.model_blueprint()\r\n\r\n# evaluate model performance on testing data\r\npredictor.evaluate_model(board=False)\r\n\r\n# get model performance on testing data\r\npredictor.show_evaluation()\r\n\r\n# insptect keras model performances via (access dictionary via history key):\r\npredictor.show_performance()\r\n\r\n# make predictions via (numpy array expected):\r\npredictor.predict(data)\r\n\r\n# save predictor via:\r\npredictor.freeze(absolute_path)\r\n\r\n# load saved predictor via:\r\npredictor.retrieve(location)\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n  <summary>Multivariate Pure Predictors</summary>\r\n  <br>\r\n\r\n\r\n```python\r\nfrom imbrium import PureMulti\r\n\r\n# create a PureMulti object (numpy array expected)\r\npredictor = PureMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.1, validation_split = 0.2)\r\n\r\n# the following models are available for a PureMulti objects;\r\n\r\n# create and fit a muti-layer perceptron model\r\npredictor.create_fit_mlp(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        dense_block_one = 1,\r\n        dense_block_two = 1,\r\n        dense_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a recurrent neural network model\r\npredictor.create_fit_rnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        rnn_block_one = 1,\r\n        rnn_block_two = 1,\r\n        rnn_block_three = 1,\r\n        metrics = \"mean_squared_error\",\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a long short-term neural network model\r\npredictor.create_fit_lstm(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        lstm_block_one = 1,\r\n        lstm_block_two = 1,\r\n        lstm_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\"neurons\": 50, \"activation\": \"relu\", \"regularization\": 0.0}\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional neural network\r\npredictor = create_fit_cnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        dense_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a gated recurrent unit neural network\r\npredictor.create_fit_gru(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        gru_block_one = 1,\r\n        gru_block_two = 1,\r\n        gru_block_three = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional recurrent neural network\r\npredictor.create_fit_birnn(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        birnn_block_one = 1,\r\n        rnn_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional long short-term memory neural network\r\npredictor.create_fit_bilstm(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        bilstm_block_one = 1,\r\n        lstm_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a bidirectional gated recurrent neural network\r\npredictor.create_fit_bigru(\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        bigru_block_one = 1,\r\n        gru_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"neurons\": 50,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.\r\n\r\n# in addition, you can add to all models early stopping arguments:\r\n\r\nmonitor='val_loss',\r\nmin_delta=0,\r\npatience=0,\r\nverbose=0,\r\nmode='auto',\r\nbaseline=None,\r\nrestore_best_weights=False,\r\nstart_from_epoch=0\r\n\r\n\r\n# instpect model structure\r\npredictor.model_blueprint()\r\n\r\n# evaluate model performance on testing data\r\npredictor.evaluate_model(board=False)\r\n\r\n# get model performance on testing data\r\npredictor.show_evaluation()\r\n\r\n# insptect keras model performances via (access dictionary via history key):\r\npredictor.show_performance()\r\n\r\n# make predictions via (numpy array expected):\r\npredictor.predict(data)\r\n\r\n# save predictor via:\r\npredictor.freeze(absolute_path)\r\n\r\n# load saved predictor via:\r\npredictor.retrieve(location)\r\n```\r\n</details>\r\n\r\n<details>\r\n  <summary>Univariate Hybrid Predictors</summary>\r\n  <br>\r\n\r\n```python\r\nfrom imbrium import HybridUni\r\n\r\n# create a HybridUni object (numpy array expected)\r\npredictor = HybridUni(target = target_numpy_array, evaluation_split = 0.1, validation_split = 0.2)\r\n\r\n# the following models are available for a HybridUni objects:\r\n# create and fit a convolutional recurrent neural network\r\npredictor.create_fit_cnnrnn(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        rnn_block_one = 1,\r\n        rnn_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional long short-term memory neural network\r\npredictor.create_fit_cnnlstm(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        lstm_block_one = 1,\r\n        lstm_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional gated recurrent unit neural network\r\npredictor.create_fit_cnngru(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        gru_block_one = 1,\r\n        gru_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional recurrent neural network\r\npredictor.create_fit_cnnbirnn(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        birnn_block_one = 1,\r\n        rnn_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional long short-term neural network\r\npredictor.create_fit_cnnbilstm(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        bilstm_block_one = 1,\r\n        lstm_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional gated recurrent neural network\r\npredictor.create_fit_cnnbigru(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        bigru_block_one = 1,\r\n        gru_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.\r\n\r\n# in addition, you can add to all models early stopping arguments:\r\n\r\nmonitor='val_loss',\r\nmin_delta=0,\r\npatience=0,\r\nverbose=0,\r\nmode='auto',\r\nbaseline=None,\r\nrestore_best_weights=False,\r\nstart_from_epoch=0\r\n\r\n\r\n# instpect model structure\r\npredictor.model_blueprint()\r\n\r\n# evaluate model performance on testing data\r\npredictor.evaluate_model(board=False)\r\n\r\n# get model performance on testing data\r\npredictor.show_evaluation()\r\n\r\n# insptect keras model performances via (access dictionary via history key):\r\npredictor.show_performance()\r\n\r\n# make predictions via (numpy array expected):\r\n# - when loading/retrieving a saved model, provide sub_seq, steps_past, steps_future in the predict method!\r\npredictor.predict(data, sub_seq=None, steps_past=None, steps_future=None)\r\n\r\n# save predictor via:\r\npredictor.freeze(absolute_path)\r\n\r\n# load saved predictor via:\r\npredictor.retrieve(location)\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n  <summary>Multivariate Hybrid Predictors</summary>\r\n  <br>\r\n\r\n\r\n```python\r\nfrom imbrium import HybridMulti\r\n\r\n# create a HybridMulti object (numpy array expected)\r\npredictor = HybridMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.1, validation_split = 0.2)\r\n\r\n# the following models are available for a HybridMulti objects:\r\n# create and fit a convolutional recurrent neural network\r\npredictor.create_fit_cnnrnn(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        rnn_block_one = 1,\r\n        rnn_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional long short-term memory neural network\r\npredictor.create_fit_cnnlstm(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        lstm_block_one = 1,\r\n        lstm_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional gated recurrent unit neural network\r\npredictor.create_fit_cnngru(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        gru_block_one = 1,\r\n        gru_block_two = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional recurrent neural network\r\npredictor.create_fit_cnnbirnn(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        birnn_block_one = 1,\r\n        rnn_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional long short-term neural network\r\npredictor.create_fit_cnnbilstm(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        bilstm_block_one = 1,\r\n        lstm_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# create and fit a convolutional bidirectional gated recurrent neural network\r\npredictor.create_fit_cnnbigru(\r\n        sub_seq,\r\n        steps_past,\r\n        steps_future,\r\n        optimizer = \"adam\",\r\n        optimizer_args = None,\r\n        loss = \"mean_squared_error\",\r\n        metrics = \"mean_squared_error\",\r\n        conv_block_one = 1,\r\n        conv_block_two = 1,\r\n        bigru_block_one = 1,\r\n        gru_block_one = 1,\r\n        layer_config = {\r\n            \"layer0\": {\r\n                \"config\": {\r\n                    \"filters\": 64,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer1\": {\r\n                \"config\": {\r\n                    \"filters\": 32,\r\n                    \"kernel_size\": 1,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer2\": {\r\n                \"config\": {\r\n                    \"pool_size\": 2,\r\n                }\r\n            },\r\n            \"layer3\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                    \"dropout\": 0.0,\r\n                }\r\n            },\r\n            \"layer4\": {\r\n                \"config\": {\r\n                    \"neurons\": 32,\r\n                    \"activation\": \"relu\",\r\n                    \"regularization\": 0.0,\r\n                }\r\n            },\r\n        },\r\n        epochs = 100,\r\n        batch_size = None,\r\n        show_progress = 1,\r\n        board = False,\r\n)\r\n\r\n# you can add additional layer to the defualt layers by increasing the layer block count and adding the configuration for the layer in the layer_config dictionary. Please note that the last layer should not have a dropout key.\r\n\r\n# in addition, you can add to all models early stopping arguments:\r\n\r\nmonitor='val_loss',\r\nmin_delta=0,\r\npatience=0,\r\nverbose=0,\r\nmode='auto',\r\nbaseline=None,\r\nrestore_best_weights=False,\r\nstart_from_epoch=0\r\n\r\n\r\n# instpect model structure\r\npredictor.model_blueprint()\r\n\r\n# evaluate model performance on testing data\r\npredictor.evaluate_model(board=False)\r\n\r\n# get model performance on testing data\r\npredictor.show_evaluation()\r\n\r\n# insptect keras model performances via (access dictionary via history key):\r\npredictor.show_performance()\r\n\r\n# make predictions via (numpy array expected):\r\n# - when loading/retrieving a saved model, provide sub_seq, steps_past, steps_future in the predict method!\r\npredictor.predict(data, sub_seq=None, steps_past=None, steps_future=None)\r\n\r\n# save predictor via:\r\npredictor.freeze(absolute_path)\r\n\r\n# load saved predictor via:\r\npredictor.retrieve(location)\r\n```\r\n</details>\r\n\r\n</details>\r\n\r\n### Use Case: scaling + hyper parameter optimization\r\n\r\nhttps://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/use-case-1.ipynb\r\n\r\n### Integration tests\r\n\r\nhttps://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/IntegrationTest.ipynb\r\n\r\n\r\n## References\r\n\r\n<details>\r\n  <summary>Expand</summary>\r\n  <br>\r\n\r\nBrwonlee, J., 2016. Display deep learning model training history in keras [Online]. Available from:\r\nhttps://machinelearningmastery.com/display-deep-\r\nlearning-model-training-history-in-keras/.\r\n\r\nBrwonlee, J., 2018a. How to develop convolutional neural network models for time series forecasting [Online]. Available from:\r\nhttps://machinelearningmastery.com/how-to-develop-convolutional-\r\nneural-network-models-for-time-series-forecasting/.\r\n\r\nBrwonlee, J., 2018b. How to develop lstm models for time series forecasting [Online]. Available from:\r\nhttps://machinelearningmastery.com/how-to-develop-\r\nlstm-models-for-time-series-forecasting/.\r\n\r\nBrwonlee, J., 2018c. How to develop multilayer perceptron models for time series forecasting [Online]. Available from:\r\nhttps://machinelearningmastery.com/how-to-develop-multilayer-\r\nperceptron-models-for-time-series-forecasting/.\r\n\r\n</details>\r\n\r\n\r\n</details>\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Standard and Hybrid Deep Learning Multivariate-Multi-Step & Univariate-Multi-Step Time Series Forecasting.",
    "version": "3.1.0",
    "project_urls": {
        "Homepage": "https://github.com/maxmekiska/imbrium"
    },
    "split_keywords": [
        "machinelearning",
        " keras",
        " deeplearning",
        " timeseries",
        " forecasting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e2b9d1e0f38cc9d86931dec7347df509f1fc49665ad2b8727eb7c9cc5bfad92",
                "md5": "f5119dfc576a91f236880f8defdf75b5",
                "sha256": "fb2db4f8e9028d1209c902996d4806a86d1cc6534c8e4db23fcd13a2d76af18a"
            },
            "downloads": -1,
            "filename": "imbrium-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5119dfc576a91f236880f8defdf75b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 27967,
            "upload_time": "2024-05-27T00:36:12",
            "upload_time_iso_8601": "2024-05-27T00:36:12.341546Z",
            "url": "https://files.pythonhosted.org/packages/4e/2b/9d1e0f38cc9d86931dec7347df509f1fc49665ad2b8727eb7c9cc5bfad92/imbrium-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68237ffc3dc41ad20b020ca8304ff9f7d9586fb59a60646dbfc8e15cc31133f1",
                "md5": "c67fbaaee974cccf47c412902db207c4",
                "sha256": "c8df8729b9886e601fbc1e0af48d5d287fe0c597514a509e2213ab9e08717879"
            },
            "downloads": -1,
            "filename": "imbrium-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c67fbaaee974cccf47c412902db207c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30237,
            "upload_time": "2024-05-27T00:36:14",
            "upload_time_iso_8601": "2024-05-27T00:36:14.342132Z",
            "url": "https://files.pythonhosted.org/packages/68/23/7ffc3dc41ad20b020ca8304ff9f7d9586fb59a60646dbfc8e15cc31133f1/imbrium-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-27 00:36:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maxmekiska",
    "github_project": "imbrium",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "imbrium"
}
        
Elapsed time: 4.96641s