Skip to content

Commit 5893d40

Browse files
authored
Merge pull request #10 from maxmekiska/development
imbrium 3.0.0
2 parents ee57ab1 + e05e630 commit 5893d40

File tree

22 files changed

+381
-244
lines changed

22 files changed

+381
-244
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: windows-latest
99
strategy:
1010
matrix:
11-
python: ["3.8", "3.9", "3.10", "3.11"]
11+
python: ["3.9", "3.10", "3.11"]
1212

1313
steps:
1414
- uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ activation function type
8484

8585
### 2.0.0
8686

87-
- adapted `keras_core`
87+
- adapted `keras`
8888
- removed internal hyperparameter tuning
8989
- removed encoder-decoder architectures
9090
- improved layer configuration via dictionary input
@@ -99,4 +99,12 @@ activation function type
9999

100100
- feat!: removed data preparation out of predictor class, sub_seq, steps_past, steps_future need now to be defined in each model method
101101
- allows for advanced hyper parameter tuning
102-
- fix: removed tensor board activation logic bug
102+
- fix: removed tensor board activation logic bug
103+
104+
### 3.0.0
105+
106+
- chore!: changed from temp library keras_core to keras > 3.0.0
107+
- chore!: removed python 3.8 support to accomodate tensorflow and keras dependiencies
108+
- chore: increased major to 3.0.0 to align with keras major
109+
- feat: added evaluate_model method to test model performance on test data
110+
- refactor!: removed validation split from `fit_model`. Control validation and test split via evaluation_split and validation_split paramters in class variables

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ imbrium is a deep learning library that specializes in time series forecasting.
3434

3535
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.
3636

37-
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.
37+
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.
3838

39-
## imbrium 2.0.0
39+
## imbrium `2.0.0`
4040

4141
- adapting `keras_core`
4242
- removing internal hyperparameter tuning
@@ -45,6 +45,10 @@ imbrium uses the sliding window approach to generate forecasts. The sliding wind
4545
- split input data into target and feature numpy arrays
4646
- overall lighten the library
4747

48+
## imbrium `3.0.0`
49+
50+
- switch from `keras_core` to `keras > 3.0.0`
51+
4852
### Get started with imbrium
4953

5054
<details>
@@ -60,7 +64,7 @@ imbrium uses the sliding window approach to generate forecasts. The sliding wind
6064
from imbrium import PureUni
6165

6266
# create a PureUni object (numpy array expected)
63-
predictor = PureUni(target = target_numpy_array)
67+
predictor = PureUni(target = target_numpy_array, evaluation_split = 0.2, validation_split = 0.2)
6468

6569
# the following models are available for a PureUni objects;
6670

@@ -98,7 +102,6 @@ predictor.create_fit_mlp(
98102
},
99103
epochs = 100,
100104
show_progress = 1,
101-
validation_split = 0.20,
102105
board = False,
103106
)
104107

@@ -136,7 +139,6 @@ predictor.create_fit_rnn(
136139
},
137140
epochs = 100,
138141
show_progress = 1,
139-
validation_split = 0.20,
140142
board = False,
141143
)
142144

@@ -174,7 +176,6 @@ predictor.create_fit_lstm(
174176
},
175177
epochs = 100,
176178
show_progress = 1,
177-
validation_split = 0.20,
178179
board = False,
179180
)
180181

@@ -223,7 +224,6 @@ predictor = create_fit_cnn(
223224
},
224225
epochs = 100,
225226
show_progress = 1,
226-
validation_split = 0.20,
227227
board = False,
228228
)
229229

@@ -265,7 +265,6 @@ predictor.create_fit_gru(
265265
},
266266
epochs = 100,
267267
show_progress = 1,
268-
validation_split = 0.20,
269268
board = False,
270269
)
271270

@@ -298,7 +297,6 @@ predictor.create_fit_birnn(
298297
},
299298
epochs = 100,
300299
show_progress = 1,
301-
validation_split = 0.20,
302300
board = False,
303301
)
304302

@@ -331,7 +329,6 @@ predictor.create_fit_bilstm(
331329
},
332330
epochs = 100,
333331
show_progress = 1,
334-
validation_split = 0.20,
335332
board = False,
336333
)
337334

