Skip to content

Commit ecd4158

Browse files
authored
Merge pull request #131 from wilsonrljr/v0.3.4
V0.3.4
2 parents 4faaed3 + b215f45 commit ecd4158

File tree

144 files changed

+20067
-29326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+20067
-29326
lines changed

.github/workflows/python-package.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install flake8 pytest pytest-cov scikit-learn black isort>=5.0.6
29+
pip install flake8 pytest pytest-cov scikit-learn black>=23.3.0 isort>=5.0.6
3030
if [ -f requirements.txt ]; then pip install ."[dev, all]"; fi
3131
- name: Lint with flake8
3232
run: |

.pre-commit-config.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
default_language_version:
4+
python: python3.11
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.4.0
8+
hooks:
9+
- id: check-added-large-files
10+
args: ['--maxkb=5000']
11+
- id: check-toml
12+
- id: check-yaml
13+
args:
14+
- --unsafe
15+
- id: end-of-file-fixer
16+
exclude: ^(docs/|examples/|images/)
17+
- id: trailing-whitespace
18+
args: [--markdown-linebreak-ext=md]
19+
- repo: https://github.com/psf/black-pre-commit-mirror
20+
rev: 24.2.0
21+
hooks:
22+
- id: black # use black-jupyter to run in notebooks too
23+
args: [--config=./pyproject.toml]
24+
# It is recommended to specify the latest version of Python
25+
# supported by your project here, or alternatively use
26+
# pre-commit's default_language_version, see
27+
# https://pre-commit.com/#top_level-default_language_version
28+
- repo: https://github.com/psf/black-pre-commit-mirror
29+
rev: 24.2.0
30+
hooks:
31+
- id: black-jupyter
32+
args: [--config=./pyproject.toml]
33+
# It is recommended to specify the latest version of Python
34+
# supported by your project here, or alternatively use
35+
# pre-commit's default_language_version, see
36+
# https://pre-commit.com/#top_level-default_language_version
37+
language_version: python3.11
38+
- repo: https://github.com/charliermarsh/ruff-pre-commit
39+
rev: v0.1.13
40+
hooks:
41+
- id: ruff
42+
types_or: [ python ] # you can add notebook and other files using pyi, jupyter

AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
Primary Author
99

1010
* Samir Angelo Milani Martins <[email protected]>
11-
Primary Author
11+
Primary Author

CHANGELOG

+47-38
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,35 @@ CONTRIBUTORS
1313

1414
- wilsonrljr
1515
- dj-gauthier
16+
- mtsousa
1617

1718
CHANGES
1819
~~~~~~~
1920

20-
- The update **v0.3.4** has been released with additional features, API changes and fixes.
21+
- **New Features:**
22+
- **MAJOR**: Ridge Regression Parameter Estimation:
23+
- Introducing Ridge algorithm for model parameter estimation. Set `estimator="ridge_regression"` and control regularization with the `alpha` parameter. Special thanks to @dj-gauthier and @mtsousa for their contribution. Users are encouraged to visit https://www.researchgate.net/publication/380429918_Controlling_chaos_using_edge_computing_hardware to explore how @dj-gauthier used SysIdentPy in his research.
2124

22-
- MAJOR: Ridge Regression Parameter Estimation:
23-
- Now you can use AILS to estimate parameters of NARMAX models (and variants) using a multiobjective approach.
24-
- AILS can be accessed using `from sysidentpy.multiobjective_parameter_estimation import AILS`
25-
- See the docs for a more in depth explanation of how to use AILS.
26-
- This feature is related to Issue #101. This work is the result of an undergraduate research conducted by Gabriel Bueno Leandro under the supervision of Samir Milani Martins and Wilson Rocha Lacerda Junior.
27-
28-
- API Change: plotting.py code was improved. Added type hints and added new options for plotting results.
25+
- **API Changes:**
26+
- Improved `plotting.py` code with type hints and new options for plotting results.
27+
- Refactored methods to resolve future warnings from numpy.
28+
- Code refactoring following PEP8 guidelines.
29+
- Set "default" as the default style for plotting to avoid errors in new versions of matplotlib.
2930

