.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "glr_examples/utils/plot_errors_vs_epochs.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_glr_examples_utils_plot_errors_vs_epochs.py: ====================================================== Plot errors vs epochs ====================================================== visualizes the cost(errors ) against the number of epochs of two different learning rates. .. GENERATED FROM PYTHON SOURCE LINES 9-12 .. code-block:: Python # Author: L.Kouadio # Licence: BSD-3-clause .. GENERATED FROM PYTHON SOURCE LINES 13-19 .. code-block:: Python from watex.datasets import load_iris from watex.base import AdalineGradientDescent from watex.utils.plotutils import plot_cost_vs_epochs X, y = load_iris (return_X_y= True ) ada1 = AdalineGradientDescent (n_iter= 10 , eta= .01 ).fit(X, y) ada2 = AdalineGradientDescent (n_iter=10 , eta =.0001 ).fit(X, y) plot_cost_vs_epochs (regs = [ada1, ada2] ) .. image-sg:: /glr_examples/utils/images/sphx_glr_plot_errors_vs_epochs_001.png :alt: AdalineGradientDescent -Learning rate 0.0100, AdalineGradientDescent -Learning rate 0.0001 :srcset: /glr_examples/utils/images/sphx_glr_plot_errors_vs_epochs_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none array([, ], dtype=object) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.182 seconds) .. _sphx_glr_download_glr_examples_utils_plot_errors_vs_epochs.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/watex/watex/0.3.X?urlpath=lab/tree/notebooks/glr_examples/utils/plot_errors_vs_epochs.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_errors_vs_epochs.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_errors_vs_epochs.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_