Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scikit-learn tutorial documentation location

I have scikit-learn 0.16.1 installed on Ubuntu 14.04 and am working through the tutorial. SKL was installed with all default configuration. The tutorial states

The source of this tutorial can be found within your scikit-learn folder: scikit-learn/doc/tutorial/text_analytics/

I've used find on my entire drive and there is no "tutorial" folder. Not anywhere. Anybody know where these files are really installed?

like image 334
Dr. Andrew Avatar asked Aug 24 '15 13:08

Dr. Andrew


People also ask

Is scikit-learn and sklearn same?

Scikit-learn is also known as sklearn. It's a free and the most useful machine learning library for Python.

Is Scikitlearn a library or package?

Scikit-learn is an open source data analysis library, and the gold standard for Machine Learning (ML) in the Python ecosystem. Key concepts and features include: Algorithmic decision-making methods, including: Classification: identifying and categorizing data based on patterns.

How do you cite scikit-learn document?

Citing scikit-learn If you use scikit-learn in scientific publication, we would appreciate citations to the following paper: Scikit-learn: Machine Learning in Python, Pedregosa et al., JMLR 12, pp.

Where are sklearn datasets stored?

By default the data directory is set to a folder named 'scikit_learn_data' in the user home folder. Alternatively, it can be set by the 'SCIKIT_LEARN_DATA' environment variable or programmatically by giving an explicit folder path.


1 Answers

Finding the package contents

Where the packages are installed depends on how you installed scikit-learn

  • If you used Ubuntu's package system via

    sudo apt-get install python-sklearn python-sklearn-doc
    

    (you often need the doc package to get the accompanying documentation), then the tutorial is simply missing. The doc/-folder it is not contained in the python-sklearn-doc-package. See the bug report.

    You can find out the contents of the package via

    dpkg-query --listfiles python-sklearn-doc
    
  • If you used the Python Package Index to install it via

    pip install --user --install-option="--prefix=" -U scikit-learn
    

    , then the installation should be at $HOME/.local/lib/python2.7/site-packages/sklearn. (as also of pip show -f scikit-learn) But a

    find . | grep -i tutorial
    

    did not find any tutorial/-folder.

  • If you installed it from source, consider reinstalling via pip, as the warning states that

Warning

Packages installed with the python setup.py install command cannot be uninstalled nor upgraded by pip later. To properly uninstall scikit-learn in that case it is necessary to delete the sklearn folder from your Python site-packages directory.

Solution

A solution would be to use the source. Either download the master file or do it via git:

    git clone https://github.com/scikit-learn/scikit-learn.git

The git archive is more than 60 MiB, so you might want to prefer the master zip.

like image 101
serv-inc Avatar answered Sep 30 '22 07:09

serv-inc