30-
- DATASET: Added buck_id.csv and buck_valid.csv dataset to SysIdentPy repository.
31+
- **Datasets:**
32+
- Added `buck_id.csv` and `buck_valid.csv` datasets to the SysIdentPy repository.
3133

32-
- DOC: Add a Multiobjective Parameter Optimization Notebook showing how to use the new AILS method
34+
- **Documentation:**
35+
- Add NFIR example. The notebook show how to build models without past output regressors (using only input regressors).
36+
- Enhanced usage example for MetaMSS.
37+
- Continued adding type hints to methods.
38+
- Improved docstrings throughout the codebase.
39+
- Minor additions and grammar fixes in documentation.
40+
- @dj-gauthier provided valuable suggestions for enhancing the documentation, which are currently undergoing refinement and will soon be accessible.
3341

34-
- DOC: Minor additions and grammar fixes.
42+
- **Development Tools:**
43+
- Added pre-commit hooks to the repository.
44+
- Enhanced `pyproject.toml` to assist contributors in setting up their own environment.
3545

3646

3747
v0.3.3
@@ -47,7 +57,7 @@ CONTRIBUTORS
4757
CHANGES
4858
~~~~~~~
4959

50-
- The update **v0.3.3** has been released with additional features, API changes and fixes.
60+
- The update **v0.3.3** has been released with additional features, API changes and fixes.
5161

5262
- MAJOR: Multiobjective Framework: Affine Information Least Squares Algorithm (AILS)
5363
- Now you can use AILS to estimate parameters of NARMAX models (and variants) using a multiobjective approach.
@@ -75,10 +85,10 @@ CONTRIBUTORS
7585
CHANGES
7686
~~~~~~~
7787

78-
- The update **v0.3.2** has been released with API changes and fixes.
88+
- The update **v0.3.2** has been released with API changes and fixes.
7989

80-
- Major:
81-
- Added Akaike Information Criteria corrected in FROLS. Now the user can use aicc as the information criteria to select the model order when using FROLS algorithm.
90+
- Major:
91+
- Added Akaike Information Criteria corrected in FROLS. Now the user can use aicc as the information criteria to select the model order when using FROLS algorithm.
8292

8393
- FIX: Issue #114. Replace yhat with y in root relative squared error. Thanks @miroder
8494

@@ -99,14 +109,14 @@ CONTRIBUTORS
99109
CHANGES
100110
~~~~~~~
101111

102-
- The update **v0.3.1** has been released with API changes and fixes.
112+
- The update **v0.3.1** has been released with API changes and fixes.
103113

