.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_bert.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_bert.py: ===================== BERT sklearn ===================== In order to use `bert-sklearn `_ with HiClass, some of scikit-learns checks need to be disabled. The reason is that BERT expects text as input for the features, but scikit-learn expects numerical features. Hence, the checks will fail. To disable scikit-learn's checks, we can simply use the parameter :literal:`bert=True` in the constructor of the local hierarchical classifier. .. GENERATED FROM PYTHON SOURCE LINES 12-38 .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Building sklearn text classifier... 0%| | 0/231508 [00:00` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bert.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_