Skip to content

Commit

Permalink
Merge pull request #75 from wilsonrljr/v0.1.9
Browse files Browse the repository at this point in the history
V0.1.9
  • Loading branch information
wilsonrljr authored Mar 5, 2022
2 parents 0ec9efe + 05c4f04 commit 740e9b9
Show file tree
Hide file tree
Showing 165 changed files with 15,076 additions and 5,611 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,50 @@
File for tracking changes in SysIdentPy
--------------------------------------------------------------------------------------------------------------

Changes in SysIdentPy
=====================

v0.1.9
------

CONTRIBUTORS
~~~~~~~~~~~~

- wilsonrljr
- samirmartins

CHANGES
~~~~~~~
- 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.

- MAJOR: Entropic Regression Algorithm
- Added the new class ER to build NARX models using the Entropic Regression algorithm.
- Only the Mutual Information KNN is implemented in this version and it may take too long to run on a high number of regressor, so the user should be careful regarding the number of candidates to put in the model.

- API: save_load
- Added a function to save and load models from file.

- API: Added tests for python 3.9

- Fix : Change condition for n_info_values in FROLS. Now the value defined by the user is compared against X matrix shape instead of regressor space shape. This fix the Fourier basis function usage with more the 15 regressors in FROLS.

- DOC: Save and Load models
- Added a notebook showing how to use the save_load method.

- DOC: Entropic Regression example
- Added notebook with a simple example of how to use AOLS

- DOC: Fourier Basis Function Example
- Added notebook with a simple example of how to use Fourier Basis Function

- DOC: PV forecasting benchmark
- FIX AOLS prediction. The example was using the meta_mss model in prediction, so the results for AOLS were wrong.

- DOC: Fixed minor grammatical and spelling mistakes.

- DOC: Fix issues related to html on Jupyter notebooks examples on documentation.


v0.1.8
------

Expand Down
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ from sysidentpy.residues.residues_correlation import compute_residues_autocorrel
from sysidentpy.residues.residues_correlation import compute_cross_correlation

