Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between scikit-learn and sklearn

On OS X 10.11.6 and python 2.7.10 I need to import from sklearn manifold. I have numpy 1.8 Orc1, scipy .13 Ob1 and scikit-learn 0.17.1 installed.
I used pip to install sklearn(0.0), but when I try to import from sklearn manifold I get the following:

Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/sklearn/init.py", line 57, in from .base import clone File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in from .utils.fixes import signature File "/Library/Python/2.7/site-packages/sklearn/utils/init.py", line 10, in from .murmurhash import murmurhash3_32 File "numpy.pxd", line 155, in init sklearn.utils.murmurhash (sklearn/utils/murmurhash.c:5029) ValueError: numpy.dtype has the wrong size, try recompiling.

What is the difference between scikit-learn and sklearn? Also, I cant import scikit-learn because of a syntax error

like image 607
Barry Avatar asked Aug 03 '16 02:08

Barry


People also ask

Is scikit-learn and SciPy same?

scikit-learn is a Python module for machine learning built on top of SciPy and distributed under the 3-Clause BSD license. On the other hand, SciPy is detailed as "Scientific Computing Tools for Python". Python-based ecosystem of open-source software for mathematics, science, and engineering.

Why is it called sklearn?

Overview. The scikit-learn project started as scikits. learn, a Google Summer of Code project by French data scientist David Cournapeau. Its name stems from the notion that it is a "SciKit" (SciPy Toolkit), a separately-developed and distributed third-party extension to SciPy.

What is a sklearn in Python?

Scikit-learn is a free machine learning library for Python. It features various algorithms like support vector machine, random forests, and k-neighbours, and it also supports Python numerical and scientific libraries like NumPy and SciPy .

Is scikit-learn a package or module?

scikit-learn is a Python module for machine learning built on top of SciPy and is distributed under the 3-Clause BSD license.


1 Answers

Regarding the difference sklearn vs. scikit-learn: The package "scikit-learn" is recommended to be installed using pip install scikit-learn but in your code imported using import sklearn.

A bit confusing, because you can also do pip install sklearn and will end up with the same scikit-learn package installed, because there is a "dummy" pypi package sklearn which will install scikit-learn for you.

From this thread:

scikit-learn is in install_requires of sklearn setup.py so you do end-up with scikit-learn installed

So:

At the end, pip install sklearn or pip install scikit-learn --- apart from the annoying sklearn (0.0) showed in the pip list --- will install the latest available build from PyPI.

like image 73
Melkor.cz Avatar answered Sep 16 '22 12:09

Melkor.cz