[scikit-learn] Looking for sklearn.neighbors.kde

Mahmood Naderan mahmood.nt at gmail.com
Mon Jan 24 04:52:40 EST 2022


Thanks for the quick answer.

Regards,
Mahmood




On Mon, Jan 24, 2022 at 10:48 AM Guillaume Lemaître <g.lemaitre58 at gmail.com>
wrote:

> Looking at the documentation:
> https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html
>
> The public import is: `from sklearn.neighbors import KernelDensity`
> omitting the kde.
>
> Cheers,
> --
> Guillaume Lemaitre
> Scikit-learn @ Inria Foundation
> https://glemaitre.github.io/
>
> On 24 Jan 2022, at 10:41, Mahmood Naderan <mahmood.nt at gmail.com> wrote:
>
> Hi,
> I have installed scikit 1.0.2 version via pip as below
>
> $ pip3 install --user sklearn
> Collecting sklearn
>   Downloading sklearn-0.0.tar.gz (1.1 kB)
> Collecting scikit-learn
>   Downloading
> scikit_learn-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
> (26.7 MB)
>      |████████████████████████████████| 26.7 MB 10.5 MB/s
> Requirement already satisfied: scipy>=1.1.0 in
> ./.local/lib/python3.8/site-packages (from scikit-learn->sklearn) (1.6.0)
> Collecting joblib>=0.11
>   Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
> Requirement already satisfied: numpy>=1.14.6 in
> ./.local/lib/python3.8/site-packages (from scikit-learn->sklearn) (1.20.2)
> Collecting threadpoolctl>=2.0.0
>   Using cached threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
> Building wheels for collected packages: sklearn
>   Building wheel for sklearn (setup.py) ... done
>   Created wheel for sklearn: filename=sklearn-0.0-py2.py3-none-any.whl
> size=1316
> sha256=8bcf6cce0190ae1dcf2af1315bc71b09a162362ec91e063cdc027b4ec55b5ff1
>   Stored in directory:
> /home//.cache/pip/wheels/22/0b/40/fd3f795caaa1fb4c6cb738bc1f56100be1e57da95849bfc897
> Successfully built sklearn
> Installing collected packages: threadpoolctl, joblib, scikit-learn, sklearn
> Successfully installed joblib-1.1.0 scikit-learn-1.0.2 sklearn-0.0
> threadpoolctl-3.0.0
>
>
> However, I get the following error when I want to use KernelDensity
>
>     from sklearn.neighbors.kde import KernelDensity
> ModuleNotFoundError: No module named 'sklearn.neighbors.kde'
>
>
> Any idea how to fix that?
>
> Regards,
> Mahmood
>
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20220124/9d1e5852/attachment-0001.html>


More information about the scikit-learn mailing list