@@ -364,7 +361,6 @@ predictor.create_fit_bigru(
364361
},
365362
epochs = 100,
366363
show_progress = 1,
367-
validation_split = 0.20,
368364
board = False,
369365
)
370366

@@ -385,6 +381,12 @@ start_from_epoch=0
385381
# instpect model structure
386382
predictor.model_blueprint()
387383

384+
# evaluate model performance on testing data
385+
predictor.evaluate_model()
386+
387+
# get model performance on testing data
388+
predictor.show_evaluation()
389+
388390
# insptect keras model performances via (access dictionary via history key):
389391
predictor.show_performance()
390392

@@ -409,7 +411,7 @@ predictor.retrieve(location)
409411
from imbrium import PureMulti
410412

411413
# create a PureMulti object (numpy array expected)
412-
predictor = PureMulti(target = target_numpy_array, features = features_numpy_array)
414+
predictor = PureMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.2, validation_split = 0.2)
413415

414416
# the following models are available for a PureMulti objects;
415417

@@ -447,7 +449,6 @@ predictor.create_fit_mlp(
447449
},
448450
epochs = 100,
449451
show_progress = 1,
450-
validation_split = 0.20,
451452
board = False,
452453
)
453454

@@ -485,7 +486,6 @@ predictor.create_fit_rnn(
485486
},
486487
epochs = 100,
487488
show_progress = 1,
488-
validation_split = 0.20,
489489
board = False,
490490
)
491491

@@ -523,7 +523,6 @@ predictor.create_fit_lstm(
523523
},
524524
epochs = 100,
525525
show_progress = 1,
526-
validation_split = 0.20,
527526
board = False,
528527
)
529528

@@ -572,7 +571,6 @@ predictor = create_fit_cnn(
572571
},
573572
epochs = 100,
574573
show_progress = 1,
575-
validation_split = 0.20,
576574
board = False,
577575
)
578576

@@ -614,7 +612,6 @@ predictor.create_fit_gru(
614612
},
615613
epochs = 100,
616614
show_progress = 1,
617-
validation_split = 0.20,
618615
board = False,
619616
)
620617

@@ -647,7 +644,6 @@ predictor.create_fit_birnn(
647644
},
648645
epochs = 100,
649646
show_progress = 1,
650-
validation_split = 0.20,
651647
board = False,
652648
)
653649

@@ -680,7 +676,6 @@ predictor.create_fit_bilstm(
680676
},
681677
epochs = 100,
682678
show_progress = 1,
683-
validation_split = 0.20,
684679
board = False,
685680
)
686681

@@ -713,7 +708,6 @@ predictor.create_fit_bigru(
713708
},
714709
epochs = 100,
715710
show_progress = 1,
716-
validation_split = 0.20,
717711
board = False,
718712
)
719713

@@ -734,6 +728,12 @@ start_from_epoch=0
734728
# instpect model structure
735729
predictor.model_blueprint()
736730

731+
# evaluate model performance on testing data
732+
predictor.evaluate_model()
733+
734+
# get model performance on testing data
735+
predictor.show_evaluation()
736+
737737
# insptect keras model performances via (access dictionary via history key):
738738
predictor.show_performance()
739739

@@ -756,7 +756,7 @@ predictor.retrieve(location)
756756
from imbrium import HybridUni
757757

758758
# create a HybridUni object (numpy array expected)
759-
predictor = HybridUni(target = target_numpy_array)
759+
predictor = HybridUni(target = target_numpy_array, evaluation_split = 0.2, validation_split = 0.2)
760760

761761
# the following models are available for a HybridUni objects:
762762
# create and fit a convolutional recurrent neural network
@@ -814,7 +814,6 @@ predictor.create_fit_cnnrnn(
814814
},
815815
epochs = 100,
816816
show_progress = 1,
817-
validation_split = 0.20,
818817
board = False,
819818
)
820819

@@ -873,7 +872,6 @@ predictor.create_fit_cnnlstm(
873872
},
874873
epochs = 100,
875874
show_progress = 1,
876-
validation_split = 0.20,
877875
board = False,
878876
)
879877

@@ -932,7 +930,6 @@ predictor.create_fit_cnngru(
932930
},
933931
epochs = 100,
934932
show_progress = 1,
935-
validation_split = 0.20,
936933
board = False,
937934
)
938935

