Skip to content

Commit

Permalink
DOC: scikits.learn -> sklearn
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed Sep 3, 2011
1 parent be9d945 commit 4d1dcd2
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions doc/datasets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
>>> import numpy as np
>>> import os
>>> from scikits.learn import datasets
>>> from sklearn import datasets
>>> datasets.mldata.urllib2 = mock_urllib2

.. _datasets:
Expand All @@ -12,9 +12,9 @@
Dataset loading utilities
=========================

.. currentmodule:: scikits.learn.datasets
.. currentmodule:: sklearn.datasets

The ``scikits.learn.datasets`` package embeds some small toy datasets
The ``sklearn.datasets`` package embeds some small toy datasets
as introduced in the "Getting Started" section.

To evaluate the impact of the scale of the dataset (``n_samples`` and
Expand Down Expand Up @@ -108,7 +108,7 @@ Scipy sparse CSR matrices are used for ``X`` and numpy arrays are used for ``y``

You may load a dataset like this::

>>> from scikits.learn.datasets import load_svmlight_file
>>> from sklearn.datasets import load_svmlight_file
>>> X_train, y_train = load_svmlight_file("/path/to/train_dataset.txt")
... # doctest: +SKIP

Expand Down
4 changes: 2 additions & 2 deletions doc/datasets/labeled_faces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ less than 200ms by using a memmaped version memoized on the disk in the
The first loader is used for the Face Identification task: a multi-class
classification task (hence supervised learning)::

>>> from scikits.learn.datasets import fetch_lfw_people
>>> from sklearn.datasets import fetch_lfw_people
>>> lfw_people = fetch_lfw_people(min_faces_per_person=70, resize=0.4)

>>> for name in lfw_people.target_names:
Expand Down Expand Up @@ -74,7 +74,7 @@ array::
The second loader is typically used for the face verification task: each sample
is a pair of two picture belonging or not to the same person::

>>> from scikits.learn.datasets import fetch_lfw_pairs
>>> from sklearn.datasets import fetch_lfw_pairs
>>> lfw_pairs_train = fetch_lfw_pairs(subset='train')

>>> list(lfw_pairs_train.target_names)
Expand Down
2 changes: 1 addition & 1 deletion doc/datasets/labeled_faces_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from os.path import exists
from os.path import join
from nose import SkipTest
from scikits.learn.datasets import get_data_home
from sklearn.datasets import get_data_home


def setup_module(module):
Expand Down
6 changes: 3 additions & 3 deletions doc/datasets/mldata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Downloading datasets from the mldata.org repository
`mldata.org <http://mldata.org>`_ is a public repository for machine learning
data, supported by the `PASCAL network <http://www.pascal-network.org>`_ .

The ``scikits.learn.datasets`` package is able to directly download data
The ``sklearn.datasets`` package is able to directly download data
sets from the repository using the function ``fetch_mldata(dataname)``.

For example, to download the MNIST digit recognition database::

>>> from scikits.learn.datasets import fetch_mldata
>>> from sklearn.datasets import fetch_mldata
>>> mnist = fetch_mldata('MNIST original', data_home=custom_data_home)

The MNIST database contains a total of 70000 examples of handwritten digits
Expand All @@ -36,7 +36,7 @@ datasets:

* The data arrays in `mldata.org <http://mldata.org>`_ are most often
shaped as ``(n_features, n_samples)``. This is the opposite of the
``scikits.learn`` convention, so ``fetch_mldata`` transposes the matrix
``scikit-learn`` convention, so ``fetch_mldata`` transposes the matrix
by default. The ``transpose_data`` keyword controls this behavior::

>>> iris = fetch_mldata('iris', data_home=custom_data_home)
Expand Down
4 changes: 2 additions & 2 deletions doc/datasets/mldata_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from os import makedirs
from os.path import join
from scikits.learn import datasets
from scikits.learn.utils.testing import mock_urllib2
from sklearn import datasets
from sklearn.utils.testing import mock_urllib2
import tempfile
import scipy as sp
import shutil
Expand Down
12 changes: 6 additions & 6 deletions doc/datasets/twenty_newsgroups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ provides a version where the data is already vectorized.

This is not the case for this loader. Instead, it returns the list of
the raw text files that can be fed to text feature extractors such as
:class:`scikits.learn.feature_extraction.text.Vectorizer` with custom
:class:`sklearn.feature_extraction.text.Vectorizer` with custom
parameters so as to extract feature vectors.


Usage
-----

The ``scikits.learn.datasets.fetch_20newsgroups`` function is a data
The ``sklearn.datasets.fetch_20newsgroups`` function is a data
fetching / caching functions that downloads the data archive from
the original `20 newsgroups website`_, extracts the archive contents
in the ``~/scikit_learn_data/20news_home`` folder and calls the
``scikits.learn.datasets.load_file`` on either the training or
``sklearn.datasets.load_file`` on either the training or
testing set folder, or both of them::

>>> from scikits.learn.datasets import fetch_20newsgroups
>>> from sklearn.datasets import fetch_20newsgroups
>>> newsgroups_train = fetch_20newsgroups(subset='train')

>>> from pprint import pprint
Expand Down Expand Up @@ -81,11 +81,11 @@ list of the categories to load to the ``fetch_20newsgroups`` function::
In order to feed predictive or clustering models with the text data,
one first need to turn the text into vectors of numerical values suitable
for statistical analysis. This can be achieved with the utilities of the
``scikits.learn.feature_extraction.text`` as demonstrated in the following
``sklearn.feature_extraction.text`` as demonstrated in the following
example that extract `TF-IDF`_ vectors of unigram tokens::


>>> from scikits.learn.feature_extraction.text import Vectorizer
>>> from sklearn.feature_extraction.text import Vectorizer
>>> documents = [open(f).read() for f in newsgroups_train.filenames]
>>> vectorizer = Vectorizer()
>>> vectors = vectorizer.fit_transform(documents)
Expand Down
12 changes: 6 additions & 6 deletions doc/developers/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ code for the scikit-learn project.
Python, Cython or C/C++?
========================

.. currentmodule:: scikits.learn
.. currentmodule:: sklearn

In general, the scikit-learn project emphasizes the **readability** of
the source code to make it easy for the project users to dive into the
Expand Down Expand Up @@ -89,9 +89,9 @@ Suppose we want to profile the Non Negative Matrix Factorization module
of the scikit. Let us setup a new IPython session and load the digits
dataset and as in the :ref:`example_decomposition_plot_nmf.py` example::

In [1]: from scikits.learn.decomposition import NMF
In [1]: from sklearn.decomposition import NMF

In [2]: from scikits.learn.datasets import load_digits
In [2]: from sklearn.datasets import load_digits

In [3]: X = load_digits().data

Expand Down Expand Up @@ -188,16 +188,16 @@ Towards the end of the file, define the ``%lprun`` magic::

Now restart IPython and let us use this new toy::

In [1]: from scikits.learn.datasets import load_digits
In [1]: from sklearn.datasets import load_digits

In [2]: from scikits.learn.decomposition.nmf import _nls_subproblem, NMF
In [2]: from sklearn.decomposition.nmf import _nls_subproblem, NMF

In [3]: X = load_digits().data

In [4]: %lprun -f _nls_subproblem NMF(n_components=16, tol=1e-2).fit(X)
Timer unit: 1e-06 s

File: scikits/learn/decomposition/nmf.py
File: sklearn/decomposition/nmf.py
Function: _nls_subproblem at line 137
Total time: 1.73153 s

Expand Down
2 changes: 1 addition & 1 deletion examples/cluster/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Clustering
----------

Examples concerning the `scikits.learn.cluster` package.
Examples concerning the `sklearn.cluster` package.

2 changes: 1 addition & 1 deletion examples/covariance/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Covariance estimation
---------------------

Examples concerning the `scikits.learn.covariance` package.
Examples concerning the `sklearn.covariance` package.
2 changes: 1 addition & 1 deletion examples/decomposition/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Decomposition
-------------

Examples concerning the `scikits.learn.decomposition` package.
Examples concerning the `sklearn.decomposition` package.

2 changes: 1 addition & 1 deletion examples/gaussian_process/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Gaussian Process for Machine Learning
-------------------------------------

Examples concerning the `scikits.learn.gaussian_process` package.
Examples concerning the `sklearn.gaussian_process` package.

2 changes: 1 addition & 1 deletion examples/gaussian_process/gp_diabetes_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from sklearn.gaussian_process import GaussianProcess
from sklearn.cross_val import cross_val_score, KFold

# Load the dataset from scikits' data sets
# Load the dataset from scikit's data sets
diabetes = datasets.load_diabetes()
X, y = diabetes.data, diabetes.target

Expand Down
2 changes: 1 addition & 1 deletion examples/linear_model/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Generalized Linear Models
-------------------------

Examples concerning the `scikits.learn.linear_model` package.
Examples concerning the `sklearn.linear_model` package.
2 changes: 1 addition & 1 deletion examples/manifold/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Manifold learning
-----------------------

Examples concerning the `scikits.learn.manifold` package.
Examples concerning the `sklearn.manifold` package.

Binary file removed examples/manifold/plot_lle_digits.py.prof
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/mixture/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Gaussian Mixture Models
-----------------------

Examples concerning the `scikits.learn.mixture` package.
Examples concerning the `sklearn.mixture` package.
2 changes: 1 addition & 1 deletion examples/svm/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Support Vector Machines
-----------------------

Examples concerning the `scikits.learn.svm` package.
Examples concerning the `sklearn.svm` package.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os
import shutil

DISTNAME = 'sklearn'
DISTNAME = 'scikit-learn'
DESCRIPTION = 'A set of python modules for machine learning and data mining'
LONG_DESCRIPTION = open('README.rst').read()
MAINTAINER = 'Fabian Pedregosa'
Expand Down

0 comments on commit 4d1dcd2

Please sign in to comment.