.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_template.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_template.py: =========================== Plotting Template Estimator =========================== An example plot of :class:`skltemplate.template.TemplateEstimator` .. GENERATED FROM PYTHON SOURCE LINES 8-19 .. image-sg:: /auto_examples/images/sphx_glr_plot_template_001.png :alt: plot template :srcset: /auto_examples/images/sphx_glr_plot_template_001.png :class: sphx-glr-single-img .. code-block:: Python import numpy as np from matplotlib import pyplot as plt from skltemplate import TemplateEstimator X = np.arange(100).reshape(100, 1) y = np.zeros((100,)) estimator = TemplateEstimator() estimator.fit(X, y) plt.plot(estimator.predict(X)) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.076 seconds) .. _sphx_glr_download_auto_examples_plot_template.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_template.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_template.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_