@@ -991,7 +988,6 @@ predictor.create_fit_cnnbirnn(
991988
},
992989
epochs = 100,
993990
show_progress = 1,
994-
validation_split = 0.20,
995991
board = False,
996992
)
997993

@@ -1050,7 +1046,6 @@ predictor.create_fit_cnnbilstm(
10501046
},
10511047
epochs = 100,
10521048
show_progress = 1,
1053-
validation_split = 0.20,
10541049
board = False,
10551050
)
10561051

@@ -1109,7 +1104,6 @@ predictor.create_fit_cnnbigru(
11091104
},
11101105
epochs = 100,
11111106
show_progress = 1,
1112-
validation_split = 0.20,
11131107
board = False,
11141108
)
11151109

@@ -1130,6 +1124,12 @@ start_from_epoch=0
11301124
# instpect model structure
11311125
predictor.model_blueprint()
11321126

1127+
# evaluate model performance on testing data
1128+
predictor.evaluate_model()
1129+
1130+
# get model performance on testing data
1131+
predictor.show_evaluation()
1132+
11331133
# insptect keras model performances via (access dictionary via history key):
11341134
predictor.show_performance()
11351135

@@ -1155,7 +1155,7 @@ predictor.retrieve(location)
11551155
from imbrium import HybridMulti
11561156

11571157
# create a HybridMulti object (numpy array expected)
1158-
predictor = HybridMulti(target = target_numpy_array, features = features_numpy_array)
1158+
predictor = HybridMulti(target = target_numpy_array, features = features_numpy_array, evaluation_split = 0.2, validation_split = 0.2)
11591159

11601160
# the following models are available for a HybridMulti objects:
11611161
# create and fit a convolutional recurrent neural network
@@ -1213,7 +1213,6 @@ predictor.create_fit_cnnrnn(
12131213
},
12141214
epochs = 100,
12151215
show_progress = 1,
1216-
validation_split = 0.20,
12171216
board = False,
12181217
)
12191218

@@ -1272,7 +1271,6 @@ predictor.create_fit_cnnlstm(
12721271
},
12731272
epochs = 100,
12741273
show_progress = 1,
1275-
validation_split = 0.20,
12761274
board = False,
12771275
)
12781276

@@ -1331,7 +1329,6 @@ predictor.create_fit_cnngru(
13311329
},
13321330
epochs = 100,
13331331
show_progress = 1,
1334-
validation_split = 0.20,
13351332
board = False,
13361333
)
13371334

@@ -1390,7 +1387,6 @@ predictor.create_fit_cnnbirnn(
13901387
},
13911388
epochs = 100,
13921389
show_progress = 1,
1393-
validation_split = 0.20,
13941390
board = False,
13951391
)
13961392

@@ -1449,7 +1445,6 @@ predictor.create_fit_cnnbilstm(
14491445
},
14501446
epochs = 100,
14511447
show_progress = 1,
1452-
validation_split = 0.20,
14531448
board = False,
14541449
)
14551450

@@ -1508,7 +1503,6 @@ predictor.create_fit_cnnbigru(
15081503
},
15091504
epochs = 100,
15101505
show_progress = 1,
1511-
validation_split = 0.20,
15121506
board = False,
15131507
)
15141508

@@ -1529,6 +1523,12 @@ start_from_epoch=0
15291523
# instpect model structure
15301524
predictor.model_blueprint()
15311525

1526+
# evaluate model performance on testing data
1527+
predictor.evaluate_model()
1528+
1529+
# get model performance on testing data
1530+
predictor.show_evaluation()
1531+
15321532
# insptect keras model performances via (access dictionary via history key):
15331533
predictor.show_performance()
15341534

@@ -1555,7 +1555,7 @@ https://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/use-case-1.ipynb
15551555
https://github.com/maxmekiska/ImbriumTesting-Demo/blob/main/IntegrationTest.ipynb
15561556

15571557

1558-
## LEGACY: imbrium versions <= v.1.3.0
1558+
## legacy: imbrium versions `<= 1.3.0`
15591559
<details>
15601560
<summary>Expand</summary>
15611561
<br>

imbrium/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.1.0"
1+
__version__ = "3.0.0"
22

33
from imbrium.predictors.multivarhybrid import HybridMulti
44
from imbrium.predictors.multivarpure import PureMulti

0 commit comments

Comments
 (0)