basis_function=Polynomial(degree=2)
model = PolynomialNarmax(
model = FROLS(
order_selection=True,
n_info_values=10,
extended_least_squares=False,
ylag=2, xlag=2,
ylag=2,
xlag=2,
info_criteria='aic',
estimator='least_squares',
basis_function=basis_function
Expand Down Expand Up @@ -117,14 +118,15 @@ class NARX(nn.Module):
z = self.lin3(z)
return z

narx_net = NARXNN(net=NARX(),
ylag=2,
xlag=2,
loss_func='mse_loss',
optimizer='Adam',
epochs=200,
verbose=False,
optim_params={'betas': (0.9, 0.999), 'eps': 1e-05} # optional parameters of the optimizer
narx_net = NARXNN(
net=NARX(),
ylag=2,
xlag=2,
loss_func='mse_loss',
optimizer='Adam',
epochs=200,
verbose=False,
optim_params={'betas': (0.9, 0.999), 'eps': 1e-05} # optional parameters of the optimizer
)

train_dl = narx_net.data_transform(x_train, y_train)
Expand All @@ -141,12 +143,14 @@ narx_net.plot_result(y_valid, yhat, ee, ex)
from sysidentpy.general_estimators import NARX
from catboost import CatBoostRegressor

catboost_narx = NARX(base_estimator=CatBoostRegressor(iterations=300,
learning_rate=0.1,
depth=6),
xlag=2,
ylag=2,
fit_params={'verbose': False}
catboost_narx = NARX(
base_estimator=CatBoostRegressor(
iterations=300,
learning_rate=0.1,
depth=6),
xlag=2,
ylag=2,
fit_params={'verbose': False}
)

catboost_narx.fit(x_train, y_train)
Expand All @@ -173,9 +177,11 @@ def plot_results(yvalid, yhat):
ax.legend(fontsize=18)
plt.show()

catboost = CatBoostRegressor(iterations=300,
learning_rate=0.1,
depth=6)
catboost = CatBoostRegressor(
iterations=300,
learning_rate=0.1,
depth=6
)
catboost.fit(x_train, y_train, verbose=False)
plot_results(y_valid, catboost.predict(x_valid))
```
Expand Down
Binary file modified docs/_images/aols_4_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/basic_steps_17_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/basic_steps_19_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/basic_steps_23_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/entropic_regression_4_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/entropic_regression_9_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/entropic_regression_9_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/entropic_regression_9_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/extended_least_squares_12_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/extended_least_squares_14_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fourier_basis_function_12_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fourier_basis_function_14_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fourier_basis_function_4_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fourier_basis_function_6_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/fourier_basis_function_8_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_10_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_10_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_13_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_13_51.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_15_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_15_61.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_17_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_17_61.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_19_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_19_61.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/general_estimators_9_0.png
Binary file modified docs/_images/general_estimators_9_01.png
Binary file modified docs/_images/multiple_inputs_example_10_1.png
Binary file modified docs/_images/multiple_inputs_example_11_1.png
Binary file modified docs/_images/narx_neural_network_20_1.png
Binary file modified docs/_images/narx_neural_network_20_2.png
Binary file modified docs/_images/narx_neural_network_22_200.png
Binary file modified docs/_images/narx_neural_network_22_2001.png
Binary file added docs/_images/save_and_load_models_6_1.png
Binary file modified docs/_images/simulating_a_predefined_model_14_0.png
Binary file modified docs/_images/simulating_a_predefined_model_15_0.png
Binary file modified docs/_images/simulating_a_predefined_model_16_0.png
Binary file modified docs/_images/simulating_a_predefined_model_8_0.png
111 changes: 66 additions & 45 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; NARMAX models</title>

<link href="../_static/css/theme.css" rel="stylesheet" />
<link href="../_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css" rel="stylesheet" />
<link href="../_static/css/theme.css" rel="stylesheet">
<link href="../_static/css/index.ff1ffe594081f20da1ef19478df9384b.css" rel="stylesheet">


<link rel="stylesheet"
Expand All @@ -23,12 +23,12 @@


<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx-book-theme.css?digest=c3fdc42140077d1ad13ad2f1588a4309" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx-book-theme.css?digest=84ace793992934648b4de8eed757e5a2" />
<link rel="stylesheet" type="text/css" href="../_static/togglebutton.css" />
<link rel="stylesheet" type="text/css" href="../_static/mystnb.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />

<link rel="preload" as="script" href="../_static/js/index.1c5a1a01449ed65a7b51.js">
<link rel="preload" as="script" href="../_static/js/index.be7d3bbb2ef33a8344ce.js">

<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
Expand All @@ -38,12 +38,15 @@
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script>
<script src="../_static/sphinx-book-theme.12a9622fbb08dcb3a2a40b2c02b83a57.js"></script>
<script src="../_static/sphinx-book-theme.9d8b4a8b9bb19db25eeaddc40d639ba2.js"></script>
<link rel="canonical" href="http://sysidentpy.org/_modules/index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="docsearch:language" content="en" />
<meta name="docsearch:language" content="None">


<!-- Google Analytics -->

</head>
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
Expand All @@ -55,7 +58,12 @@
<div class="container-xl">
<div class="row">

<div class="col-12 col-md-3 bd-sidebar site-navigation show" id="site-navigation">
<!-- Checkboxes to toggle the left sidebar -->
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle navigation sidebar">
<label class="overlay" for="__navigation">
<div class="visually-hidden">Toggle navigation sidebar</div>
</label>
<div class="col-12 col-md-3 bd-sidebar site-navigation " id="site-navigation">

<div class="navbar-brand-box">
<a class="navbar-brand text-wrap" href="../index.html">
Expand All @@ -72,7 +80,7 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>
</a>
</div><form class="bd-search d-flex align-items-center" action="../search.html" method="get">
<i class="icon fas fa-search"></i>
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
<input type="search" class="form-control" name="q" id="search-input" placeholder="Pesquise os documentos ..." aria-label="Pesquise os documentos ..." autocomplete="off" >
</form><nav class="bd-links" id="bd-docs-nav" aria-label="Main">
<div class="bd-toc-item active">
<ul class="nav bd-sidenav">
Expand Down Expand Up @@ -131,6 +139,11 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>
Multiple Inputs usage
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../examples/fourier_basis_function.html">
Fourier Basis Function
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../examples/information_criteria_examples.html">
Information Criteria - Examples
Expand Down Expand Up @@ -161,6 +174,11 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>
Using the Accelerated Orthogonal Least-Squares algorithm for building Polynomial NARX models
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../examples/entropic_regression.html">
Identification of an electromechanical system using Entropic Regression
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../examples/f_16_benchmark.html">
Example: F-16 Ground Vibration Test benchmark
Expand Down Expand Up @@ -281,7 +299,7 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../changelog/v0.1.8.html">
<a class="reference internal" href="../changelog/v0.1.9.html">
Changes in SysIdentPy
</a>
</li>
Expand Down Expand Up @@ -313,22 +331,22 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>



<!-- This is an invisible pixel that we watch to see if we've scrolled. -->
<div class="sbt-scroll-pixel-helper"></div>
<main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">

<div class="topbar container-xl fixed-top">
<div class="topbar-contents row">
<div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show"></div>
<div class="col pl-md-4 topbar-main">

<button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse"
data-toggle="tooltip" data-placement="bottom" data-target=".site-navigation" aria-controls="navbar-menu"
aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation"
title="Toggle navigation" data-toggle="tooltip" data-placement="left">
<i class="fas fa-bars"></i>
<i class="fas fa-arrow-left"></i>
<i class="fas fa-arrow-up"></i>
</button>

<div class="topbar-left">

<label class="nav-toggle-button" for="__navigation">
<div class="visually-hidden">Alternar de navegação</div>
<i class="fas fa-bars"></i>
</label>

</div>

<!-- Source interaction buttons -->

Expand All @@ -338,36 +356,46 @@ <h1 class="site-logo" id="site-title">NARMAX models</h1>
<div class="dropdown-buttons sourcebuttons">
<a class="repository-button"
href="https://github.com/wilsonrljr/sysidentpy/"><button type="button" class="btn btn-secondary topbarbtn"
data-toggle="tooltip" data-placement="left" title="Source repository"><i
class="fab fa-github"></i>repository</button></a>
data-toggle="tooltip" data-placement="left" title="Repositório fonte"><i
class="fab fa-github"></i>repositório</button></a>
<a class="issues-button"
href="https://github.com/wilsonrljr/sysidentpy//issues/new?title=Issue%20on%20page%20%2F_modules/index.html&body=Your%20issue%20content%20here."><button
type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip" data-placement="left"
title="Open an issue"><i class="fas fa-lightbulb"></i>open issue</button></a>
title="Abra um problema"><i class="fas fa-lightbulb"></i>questão aberta</button></a>

</div>
</div>

<!-- Full screen (wrap in <a> to have style consistency -->

<a class="full-screen-button"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip"
data-placement="bottom" onclick="toggleFullScreen()" aria-label="Fullscreen mode"
title="Fullscreen mode"><i
data-placement="bottom" onclick="toggleFullScreen()" aria-label="Modo tela cheia"
title="Modo tela cheia"><i
class="fas fa-expand"></i></button></a>

<!-- Launch buttons -->

</div>

<!-- Table of contents -->
<div class="d-none d-md-block col-md-2 bd-toc show">
<div class="d-none d-md-block col-md-2 bd-toc show noprint">

</div>
</div>
</div>
<div id="main-content" class="row">
<div class="col-12 col-md-9 pl-md-3 pr-md-0">

<!-- Table of contents that is only displayed when printing the page -->
<div id="jb-print-docs-body" class="onlyprint">
<h1></h1>
<!-- Table of contents -->
<div id="print-main-content">
<div id="jb-print-toc">

</div>
</div>
</div>

<div>

<h1>All modules for which code is available</h1>
Expand All @@ -382,40 +410,33 @@ <h1>All modules for which code is available</h1>
<li><a href="sysidentpy/utils/_check_arrays.html">sysidentpy.utils._check_arrays</a></li>
<li><a href="sysidentpy/utils/display_results.html">sysidentpy.utils.display_results</a></li>
<li><a href="sysidentpy/utils/generate_data.html">sysidentpy.utils.generate_data</a></li>
<li><a href="sysidentpy/utils/save_load.html">sysidentpy.utils.save_load</a></li>
</ul>

</div>






<div class='prev-next-bottom'>


<!-- Previous / next buttons -->
<div class='prev-next-area'>
</div>

</div>
</div>
<footer class="footer">
<div class="container">
<p>

By Wilson Rocha, Luan Pascoal, Samuel Oliveira, Samir Martins<br/>

&copy; Copyright 2020, Wilson Rocha, Luan Pascoal, Samuel Oliveira, Samir Martins.<br/>
</p>
</div>
</footer>
<p>

De Wilson Rocha, Luan Pascoal, Samuel Oliveira, Samir Martins<br/>

&copy; direito autoral 2020, Wilson Rocha, Luan Pascoal, Samuel Oliveira, Samir Martins.<br/>
</p>
</footer>
</main>


</div>
</div>

<script src="../_static/js/index.1c5a1a01449ed65a7b51.js"></script>
<script src="../_static/js/index.be7d3bbb2ef33a8344ce.js"></script>


</body>
</html>
Loading

0 comments on commit 740e9b9

Please sign in to comment.