104-
- API Change:
105-
- MetaMSS was returning the max lag of the final model instead of the maximum lag related to the xlag and ylag. This is not wrong (its related to the issue #55), but this change will be made for all methods at the same time. In this respect, I'm reverted this to return the maximum lag of the xlag and ylag.
114+
- API Change:
115+
- MetaMSS was returning the max lag of the final model instead of the maximum lag related to the xlag and ylag. This is not wrong (its related to the issue #55), but this change will be made for all methods at the same time. In this respect, I'm reverted this to return the maximum lag of the xlag and ylag.
106116

107117
- API Change: Added build_matrix method in BaseMSS. This change improved overall code readability by rewriting if/elif/else clauses in every model structure selection algorithm.
108118

109-
- API Change: Added bic, aic, fpe, and lilc methods in FROLS. Now the method is selected by using a predefined dictionary with the available options. This change improved overall code readability by rewriting if/elif/else clauses in the FROLS algorithm.
119+
- API Change: Added bic, aic, fpe, and lilc methods in FROLS. Now the method is selected by using a predefined dictionary with the available options. This change improved overall code readability by rewriting if/elif/else clauses in the FROLS algorithm.
110120

111121
- TESTS: Added tests for Neural NARX class. The issue with pytorch was fixed and now we have the tests for every model class.
112122

@@ -125,12 +135,12 @@ CONTRIBUTORS
125135
CHANGES
126136
~~~~~~~
127137

128-
- The update **v0.3.0** has been released with additional features, API changes and fixes.
138+
- The update **v0.3.0** has been released with additional features, API changes and fixes.
129139

130140
- MAJOR: Estimators support in AOLS
131-
- Now you can use any SysIdentPy estimator in AOLS model structure selection.
141+
- Now you can use any SysIdentPy estimator in AOLS model structure selection.
132142

133-
- API Change:
143+
- API Change:
134144
- Refactored base class for model structure selection. A refactored base class for model structure selection has been introduced in SysIdentPy. This update aims to enhance the system identification process by preparing the package for new features that are currently in development, like multiobjective parameter estimation, new basis functions and more.
135145

136146
Several methods within the base class have undergone significant restructuring to improve their functionality and optimize their performance. This reorganization will facilitate the incorporation of advanced model selection techniques in the future, which will enable users to obtain dynamic models with robust dynamic and static performance.
@@ -140,7 +150,7 @@ CHANGES
140150

141151
- Breaking Change: `X_train` and `y_train` were replaced respectively by `X` and `y` in `fit` method in MetaMSS model structure selection algorithm. `X_test` and `y_test` were replaced by `X` and `y` in `predict` method in MetaMSS.
142152

143-
- API Change: Added BaseBasisFunction class, an abstract base class for implementing basis functions.
153+
- API Change: Added BaseBasisFunction class, an abstract base class for implementing basis functions.
144154

145155
- Enhancement: Added support for python 3.11.
146156

@@ -162,9 +172,9 @@ CHANGES
162172

163173
- FIX: Fix deprecation warning in Extended Least Squares Example
164174

165-
- DATASET: Added air passengers dataset to SysIdentPy repository.
175+
- DATASET: Added air passengers dataset to SysIdentPy repository.
166176

167-
- DATASET: Added San Francisco Hospital Load dataset to SysIdentPy repository.
177+
- DATASET: Added San Francisco Hospital Load dataset to SysIdentPy repository.
168178

169179
- DATASET: Added San Francisco PV GHI dataset to SysIdentPy repository.
170180

@@ -188,7 +198,7 @@ CONTRIBUTORS
188198
CHANGES
189199
~~~~~~~
190200

191-
- The update **v0.2.1** has been released with additional feature, minor API changes and fixes.
201+
- The update **v0.2.1** has been released with additional feature, minor API changes and fixes.
192202

193203
- MAJOR: Neural NARX now support CUDA
194204
- Now the user can build Neural NARX models with CUDA support. Just add `device='cuda'` to use the GPU benefits.
@@ -206,14 +216,14 @@ CHANGES
206216
- MAJOR: Github Sponsor
207217
- Now you can support SysIdentPy by becoming a Sponsor! Details: https://github.com/sponsors/wilsonrljr
208218

209-
- Tests:
219+
- Tests:
210220
- Now there are test for almost every function.
211221
- Neural NARX tests are raising numpy issues. It'll be fixed til next update.
212222

213223
- FIX: NFIR models in General Estimators
214224
- Fix support for NFIR models using sklearn estimators.
215225

216-
- The setup is now handled by the pyproject.toml file.
226+
- The setup is now handled by the pyproject.toml file.
217227

218228
- Remove unused code.
219229

@@ -237,7 +247,7 @@ CONTRIBUTORS
237247

238248
CHANGES
239249
~~~~~~~
240-
- The update **v0.2.0** has been released with additional feature, minor API changes and fixes.
250+
- The update **v0.2.0** has been released with additional feature, minor API changes and fixes.
241251

242252
- MAJOR: Many new features for General Estimators
243253
- Now the user can build General NARX models with Fourier basis function.
@@ -315,7 +325,7 @@ CONTRIBUTORS
315325

316326
CHANGES
317327
~~~~~~~
318-
- The update **v0.1.9** has been released with additional feature, minor API changes and fixes of the new features added in v0.1.7.
328+
- The update **v0.1.9** has been released with additional feature, minor API changes and fixes of the new features added in v0.1.7.
319329

320330
- MAJOR: Entropic Regression Algorithm
321331
- Added the new class ER to build NARX models using the Entropic Regression algorithm.
@@ -331,10 +341,10 @@ CHANGES
331341
- DOC: Save and Load models
332342
- Added a notebook showing how to use the save_load method.
333343

334-
- DOC: Entropic Regression example
344+
- DOC: Entropic Regression example
335345
- Added notebook with a simple example of how to use AOLS
336346

337-
- DOC: Fourier Basis Function Example
347+
- DOC: Fourier Basis Function Example
338348
- Added notebook with a simple example of how to use Fourier Basis Function
339349

340350
- DOC: PV forecasting benchmark
@@ -355,10 +365,10 @@ CONTRIBUTORS
355365

356366
CHANGES
357367
~~~~~~~
358-
- The update **v0.1.8** has been released with additional feature, minor API changes and fixes of the new features added in v0.1.7.
368+
- The update **v0.1.8** has been released with additional feature, minor API changes and fixes of the new features added in v0.1.7.
359369

360370
- MAJOR: Ensemble Basis Functions
361-
- Now you can use different basis function together. For now we allow to use Fourier combined with Polynomial of different degrees.
371+
- Now you can use different basis function together. For now we allow to use Fourier combined with Polynomial of different degrees.
362372

363373
- API change: Add "ensemble" parameter in basis function to combine the features of different basis function.
364374

@@ -433,7 +443,7 @@ CHANGES
433443
- API Change: sysidentpy.polynomial_basis.SimulatePolynomialNarmax is deprecated. Use sysidentpy.simulation.SimulateNARMAX instead.
434444

435445
- API Change: Introducing sysidentpy.basis_function. Because NARMAX models can be built on different basis function, a new module is added to make easier to implement new basis functions in future updates `Issue64 <https://github.com/wilsonrljr/sysidentpy/issues/64>`__.
436-
- Each basis function class must have a fit and predict method to be used in training and prediction respectively.
446+
- Each basis function class must have a fit and predict method to be used in training and prediction respectively.
437447

438448
- API Change: unbiased_estimator method moved to Estimators class.
439449
- added elag option
@@ -481,7 +491,7 @@ CHANGES
481491
- Fixed minor grammatical and spelling mistakes.
482492
- New prediction method.
483493
- many under the hood changes.
484-
494+
485495
- API Change (new): sysidentpy.model_structure_selection.MetaMSS `Issue64 <https://github.com/wilsonrljr/sysidentpy/issues/64>`__
486496
- Based on the old sysidentpy.polynomial_basis.MetaMSS. The class has been rebuilt with new functions and optimized code.
487497
- Enforcing keyword-only arguments. This is an effort to promote clear and non-ambiguous use of the library.
@@ -639,7 +649,7 @@ CHANGES
639649

640650
- Minor performance improvement: added the argument "predefined_regressors" in build_information_matrix function on base.py to improve the performance of the Simulation method.
641651

642-
- Pytorch is now an optional dependency. Use pip install sysidentpy['full']
652+
- Pytorch is now an optional dependency. Use pip install sysidentpy['full']
643653

644654
- Fix code format issues.
645655

@@ -751,4 +761,3 @@ CHANGES
751761
- Added workflow to run the tests when merge branch into master.
752762
- Added new site domain.
753763
- Updated docs.
754-

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ r = pd.DataFrame(
128128
),
129129
columns=['Regressors', 'Parameters', 'ERR'])
130130
print(r)
131-
131+
132132
Regressors Parameters ERR
133133
0 x1(k-2) 0.9000 0.95556574
134134
1 y(k-1) 0.1999 0.04107943
@@ -320,4 +320,4 @@ The documentation and structure (even this section) is openly inspired by sklear
320320

321321
[wilsonrljr's sponsor profile]: https://github.com/sponsors/wilsonrljr
322322

323-
<!-- sponsors -->
323+
<!-- sponsors -->

0 commit comments

Comments
 (0)