.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/release_highlights/plot_release_highlights_0_20_0.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_release_highlights_plot_release_highlights_0_20_0.py: ======================================== Release Highlights for tttrlib 0.23 ======================================== .. currentmodule:: tttrlib We are pleased to announce the release of tttrlib 0.20, which comes with many bug fixes and new features! We detail below a few of the major features of this release. For an exhaustive list of all the changes, please refer to the :ref:`release notes `. To install the latest version with conda:: conda install -c tpeulen tttrlib .. GENERATED FROM PYTHON SOURCE LINES 20-25 Test for plotting ------------------------------------ The :func:`inspection.permutation_importance` can be used to get an estimate of the importance of each feature, for any fitted estimator: .. GENERATED FROM PYTHON SOURCE LINES 25-37 .. code-block:: Python import numpy as np import matplotlib.pyplot as plt fig, ax = plt.subplots() x = np.linspace(0, 5) ax.plot(x, np.sin(x)) ax.set_title("Permutation Importance of each feature") ax.set_ylabel("Features") fig.tight_layout() plt.show() .. image-sg:: /auto_examples/release_highlights/images/sphx_glr_plot_release_highlights_0_20_0_001.png :alt: Permutation Importance of each feature :srcset: /auto_examples/release_highlights/images/sphx_glr_plot_release_highlights_0_20_0_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 38-45 Improved PTU header support ------------------------------------------------------- The :class:`ensemble.HistGradientBoostingClassifier` and :class:`ensemble.HistGradientBoostingRegressor` now have native support for missing values (NaNs). This means that there is no need for imputing data when training or predicting. .. GENERATED FROM PYTHON SOURCE LINES 45-48 .. code-block:: Python print("Better Header support") .. rst-class:: sphx-glr-script-out .. code-block:: none Better Header support .. GENERATED FROM PYTHON SOURCE LINES 49-60 Writing of TTTR data ------------------------------------------ Most estimators based on nearest neighbors graphs now accept precomputed sparse graphs as input, to reuse the same graph for multiple estimator fits. To use this feature in a pipeline, one can use the `memory` parameter, along with one of the two new transformers, :class:`neighbors.KNeighborsTransformer` and :class:`neighbors.RadiusNeighborsTransformer`. The precomputation can also be performed by custom estimators to use alternative implementations, such as approximate nearest neighbors methods. See more details in the :ref:`User Guide `. .. GENERATED FROM PYTHON SOURCE LINES 60-77 .. code-block:: Python from tempfile import TemporaryDirectory import tttrlib # with TemporaryDirectory(prefix="tttrlib_temp_") as tmpdir: # estimator = make_pipeline( # KNeighborsTransformer(n_neighbors=10, mode='distance'), # Isomap(n_neighbors=10, metric='precomputed'), # memory=tmpdir) # estimator.fit(X) # # # We can decrease the number of neighbors and the graph will not be # # recomputed. # estimator.set_params(isomap__n_neighbors=5) # estimator.fit(X) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.231 seconds) .. _sphx_glr_download_auto_examples_release_highlights_plot_release_highlights_0_20_0.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_release_highlights_0_20_0.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_release_highlights_0_20_0.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_