@@ -10,11 +10,11 @@ Support Vector Machines
=======================


.. automodule:: scikits.learn.svm
.. automodule:: sklearn.svm
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -37,11 +37,11 @@ Support Vector Machines
For sparse data
---------------

.. automodule:: scikits.learn.svm.sparse
.. automodule:: sklearn.svm.sparse
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -73,11 +73,11 @@ Low-level methods
Generalized Linear Models
=========================

.. automodule:: scikits.learn.linear_model
.. automodule:: sklearn.linear_model
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -116,11 +116,11 @@ Generalized Linear Models
For sparse data
---------------

.. automodule:: scikits.learn.linear_model.sparse
.. automodule:: sklearn.linear_model.sparse
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -136,11 +136,11 @@ For sparse data
Naive Bayes
===========

.. automodule:: scikits.learn.naive_bayes
.. automodule:: sklearn.naive_bayes
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -154,11 +154,11 @@ Naive Bayes
Nearest Neighbors
=================

.. automodule:: scikits.learn.neighbors
.. automodule:: sklearn.neighbors
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -179,11 +179,11 @@ Nearest Neighbors
Gaussian Mixture Models
=======================

.. automodule:: scikits.learn.mixture
.. automodule:: sklearn.mixture
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -197,11 +197,11 @@ Gaussian Mixture Models
Hidden Markov Models
====================

.. automodule:: scikits.learn.hmm
.. automodule:: sklearn.hmm
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -215,11 +215,11 @@ Hidden Markov Models
Clustering
==========

.. automodule:: scikits.learn.cluster
.. automodule:: sklearn.cluster
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -240,11 +240,11 @@ Metrics
Classification metrics
----------------------

.. automodule:: scikits.learn.metrics
.. automodule:: sklearn.metrics
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -268,11 +268,11 @@ Classification metrics
Regression metrics
------------------

.. automodule:: scikits.learn.metrics
.. automodule:: sklearn.metrics
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -285,11 +285,11 @@ Regression metrics
Clustering metrics
------------------

.. automodule:: scikits.learn.metrics.cluster
.. automodule:: sklearn.metrics.cluster
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -303,11 +303,11 @@ Clustering metrics
Pairwise metrics
----------------

.. automodule:: scikits.learn.metrics.pairwise
.. automodule:: sklearn.metrics.pairwise
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -323,11 +323,11 @@ Pairwise metrics
Covariance Estimators
=====================

.. automodule:: scikits.learn.covariance
.. automodule:: sklearn.covariance
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -351,11 +351,11 @@ Covariance Estimators
Signal Decomposition
====================

.. automodule:: scikits.learn.decomposition
.. automodule:: sklearn.decomposition
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -393,11 +393,11 @@ Linear Discriminant Analysis
Partial Least Squares
=====================

.. automodule:: scikits.learn.pls
.. automodule:: sklearn.pls
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -412,11 +412,11 @@ Partial Least Squares
Cross Validation
================

.. automodule:: scikits.learn.cross_val
.. automodule:: sklearn.cross_val
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -435,11 +435,11 @@ Cross Validation
Grid Search
===========

.. automodule:: scikits.learn.grid_search
.. automodule:: sklearn.grid_search
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -454,11 +454,11 @@ Grid Search
Feature Selection
=================

.. automodule:: scikits.learn.feature_selection
.. automodule:: sklearn.feature_selection
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -474,20 +474,20 @@ Feature Selection
Feature Extraction
==================

.. automodule:: scikits.learn.feature_extraction
.. automodule:: sklearn.feature_extraction
:no-members:
:no-inherited-members:

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

From images
-------------

.. automodule:: scikits.learn.feature_extraction.image
.. automodule:: sklearn.feature_extraction.image
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -506,11 +506,11 @@ From images
From text
---------

.. automodule:: scikits.learn.feature_extraction.text
.. automodule:: sklearn.feature_extraction.text
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -527,11 +527,11 @@ From text
Preprocessing and normalization
===============================

.. automodule:: scikits.learn.preprocessing
.. automodule:: sklearn.preprocessing
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -577,11 +577,11 @@ Datasets
Loaders
-------

.. automodule:: scikits.learn.datasets
.. automodule:: sklearn.datasets
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -602,11 +602,11 @@ Loaders
Samples generator
-----------------

.. automodule:: scikits.learn.datasets
.. automodule:: sklearn.datasets
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -629,11 +629,11 @@ Samples generator
Pipeline
========

.. automodule:: scikits.learn.pipeline
.. automodule:: sklearn.pipeline
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -645,11 +645,11 @@ Pipeline
Utilities
=========

.. automodule:: scikits.learn.utils
.. automodule:: sklearn.utils
:no-members:
:no-inherited-members:

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

.. autosummary::
:toctree: generated/
@@ -5,26 +5,26 @@ Clustering
==========

`Clustering <http://en.wikipedia.org/wiki/Cluster_analysis>`__ of
unlabeled data can be performed with the module :mod:`scikits.learn.cluster`.
unlabeled data can be performed with the module :mod:`sklearn.cluster`.

Each clustering algorithm comes in two variants: a class, that implements
the `fit` method to learn the clusters on train data, and a function,
that, given train data, returns an array of integer labels corresponding
to the different clusters. For the class, the labels over the training
data can be found in the `labels_` attribute.

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

.. topic:: Input data

One important thing to note is that the algorithms implemented in
this module take different kinds of matrix as input. On one hand,
:class:`MeanShift` and :class:`KMeans` take data matrices of shape
[n_samples, n_features]. These can be obtained from the classes in
the :mod:`scikits.learn.feature_extraction` module. On the other hand,
the :mod:`sklearn.feature_extraction` module. On the other hand,
:class:`AffinityPropagation` and :class:`SpectralClustering` take
similarity matrices of shape [n_samples, n_samples]. These can be
obtained from the functions in the :mod:`scikits.learn.metrics.pairwise`
obtained from the functions in the :mod:`sklearn.metrics.pairwise`
module. In other words, :class:`MeanShift` and :class:`KMeans` work
with points in a vector space, whereas :class:`AffinityPropagation`
and :class:`SpectralClustering` can work with arbitrary objects, as
@@ -247,10 +247,10 @@ and a column with indices of the dataset that should be connected. This
matrix can be constructed from apriori information, for instance if you
whish to cluster web pages, but only merging pages with a link pointing
from one to another. It can also be learned from the data, for instance
using :func:`scikits.learn.neighbors.kneighbors_graph` to restrict
using :func:`sklearn.neighbors.kneighbors_graph` to restrict
merging to nearest neighbors as in the :ref:`swiss roll
<example_cluster_plot_ward_structured_vs_unstructured.py>` example, or
using :func:`scikits.learn.feature_extraction.image.grid_to_graph` to
using :func:`sklearn.feature_extraction.image.grid_to_graph` to
enable only merging of neighboring pixels on an image, as in the
:ref:`Lena <example_cluster_plot_lena_ward_segmentation.py>` example.

@@ -311,7 +311,7 @@ truth set of classes or satisfying some assumption such that members
belong to the same class are more similar that members of different
classes according to some similarity metric.

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

Inertia
-------
@@ -363,7 +363,7 @@ We can turn those concept as scores :func:`homogeneity_score` and
:func:`completeness_score`. Both are bounded below by 0.0 and above by
1.0 (higher is better)::

>>> from scikits.learn import metrics
>>> from sklearn import metrics
>>> labels_true = [0, 0, 0, 1, 1, 1]
>>> labels_pred = [0, 0, 1, 1, 2, 2]

@@ -4,15 +4,15 @@
Covariance estimation
===================================================

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


Many statistical problems require at some point the estimation of a
population's covariance matrix, which can be seen as an estimation of
data set scatter plot shape. Most of the time, such an estimation has
to be done on a sample whose properties (size, structure, homogeneity)
has a large influence on the estimation's quality. The
`scikits.learn.covariance` package aims at providing tools affording
`sklearn.covariance` package aims at providing tools affording
an accurate estimation of a population's covariance matrix under
various settings.

@@ -94,7 +94,7 @@ covariance matrix in terms of Frobenius norm.

The Ledoit-Wolf estimator of the covariance matrix can be computed on
a sample with the :meth:`ledoit_wolf` function of the
`scikits.learn.covariance` package, or it can be otherwise obtained by
`sklearn.covariance` package, or it can be otherwise obtained by
fitting a :class:`LedoitWolf` object to the same sample.

[1] O. Ledoit and M. Wolf, "A Well-Conditioned Estimator for Large-Dimensional
@@ -126,7 +126,7 @@ Wolf's formula. The resulting estimator is known as the Oracle
Shrinkage Approximating estimator of the covariance.

The OAS estimator of the covariance matrix can be computed on a sample
with the :meth:`oas` function of the `scikits.learn.covariance`
with the :meth:`oas` function of the `sklearn.covariance`
package, or it can be otherwise obtained by fitting an :class:`OAS`
object to the same sample. The formula we used to implement the OAS
does not correspond to the one given in the article. It has been taken
@@ -2,7 +2,7 @@
Cross-Validation
================

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

Learning the parameters of a prediction function and testing it on the same
data yields a methodological bias. To avoid over-fitting, we have to define two
@@ -40,12 +40,12 @@ cross-validation procedure does not waste much data as only one sample
is removed from the learning set::

>>> import numpy as np
>>> from scikits.learn.cross_val import LeaveOneOut
>>> from sklearn.cross_val import LeaveOneOut
>>> X = np.array([[0., 0.], [1., 1.], [-1., -1.], [2., 2.]])
>>> Y = np.array([0, 1, 0, 1])
>>> loo = LeaveOneOut(len(Y))
>>> print loo
scikits.learn.cross_val.LeaveOneOut(n=4)
sklearn.cross_val.LeaveOneOut(n=4)
>>> for train, test in loo: print train, test
[False True True True] [ True False False False]
[ True False True True] [False True False False]
@@ -64,12 +64,12 @@ integer indices. It can be obtained by setting the parameter indices to True
when creating the cross-validation procedure::

>>> import numpy as np
>>> from scikits.learn.cross_val import LeaveOneOut
>>> from sklearn.cross_val import LeaveOneOut
>>> X = np.array([[0., 0.], [1., 1.], [-1., -1.], [2., 2.]])
>>> Y = np.array([0, 1, 0, 1])
>>> loo = LeaveOneOut(len(Y), indices=True)
>>> print loo
scikits.learn.cross_val.LeaveOneOut(n=4)
sklearn.cross_val.LeaveOneOut(n=4)
>>> for train, test in loo: print train, test
[1 2 3] [0]
[0 2 3] [1]
@@ -86,12 +86,12 @@ possible training/test sets by removing *P* samples from the complete set.

Example of Leave-2-Out::

>>> from scikits.learn.cross_val import LeavePOut
>>> from sklearn.cross_val import LeavePOut
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.]]
>>> Y = [0, 1, 0, 1]
>>> loo = LeavePOut(len(Y), 2)
>>> print loo
scikits.learn.cross_val.LeavePOut(n=4, p=2)
sklearn.cross_val.LeavePOut(n=4, p=2)
>>> for train, test in loo: print train,test
[False False True True] [ True True False False]
[False True False True] [ True False True False]
@@ -121,12 +121,12 @@ and the fold left out is used for test.

Example of 2-fold::

>>> from scikits.learn.cross_val import KFold
>>> from sklearn.cross_val import KFold
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.]]
>>> Y = [0, 1, 0, 1]
>>> loo = KFold(len(Y), 2)
>>> print loo
scikits.learn.cross_val.KFold(n=4, k=2)
sklearn.cross_val.KFold(n=4, k=2)
>>> for train, test in loo: print train,test
[False False True True] [ True True False False]
[ True True False False] [False False True True]
@@ -144,12 +144,12 @@ class as in the complete set.

Example of stratified 2-fold::

>>> from scikits.learn.cross_val import StratifiedKFold
>>> from sklearn.cross_val import StratifiedKFold
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.], [3., 3.], [4., 4.], [0., 1.]]
>>> Y = [0, 0, 0, 1, 1, 1, 0]
>>> skf = StratifiedKFold(Y, 2)
>>> print skf
scikits.learn.cross_val.StratifiedKFold(labels=[0 0 0 1 1 1 0], k=2)
sklearn.cross_val.StratifiedKFold(labels=[0 0 0 1 1 1 0], k=2)
>>> for train, test in skf: print train, test
[False True False False True False True] [ True False True True False True False]
[ True False True True False True False] [False True False False True False True]
@@ -169,13 +169,13 @@ For example, in the cases of multiple experiments, *LOLO* can be used to
create a cross-validation based on the different experiments: we create a
training set using the samples of all the experiments except one::

>>> from scikits.learn.cross_val import LeaveOneLabelOut
>>> from sklearn.cross_val import LeaveOneLabelOut
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.]]
>>> Y = [0, 1, 0, 1]
>>> labels = [1, 1, 2, 2]
>>> loo = LeaveOneLabelOut(labels)
>>> print loo
scikits.learn.cross_val.LeaveOneLabelOut(labels=[1, 1, 2, 2])
sklearn.cross_val.LeaveOneLabelOut(labels=[1, 1, 2, 2])
>>> for train, test in loo: print train,test
[False False True True] [ True True False False]
[ True True False False] [False False True True]
@@ -191,13 +191,13 @@ related to *P* labels for each training/test set.

Example of Leave-2-Label Out::

>>> from scikits.learn.cross_val import LeavePLabelOut
>>> from sklearn.cross_val import LeavePLabelOut
>>> X = [[0., 0.], [1., 1.], [-1., -1.], [2., 2.], [3., 3.], [4., 4.]]
>>> Y = [0, 1, 0, 1, 0, 1]
>>> labels = [1, 1, 2, 2, 3, 3]
>>> loo = LeavePLabelOut(labels, 2)
>>> print loo
scikits.learn.cross_val.LeavePLabelOut(labels=[1, 1, 2, 2, 3, 3], p=2)
sklearn.cross_val.LeavePLabelOut(labels=[1, 1, 2, 2, 3, 3], p=2)
>>> for train, test in loo: print train,test
[False False False False True True] [ True True True True False False]
[False False True True False False] [ True True False False True True]
@@ -225,7 +225,7 @@ smaller than the total dataset if it is very large.

.. _Bootstrapping: http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29

>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> bs = cross_val.Bootstrap(9, random_state=0)
>>> len(bs)
3
@@ -5,7 +5,7 @@
Decomposing signals in components (matrix factorization problems)
=================================================================

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


.. _PCA:
@@ -1,7 +1,7 @@

.. _dpgmm:

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


Variational Gaussian Mixture Models
@@ -5,25 +5,25 @@
Feature extraction
==================

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

The :mod:`scikits.learn.feature_extraction` module can be used to extract
The :mod:`sklearn.feature_extraction` module can be used to extract
features in a format supported by machine learning algorithms from datasets
consisting of formats such as text and image.


Text feature extraction
=======================

.. currentmodule:: scikits.learn.feature_extraction.text
.. currentmodule:: sklearn.feature_extraction.text

XXX: a lot to do here


Image feature extraction
========================

.. currentmodule:: scikits.learn.feature_extraction.image
.. currentmodule:: sklearn.feature_extraction.image

Patch extraction
----------------
@@ -35,7 +35,7 @@ the third axis. For rebuilding an image from all its patches, use
picture with 3 color channels (e.g. in RGB format)::

>>> import numpy as np
>>> from scikits.learn.feature_extraction import image
>>> from sklearn.feature_extraction import image

>>> one_image = np.arange(4 * 4 * 3).reshape((4, 4, 3))
>>> one_image[:, :, 0] # R channel of a fake RGB picture
@@ -5,12 +5,12 @@
Feature selection
=================

The classes in the ``scikits.learn.feature_selection`` module can be used
The classes in the ``sklearn.feature_selection`` module can be used
for feature selection/dimensionality reduction on sample sets, either to
improve estimators' accuracy scores or to boost their performance on very
high-dimensional datasets.

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

Univariate feature selection
============================
@@ -6,7 +6,7 @@
Gaussian Processes
==================

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

**Gaussian Processes for Machine Learning (GPML)** is a generic supervised
learning method primarily designed to solve *regression* problems. It has also
@@ -64,7 +64,7 @@ parameters or alternatively it uses the given parameters.
::

>>> import numpy as np
>>> from scikits.learn import gaussian_process
>>> from sklearn import gaussian_process
>>> def f(x):
... return x * np.sin(x)
>>> X = np.atleast_2d([1., 3., 5., 6., 7., 8.]).T
@@ -2,7 +2,7 @@
Grid Search
===================================================

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


Grid Search is used to optimize the parameters of a model
@@ -9,7 +9,7 @@ Hidden Markov Models
the mailing list.


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

Classes in this module include :class:`GaussianHMM`, :class:`MultinomalHMM`
and :class:`GMMHMM`. There's currently no narrative documentation for this
@@ -5,7 +5,7 @@
Generalized Linear Models
=========================

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

The following are a set of methods intended for regression in which
the target value is expected to be a linear combination of the input
@@ -40,7 +40,7 @@ responses predicted by the linear approximation.
and will store the coefficients :math:`w` of the linear model in its
`coef\_` member::

>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.LinearRegression()
>>> clf.fit ([[0, 0], [1, 1], [2, 2]], [0, 1, 2])
LinearRegression(fit_intercept=True, normalize=False, overwrite_X=False)
@@ -97,7 +97,7 @@ As with other linear models, :class:`Ridge` will take in its `fit` method
arrays X, y and will store the coefficients :math:`w` of the linear model in
its `coef\_` member::

>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.Ridge (alpha = .5)
>>> clf.fit ([[0, 0], [0, 0], [1, 1]], [0, .1, 1])
Ridge(alpha=0.5, fit_intercept=True, normalize=False, overwrite_X=False,
@@ -133,7 +133,7 @@ cross-validation of the alpha parameter. The object works in the same way
as GridSearchCV except that it defaults to Generalized Cross-Validation
(GCV), an efficient form of leave-one-out cross-validation::

>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.RidgeCV(alphas=[0.1, 1.0, 10.0])
>>> clf.fit([[0, 0], [0, 0], [1, 1]], [0, .1, 1]) # doctest: +SKIP
RidgeCV(alphas=[0.1, 1.0, 10.0], cv=None, fit_intercept=True, loss_func=None,
@@ -321,7 +321,7 @@ function of the norm of its coefficients.

::

>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.LassoLars(alpha=.1)
>>> clf.fit ([[0, 0], [1, 1]], [0, 1]) # doctest: +ELLIPSIS
LassoLars(alpha=0.1, eps=..., fit_intercept=True,
@@ -461,7 +461,7 @@ By default :math:`\alpha_1 = \alpha_2 = \lambda_1 = \lambda_2 = 1.e^{-6}`, *i.e

*Bayesian Ridge Regression* is used for regression::

>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> X = [[0., 0.], [1., 1.], [2., 2.], [3., 3.]]
>>> Y = [0., 1., 2., 3.]
>>> clf = linear_model.BayesianRidge()
@@ -585,7 +585,7 @@ but rather a "hit or miss" cost.

The :class:`LogisticRegression` class can be used to do L1 or L2 penalized
logistic regression. L1 penalization yields sparse predicting weights.
For L1 penalization :func:`scikits.learn.svm.l1_min_c` allows to calculate
For L1 penalization :func:`sklearn.svm.l1_min_c` allows to calculate
the lower bound for C in order to get a non "null" (all feature weights to
zero) model.

@@ -1,7 +1,7 @@

.. _manifold:

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

=================
Manifold learning
@@ -91,7 +91,7 @@ from the data itself, without the use of predetermined classifications.
* See :ref:`example_manifold_plot_compare_methods.py` for an example of
dimensionality reduction on a toy "S-curve" dataset.

The manifold learning implementations available in scikits-learn are
The manifold learning implementations available in sklearn are
summarized below

Isomap
@@ -114,7 +114,7 @@ Complexity
The Isomap algorithm comprises three stages:

1. **Nearest neighbor search.** Isomap uses
:class:`scikits.learn.neighbors.BallTree` for efficient neighbor search.
:class:`sklearn.neighbors.BallTree` for efficient neighbor search.
The cost is approximately :math:`O[D \log(k) N \log(N)]`, for :math:`k`
nearest neighbors of :math:`N` points in :math:`D` dimensions.

@@ -257,7 +257,7 @@ Hessian Eigenmapping (also known as Hessian-based LLE: HLLE) is another method
of solving the regularization problem of LLE. It revolves around a
hessian-based quadratic form at each neighborhood which is used to recover
the locally linear structure. Though other implementations note its poor
scaling with data size, ``scikits-learn`` implements some algorithmic
scaling with data size, ``sklearn`` implements some algorithmic
improvements which make its cost comparable to that of other LLE variants
for small output dimension. HLLE can be performed with function
:func:`locally_linear_embedding` or its object-oriented counterpart
@@ -4,9 +4,9 @@
Gaussian mixture models
===================================================

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

`scikits.learn.mixture` is a package which enables one to learn
`sklearn.mixture` is a package which enables one to learn
Gaussian Mixture Models (diagonal, spherical, tied and full covariance
matrices supported), sample them, and estimate them from
data. Facilities to help determine the appropriate number of
@@ -35,7 +35,7 @@ these models that, while not guaranteed to return the optimal
solution, do converge quickly to a local optimum. To improve the
quality it is usual to fit these models many times with different
parameters and choose the best result, as measured by the likelihood
or some other external criterion. Here in `scikits.learn` we implement
or some other external criterion. Here in `sklearn` we implement
two approximate inference algorithms for mixtures of gaussians:
expectation-maximization and variational inference. We also implement
a variant of the mixture model, known as the Dirichlet Process prior,
@@ -59,7 +59,7 @@ origin) and computes for each point a probability distribution on the
components it could have been assigned to. Then, one tweaks the
parameters to maximize the likelihood of the data given those
assignments. Repeating this process is guaranteed to always converge
to a local optimum. In the `scikits.learn` this algorithm in
to a local optimum. In the `sklearn` this algorithm in
implemented in the :class:`GMM` class.

Advantages of expectation-maximization:
@@ -206,7 +206,7 @@ The main disadvantages of using the dirichlet process are:
GMM classifier
==============

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

The :class:`GMM` object implements the expectation-maximization (EM)
algorithm for fitting mixture-of-gaussian models. It can also draw
@@ -238,7 +238,7 @@ the :meth:`GMM.predict` method.
Variational Gaussian mixtures: VBGMM classifier
=============================================

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

The :class:`VBGMM` object implements a variant of the Gaussian mixture
model with variational inference algorithms. The API is identical to
@@ -2,7 +2,7 @@
Multiclass algorithms
=====================

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

This module implements multiclass learning algorithms:
- one-vs-the-rest / one-vs-all
@@ -40,9 +40,9 @@ only, it is possible to gain knowledge about the class by inspecting its
corresponding classifier. This is the most commonly used strategy and is a
fair default choice. Below is an example::

>>> from scikits.learn import datasets
>>> from scikits.learn.multiclass import OneVsRestClassifier
>>> from scikits.learn.svm import LinearSVC
>>> from sklearn import datasets
>>> from sklearn.multiclass import OneVsRestClassifier
>>> from sklearn.svm import LinearSVC
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> OneVsRestClassifier(LinearSVC()).fit(X, y).predict(X)
@@ -68,9 +68,9 @@ algorithms such as kernel algorithms which don't scale well with
a small subset of the data whereas, with one-vs-the-rest, the complete
dataset is used `n_classes` times. Below is an example::

>>> from scikits.learn import datasets
>>> from scikits.learn.multiclass import OneVsOneClassifier
>>> from scikits.learn.svm import LinearSVC
>>> from sklearn import datasets
>>> from sklearn.multiclass import OneVsOneClassifier
>>> from sklearn.svm import LinearSVC
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> OneVsOneClassifier(LinearSVC()).fit(X, y).predict(X)
@@ -120,9 +120,9 @@ effect to bagging.

Example::

>>> from scikits.learn import datasets
>>> from scikits.learn.multiclass import OutputCodeClassifier
>>> from scikits.learn.svm import LinearSVC
>>> from sklearn import datasets
>>> from sklearn.multiclass import OutputCodeClassifier
>>> from sklearn.svm import LinearSVC
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> OutputCodeClassifier(LinearSVC(), code_size=2, random_state=0).fit(X, y).predict(X)
@@ -2,7 +2,7 @@
Naive Bayes
===========

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


**Naive Bayes** algorithms are a set of supervised learning methods
@@ -2,7 +2,7 @@
Nearest Neighbors
=================

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

The principle behind nearest neighbor methods (*k*-NN) is to find the *k*
training samples closest in Euclidean distance to the sample to be classified,
@@ -4,7 +4,7 @@
Partial Least Squares
======================

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

Partial least squares (PLS) models are useful to find linear relations
between two multivariate datasets: in PLS the `X` and `Y` arguments of
@@ -4,9 +4,9 @@
Preprocessing data
==================

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

The ``scikits.learn.preprocessing`` package provides several common
The ``sklearn.preprocessing`` package provides several common
utility functions and transformer classes to change raw feature vectors
into a representation that is more suitable for the downstream estimators.

@@ -36,7 +36,7 @@ estimator unable to learn from other features correctly as expected.
The function :func:`scale` provides a quick and easy way to perform this
operation on a single array-like dataset::

>>> from scikits.learn import preprocessing
>>> from sklearn import preprocessing
>>> X = [[ 1., -1., 2.],
... [ 2., 0., 0.],
... [ 0., 1., -1.]]
@@ -60,7 +60,7 @@ The ``preprocessing`` module further provides a utility class
the mean and standard deviation on a training set so as to be
able to later reapply the same transformation on the testing set.
This class is hence suitable for use in the early steps of a
:class:`scikits.learn.pipeline.Pipeline`::
:class:`sklearn.pipeline.Pipeline`::

>>> scaler = preprocessing.Scaler().fit(X)
>>> scaler
@@ -101,8 +101,8 @@ of :class:`Scaler`.
since downstream model can further make assumption on the linear independence
of the features.

To address this issue you can use :class:`scikits.learn.decomposition.PCA`
or :class:`scikits.learn.decomposition.RandomizedPCA` with ``whiten=True``
To address this issue you can use :class:`sklearn.decomposition.PCA`
or :class:`sklearn.decomposition.RandomizedPCA` with ``whiten=True``
to further remove the linear correlation across features.

Also note that the current implementation of :func:`scale` and
@@ -141,7 +141,7 @@ The ``preprocessing`` module further provides a utility class
the class is stateless as this operation treats samples independently).

This class is hence suitable for use in the early steps of a
:class:`scikits.learn.pipeline.Pipeline`::
:class:`sklearn.pipeline.Pipeline`::

>>> normalizer = preprocessing.Normalizer().fit(X) # fit does nothing
>>> normalizer
@@ -192,7 +192,7 @@ often perform slightly better in practice.

As for the :class:`Normalizer`, the utility class
:class:`Binarizer` is meant to be used in the early stages of
:class:`scikits.learn.pipeline.Pipeline`. The ``fit`` method does nothing
:class:`sklearn.pipeline.Pipeline`. The ``fit`` method does nothing
as each sample is treated independently of others::

>>> X = [[ 1., -1., 2.],
@@ -5,7 +5,7 @@
Stochastic Gradient Descent
===========================

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

**Stochastic Gradient Descent (SGD)** is a simple yet very efficient
approach to discriminative learning of linear classifiers under
@@ -54,7 +54,7 @@ of size [n_samples, n_features] holding the training samples, and an
array Y of size [n_samples] holding the target values (class labels)
for the training samples::

>>> from scikits.learn.linear_model import SGDClassifier
>>> from sklearn.linear_model import SGDClassifier
>>> X = [[0., 0.], [1., 1.]]
>>> y = [0, 1]
>>> clf = SGDClassifier(loss="hinge", penalty="l2")
@@ -183,7 +183,7 @@ specified via the parameter `epsilon`.
- :ref:`example_linear_model_plot_sgd_ols.py`,


.. currentmodule:: scikits.learn.linear_model.sparse
.. currentmodule:: sklearn.linear_model.sparse

Stochastic Gradient Descent for sparse data
===========================================
@@ -233,7 +233,7 @@ Tips on Practical Use
must be applied to the test vector to obtain meaningful
results. This can be easily done using :class:`Scaler`::

from scikits.learn.preprocessing import Scaler
from sklearn.preprocessing import Scaler
scaler = Scaler()
scaler.fit(X_train) # Don't cheat - fit only on training data
X_train = scaler.transform(X_train)
@@ -5,7 +5,7 @@
Support Vector Machines
=======================

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

**Support vector machines (SVMs)** are a set of supervised learning
methods used for :ref:`classification <svm_classification>`,
@@ -74,7 +74,7 @@ of integer values, size [n_samples], holding the class labels for the
training samples::


>>> from scikits.learn import svm
>>> from sklearn import svm
>>> X = [[0, 0], [1, 1]]
>>> Y = [0, 1]
>>> clf = svm.SVC()
@@ -200,7 +200,7 @@ As with classification classes, the fit method will take as
argument vectors X, y, only that in this case y is expected to have
floating point values instead of integer values::

>>> from scikits.learn import svm
>>> from sklearn import svm
>>> X = [[0, 0], [2, 2]]
>>> y = [0.5, 2.5]
>>> clf = svm.SVR()
@@ -241,7 +241,7 @@ will only take as input an array X, as there are no class labels.
* :ref:`example_svm_plot_oneclass.py`
* :ref:`example_applications_plot_species_distribution_modeling.py`

.. currentmodule:: scikits.learn.svm.sparse
.. currentmodule:: sklearn.svm.sparse


Support Vector machines for sparse data
@@ -373,7 +373,7 @@ The following code defines a linear kernel and creates a classifier
instance that will use that kernel::

>>> import numpy as np
>>> from scikits.learn import svm
>>> from sklearn import svm
>>> def my_kernel(x, y):
... return np.dot(x, y.T)
...
@@ -63,7 +63,7 @@ Loading an example dataset
datasets for classification and the `boston house prices dataset
<http://archive.ics.uci.edu/ml/datasets/Housing>`_ for regression.::

>>> from scikits.learn import datasets
>>> from sklearn import datasets
>>> iris = datasets.load_iris()
>>> digits = datasets.load_digits()

@@ -115,7 +115,7 @@ array([0, 1, 2, ..., 8, 9, 8])
data for consumption in the `scikit-learn`.


``scikits.learn`` also offers the possibility to reuse external datasets coming
``sklearn`` also offers the possibility to reuse external datasets coming
from the http://mlcomp.org online service that provides a repository of public
datasets for various tasks (binary & multi label classification, regression,
document classification, ...) along with a runtime environment to compare
@@ -135,14 +135,14 @@ the labels corresponding to new data.
In `scikit-learn`, an *estimator* is just a plain Python class that
implements the methods `fit(X, Y)` and `predict(T)`.

An example of estimator is the class ``scikits.learn.svm.SVC`` that
An example of estimator is the class ``sklearn.svm.SVC`` that
implements `Support Vector Classification
<http://en.wikipedia.org/wiki/Support_vector_machine>`_. The
constructor of an estimator takes as arguments the parameters of the
model, but for the time being, we will consider the estimator as a black
box and not worry about these:

>>> from scikits.learn import svm
>>> from sklearn import svm
>>> clf = svm.SVC()
We call our estimator instance `clf` as it is a classifier. It now must
@@ -181,8 +181,8 @@ Model persistence
It is possible to save a model in the scikit by using Python's built-in
persistence model, namely `pickle <http://docs.python.org/library/pickle.html>`_.

>>> from scikits.learn import svm
>>> from scikits.learn import datasets
>>> from sklearn import svm
>>> from sklearn import datasets
>>> clf = svm.SVC()
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
@@ -201,6 +201,6 @@ In the specific case of the scikit, it may be more interesting to use
joblib's replacement of pickle, which is more efficient on big data, but
can only pickle to the disk and not to a string:

>>> from scikits.learn.externals import joblib
>>> from sklearn.externals import joblib
>>> joblib.dump(clf, 'filename.pkl') # doctest: +SKIP
@@ -1,5 +1,5 @@

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

.. _changes_0_8:

@@ -257,7 +257,7 @@ Changelog

- Improved sparse matrix support, both in main classes
(:class:`grid_search.GridSearchCV`) as in modules
scikits.learn.svm.sparse and scikits.learn.linear_model.sparse.
sklearn.svm.sparse and sklearn.linear_model.sparse.

- Lots of cool new examples and a new section that uses real-world
datasets was created. These include:
@@ -356,7 +356,7 @@ New classes
- New module feature_extraction (see :ref:`class reference
<feature_extraction_ref>`)

- New FastICA algorithm in module scikits.learn.fastica
- New FastICA algorithm in module sklearn.fastica


Documentation
@@ -397,7 +397,7 @@ External dependencies
~~~~~~~~~~~~~~~~~~~~~

- Joblib is now a dependencie of this package, although it is
shipped with (scikits.learn.externals.joblib).
shipped with (sklearn.externals.joblib).

Removed modules
~~~~~~~~~~~~~~~
@@ -36,13 +36,13 @@
import logging
import pylab as pl

from scikits.learn.cross_val import StratifiedKFold
from scikits.learn.datasets import fetch_lfw_people
from scikits.learn.grid_search import GridSearchCV
from scikits.learn.metrics import classification_report
from scikits.learn.metrics import confusion_matrix
from scikits.learn.decomposition import RandomizedPCA
from scikits.learn.svm import SVC
from sklearn.cross_val import StratifiedKFold
from sklearn.datasets import fetch_lfw_people
from sklearn.grid_search import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.decomposition import RandomizedPCA
from sklearn.svm import SVC

# Display progress logs on stdout
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s')
@@ -10,7 +10,7 @@
variables. Since we have only positive examples (there are
no unsuccessful observations), we cast this problem as a
density estimation problem and use the `OneClassSVM` provided
by the package `scikits.learn.svm` as our modeling tool.
by the package `sklearn.svm` as our modeling tool.
The dataset is provided by Phillips et. al. (2006).
If available, the example uses `basemap <http://matplotlib.sourceforge.net/basemap/doc/html/>`_
to plot the coast lines and national boundaries of South America.
@@ -54,9 +54,9 @@
except ImportError:
basemap = False

from scikits.learn import svm
from scikits.learn.metrics import roc_curve, auc
from scikits.learn.datasets.base import Bunch
from sklearn import svm
from sklearn.metrics import roc_curve, auc
from sklearn.datasets.base import Bunch

###############################################################################
# Download the data, if not already on disk
@@ -15,7 +15,7 @@
from matplotlib import finance
import numpy as np

from scikits.learn import cluster
from sklearn import cluster

# Choose a time period reasonnably calm (not too long ago so that we get
# high-tech firms, and before the 2008 crash)
@@ -33,7 +33,7 @@
import sys
import numpy as np

from scikits.learn import svm
from sklearn import svm

y_min, y_max = -50, 50
x_min, x_max = -50, 50
@@ -36,9 +36,9 @@
"""

from time import time
from scikits.learn.feature_extraction import text
from scikits.learn import decomposition
from scikits.learn import datasets
from sklearn.feature_extraction import text
from sklearn import decomposition
from sklearn import datasets

n_samples = 1000
n_features = 1000
@@ -43,8 +43,8 @@

from scipy import sparse

from scikits.learn.utils.extmath import fast_svd
from scikits.learn.externals.joblib import Memory
from sklearn.utils.extmath import fast_svd
from sklearn.externals.joblib import Memory


################################################################################
@@ -11,9 +11,9 @@
print __doc__

import numpy as np
from scikits.learn.cluster import AffinityPropagation
from scikits.learn import metrics
from scikits.learn.datasets.samples_generator import make_blobs
from sklearn.cluster import AffinityPropagation
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs

##############################################################################
# Generate sample data
@@ -27,10 +27,10 @@
print __doc__
import numpy as np
import pylab as pl
from scikits.learn.cluster import KMeans
from scikits.learn.metrics import euclidean_distances
from scikits.learn.datasets import load_sample_image
from scikits.learn.utils import shuffle
from sklearn.cluster import KMeans
from sklearn.metrics import euclidean_distances
from sklearn.datasets import load_sample_image
from sklearn.utils import shuffle
from time import time

n_colors = 64
@@ -11,9 +11,9 @@

import numpy as np
from scipy.spatial import distance
from scikits.learn.cluster import DBSCAN
from scikits.learn import metrics
from scikits.learn.datasets.samples_generator import make_blobs
from sklearn.cluster import DBSCAN
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs


##############################################################################
@@ -22,14 +22,14 @@
import pylab as pl
from scipy import linalg, ndimage

from scikits.learn.feature_extraction.image import grid_to_graph
from scikits.learn import feature_selection
from scikits.learn.cluster import WardAgglomeration
from scikits.learn.linear_model import BayesianRidge
from scikits.learn.pipeline import Pipeline
from scikits.learn.grid_search import GridSearchCV
from scikits.learn.externals.joblib import Memory
from scikits.learn.cross_val import KFold
from sklearn.feature_extraction.image import grid_to_graph
from sklearn import feature_selection
from sklearn.cluster import WardAgglomeration
from sklearn.linear_model import BayesianRidge
from sklearn.pipeline import Pipeline
from sklearn.grid_search import GridSearchCV
from sklearn.externals.joblib import Memory
from sklearn.cross_val import KFold

###############################################################################
# Generate data
@@ -16,11 +16,11 @@
import numpy as np
import pylab as pl

from scikits.learn import metrics
from scikits.learn.cluster import KMeans
from scikits.learn.datasets import load_digits
from scikits.learn.decomposition import PCA
from scikits.learn.preprocessing import scale
from sklearn import metrics
from sklearn.cluster import KMeans
from sklearn.datasets import load_digits
from sklearn.decomposition import PCA
from sklearn.preprocessing import scale

np.random.seed(42)

@@ -19,8 +19,8 @@
import scipy as sp
import pylab as pl

from scikits.learn.feature_extraction import image
from scikits.learn.cluster import spectral_clustering
from sklearn.feature_extraction import image
from sklearn.cluster import spectral_clustering

lena = sp.lena()
# Downsample the image by a factor of 4
@@ -18,8 +18,8 @@
import numpy as np
import scipy as sp
import pylab as pl
from scikits.learn.feature_extraction.image import grid_to_graph
from scikits.learn.cluster import Ward
from sklearn.feature_extraction.image import grid_to_graph
from sklearn.cluster import Ward

###############################################################################
# Generate data
@@ -13,8 +13,8 @@
print __doc__

import numpy as np
from scikits.learn.cluster import MeanShift, estimate_bandwidth
from scikits.learn.datasets.samples_generator import make_blobs
from sklearn.cluster import MeanShift, estimate_bandwidth
from sklearn.datasets.samples_generator import make_blobs

###############################################################################
# Generate sample data
@@ -19,9 +19,9 @@
import numpy as np
import pylab as pl

from scikits.learn.cluster import MiniBatchKMeans, KMeans
from scikits.learn.metrics.pairwise import euclidean_distances
from scikits.learn.datasets.samples_generator import make_blobs
from sklearn.cluster import MiniBatchKMeans, KMeans
from sklearn.metrics.pairwise import euclidean_distances
from sklearn.datasets.samples_generator import make_blobs

##############################################################################
# Generate sample data
@@ -33,8 +33,8 @@
import numpy as np
import pylab as pl

from scikits.learn.feature_extraction import image
from scikits.learn.cluster import spectral_clustering
from sklearn.feature_extraction import image
from sklearn.cluster import spectral_clustering

################################################################################
l = 100
@@ -28,8 +28,8 @@
import numpy as np
import pylab as pl
import mpl_toolkits.mplot3d.axes3d as p3
from scikits.learn.cluster import Ward
from scikits.learn.datasets.samples_generator import make_swiss_roll
from sklearn.cluster import Ward
from sklearn.datasets.samples_generator import make_swiss_roll

###############################################################################
# Generate data (swiss roll dataset)
@@ -61,7 +61,7 @@

###############################################################################
# Define the structure A of the data. Here a 10 nearest neighbors
from scikits.learn.neighbors import kneighbors_graph
from sklearn.neighbors import kneighbors_graph
connectivity = kneighbors_graph(X, n_neighbors=10)

###############################################################################
@@ -42,7 +42,7 @@
###############################################################################
# Compute Ledoit-Wolf and Covariances on a grid of shrinkages

from scikits.learn.covariance import LedoitWolf, OAS, ShrunkCovariance, \
from sklearn.covariance import LedoitWolf, OAS, ShrunkCovariance, \
log_likelihood, empirical_covariance

# Ledoit-Wolf optimal shrinkage coefficient estimate
@@ -26,7 +26,7 @@
import pylab as pl
from scipy.linalg import toeplitz, cholesky

from scikits.learn.covariance import LedoitWolf, OAS
from sklearn.covariance import LedoitWolf, OAS

###############################################################################
n_features = 100
@@ -5,7 +5,7 @@
This example applies to :doc:`/datasets/olivetti_faces` different
unsupervised matrix decomposition (dimension reduction) methods from the
module :py:mod:`scikits.learn.decomposition` (see the documentation
module :py:mod:`sklearn.decomposition` (see the documentation
chapter :ref:`decompositions`) .
"""
@@ -19,9 +19,9 @@

import pylab as pl

from scikits.learn.datasets import fetch_olivetti_faces
from scikits.learn.cluster import MiniBatchKMeans
from scikits.learn import decomposition
from sklearn.datasets import fetch_olivetti_faces
from sklearn.cluster import MiniBatchKMeans
from sklearn import decomposition

# Display progress logs on stdout
logging.basicConfig(level=logging.INFO,
@@ -13,7 +13,7 @@

import numpy as np
import pylab as pl
from scikits.learn.decomposition import FastICA
from sklearn.decomposition import FastICA

###############################################################################
# Generate sample data
@@ -33,7 +33,7 @@
import numpy as np
import pylab as pl

from scikits.learn.decomposition import PCA, FastICA
from sklearn.decomposition import PCA, FastICA

###############################################################################
# Generate sample data
@@ -14,7 +14,7 @@
import numpy as np
import pylab as pl

from scikits.learn.decomposition import PCA, KernelPCA
from sklearn.decomposition import PCA, KernelPCA

np.random.seed(0)

@@ -20,9 +20,9 @@

import pylab as pl

from scikits.learn import datasets
from scikits.learn.decomposition import PCA
from scikits.learn.lda import LDA
from sklearn import datasets
from sklearn.decomposition import PCA
from sklearn.lda import LDA

iris = datasets.load_iris()

@@ -29,15 +29,15 @@
import sys
from time import time

from scikits.learn.datasets import fetch_20newsgroups
from scikits.learn.feature_extraction.text import Vectorizer
from scikits.learn.feature_selection import SelectKBest, chi2
from scikits.learn.linear_model import RidgeClassifier
from scikits.learn.svm.sparse import LinearSVC
from scikits.learn.linear_model.sparse import SGDClassifier
from scikits.learn.naive_bayes import BernoulliNB, MultinomialNB
from scikits.learn.neighbors import NeighborsClassifier
from scikits.learn import metrics
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import Vectorizer
from sklearn.feature_selection import SelectKBest, chi2
from sklearn.linear_model import RidgeClassifier
from sklearn.svm.sparse import LinearSVC
from sklearn.linear_model.sparse import SGDClassifier
from sklearn.naive_bayes import BernoulliNB, MultinomialNB
from sklearn.neighbors import NeighborsClassifier
from sklearn import metrics


# Display progress logs on stdout
@@ -17,14 +17,14 @@
import logging
import numpy as np

from scikits.learn.datasets import fetch_20newsgroups
from scikits.learn.feature_extraction.text import Vectorizer
from scikits.learn import metrics
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import Vectorizer
from sklearn import metrics

from scikits.learn.cluster import MiniBatchKMeans
from scikits.learn.cluster import randindex
from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import randindex

from scikits.learn.preprocessing import Normalizer
from sklearn.preprocessing import Normalizer


# Display progress logs on stdout
@@ -8,10 +8,10 @@
"""
print __doc__

from scikits.learn import svm
from scikits.learn.datasets import samples_generator
from scikits.learn.feature_selection import SelectKBest, f_regression
from scikits.learn.pipeline import Pipeline
from sklearn import svm
from sklearn.datasets import samples_generator
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.pipeline import Pipeline

# import some data to play with
X, y = samples_generator.make_classification(
@@ -11,15 +11,15 @@
# import some data to play with

# The IRIS dataset
from scikits.learn import datasets
from sklearn import datasets
iris = datasets.load_iris()

X = iris.data
y = iris.target

################################################################################
# GaussianNB
from scikits.learn.naive_bayes import GaussianNB
from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()

y_pred = gnb.fit(X, y).predict(X)
@@ -23,9 +23,9 @@
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# License: BSD style

from scikits.learn import datasets
from scikits.learn.gaussian_process import GaussianProcess
from scikits.learn.cross_val import cross_val_score, KFold
from sklearn import datasets
from sklearn.gaussian_process import GaussianProcess
from sklearn.cross_val import cross_val_score, KFold

# Load the dataset from scikits' data sets
diabetes = datasets.load_diabetes()
@@ -21,7 +21,7 @@

import numpy as np
from scipy import stats
from scikits.learn.gaussian_process import GaussianProcess
from sklearn.gaussian_process import GaussianProcess
from matplotlib import pyplot as pl
from matplotlib import cm

@@ -19,7 +19,7 @@
# License: BSD style

import numpy as np
from scikits.learn.gaussian_process import GaussianProcess
from sklearn.gaussian_process import GaussianProcess
from matplotlib import pyplot as pl


@@ -16,13 +16,13 @@
from pprint import pprint
import numpy as np

from scikits.learn import datasets
from scikits.learn.cross_val import StratifiedKFold
from scikits.learn.grid_search import GridSearchCV
from scikits.learn.metrics import classification_report
from scikits.learn.metrics import precision_score
from scikits.learn.metrics import recall_score
from scikits.learn.svm import SVC
from sklearn import datasets
from sklearn.cross_val import StratifiedKFold
from sklearn.grid_search import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.svm import SVC

################################################################################
# Loading the Digits dataset
@@ -52,12 +52,12 @@
import os
import logging

from scikits.learn.datasets import fetch_20newsgroups
from scikits.learn.feature_extraction.text import CountVectorizer
from scikits.learn.feature_extraction.text import TfidfTransformer
from scikits.learn.linear_model.sparse import SGDClassifier
from scikits.learn.grid_search import GridSearchCV
from scikits.learn.pipeline import Pipeline
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.linear_model.sparse import SGDClassifier
from sklearn.grid_search import GridSearchCV
from sklearn.pipeline import Pipeline

# Display progress logs on stdout
logging.basicConfig(level=logging.INFO,
@@ -27,7 +27,7 @@

################################################################################
# Lasso
from scikits.learn.linear_model import Lasso
from sklearn.linear_model import Lasso

alpha = 0.1
lasso = Lasso(alpha=alpha)
@@ -39,7 +39,7 @@

################################################################################
# ElasticNet
from scikits.learn.linear_model import ElasticNet
from sklearn.linear_model import ElasticNet

enet = ElasticNet(alpha=alpha, rho=0.7)

@@ -15,8 +15,8 @@
from scipy import sparse
from scipy import linalg

from scikits.learn.linear_model.sparse import Lasso as SparseLasso
from scikits.learn.linear_model import Lasso as DenseLasso
from sklearn.linear_model.sparse import Lasso as SparseLasso
from sklearn.linear_model import Lasso as DenseLasso


###############################################################################
@@ -18,8 +18,8 @@

import numpy as np

from scikits.learn.linear_model import LogisticRegression
from scikits.learn import datasets
from sklearn.linear_model import LogisticRegression
from sklearn import datasets

# FIXME: the iris dataset has only 4 features!
iris = datasets.load_iris()
@@ -20,7 +20,7 @@
import pylab as pl
from scipy import stats

from scikits.learn.linear_model import ARDRegression, LinearRegression
from sklearn.linear_model import ARDRegression, LinearRegression

################################################################################
# Generating simulated data with Gaussian weigthts
@@ -20,7 +20,7 @@
import pylab as pl
from scipy import stats

from scikits.learn.linear_model import BayesianRidge, LinearRegression
from sklearn.linear_model import BayesianRidge, LinearRegression

################################################################################
# Generating simulated data with Gaussian weigthts
@@ -14,8 +14,8 @@
import numpy as np
import pylab as pl

from scikits.learn.linear_model import lasso_path, enet_path
from scikits.learn import datasets
from sklearn.linear_model import lasso_path, enet_path
from sklearn import datasets

diabetes = datasets.load_diabetes()
X = diabetes.data
@@ -17,8 +17,8 @@
import numpy as np
import pylab as pl

from scikits.learn import linear_model
from scikits.learn import datasets
from sklearn import linear_model
from sklearn import datasets

diabetes = datasets.load_diabetes()
X = diabetes.data
@@ -51,8 +51,8 @@
import numpy as np
import pylab as pl

from scikits.learn.linear_model import LassoCV, LassoLarsCV, LassoLarsIC
from scikits.learn import datasets
from sklearn.linear_model import LassoCV, LassoLarsCV, LassoLarsIC
from sklearn import datasets

diabetes = datasets.load_diabetes()
X = diabetes.data
@@ -16,9 +16,9 @@
import numpy as np
import pylab as pl

from scikits.learn import linear_model
from scikits.learn import datasets
from scikits.learn.svm import l1_min_c
from sklearn import linear_model
from sklearn import datasets
from sklearn.svm import l1_min_c

iris = datasets.load_iris()
X = iris.data
@@ -11,7 +11,7 @@
import numpy as np
import pylab as pl

from scikits.learn import linear_model
from sklearn import linear_model

# this is our test set, it's just a straight line with some
# gaussian noise
@@ -10,8 +10,8 @@

import pylab as pl
import numpy as np
from scikits.learn.linear_model import orthogonal_mp
from scikits.learn.datasets import make_sparse_coded_signal
from sklearn.linear_model import orthogonal_mp
from sklearn.datasets import make_sparse_coded_signal

n_components, n_features = 512, 100
n_atoms = 17
@@ -29,7 +29,7 @@
import numpy as np
import pylab as pl

from scikits.learn.linear_model import Ridge
from sklearn.linear_model import Ridge

np.random.seed(0)

@@ -3,7 +3,7 @@
Plot Ridge coefficients as a function of the regularization
===========================================================

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

Shows the effect of collinearity in the coefficients or the
:class:`Ridge`. At the end of the path, as alpha tends toward zero
@@ -18,7 +18,7 @@

import numpy as np
import pylab as pl
from scikits.learn import linear_model
from sklearn import linear_model

# X is the 10x10 Hilbert matrix
X = 1. / (np.arange(1, 11) + np.arange(0, 10)[:, np.newaxis])
@@ -12,8 +12,8 @@

import numpy as np
import pylab as pl
from scikits.learn import datasets
from scikits.learn.linear_model import SGDClassifier
from sklearn import datasets
from sklearn.linear_model import SGDClassifier

# import some data to play with
iris = datasets.load_iris()
@@ -3,13 +3,13 @@
SGD: Convex Loss Functions
==========================

Plot the convex loss functions supported by `scikits.learn.linear_model.stochastic_gradient`.
Plot the convex loss functions supported by `sklearn.linear_model.stochastic_gradient`.
"""
print __doc__

import numpy as np
import pylab as pl
from scikits.learn.linear_model.sgd_fast import Hinge, \
from sklearn.linear_model.sgd_fast import Hinge, \
ModifiedHuber, SquaredLoss

###############################################################################
@@ -12,7 +12,7 @@
import numpy as np
import pylab as pl

from scikits.learn.linear_model import SGDRegressor
from sklearn.linear_model import SGDRegressor

# this is our test set, it's just a straight line with some
# gaussian noise
@@ -3,7 +3,7 @@
SGD: Penalties
==============

Plot the contours of the three penalties supported by `scikits.learn.linear_model.stochastic_gradient`.
Plot the contours of the three penalties supported by `sklearn.linear_model.stochastic_gradient`.

"""
from __future__ import division
@@ -11,7 +11,7 @@

import numpy as np
import pylab as pl
from scikits.learn.linear_model import SGDClassifier
from sklearn.linear_model import SGDClassifier

# we create 40 separable points
np.random.seed(0)
@@ -11,7 +11,7 @@

import numpy as np
import pylab as pl
from scikits.learn.linear_model import SGDClassifier
from sklearn.linear_model import SGDClassifier

# we create 40 separable points
np.random.seed(0)
@@ -10,7 +10,7 @@

import numpy as np
import pylab as pl
from scikits.learn import linear_model
from sklearn import linear_model

# we create 20 points
np.random.seed(0)
@@ -20,7 +20,7 @@
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.ticker import NullFormatter

from scikits.learn import manifold, datasets
from sklearn import manifold, datasets

n_points = 1000
X, color = datasets.samples_generator.make_s_curve(n_points)
@@ -17,8 +17,8 @@
import numpy as np
import pylab as pl
from matplotlib import offsetbox
from scikits.learn.utils.fixes import qr_economic
from scikits.learn import manifold, datasets, decomposition, lda
from sklearn.utils.fixes import qr_economic
from sklearn import manifold, datasets, decomposition, lda

digits = datasets.load_digits(n_class=6)
X = digits.data
@@ -19,7 +19,7 @@
#----------------------------------------------------------------------
# Locally linear embedding of the swiss roll

from scikits.learn import manifold, datasets
from sklearn import manifold, datasets
X, color = datasets.samples_generator.make_swiss_roll(n_samples=1500)

print "Computing LLE embedding"
@@ -28,7 +28,7 @@
import pylab as pl
import matplotlib as mpl

from scikits.learn import mixture
from sklearn import mixture

# Number of samples per component
n_samples = 500
@@ -30,9 +30,9 @@
import matplotlib as mpl
import numpy as np

from scikits.learn import datasets
from scikits.learn.cross_val import StratifiedKFold
from scikits.learn.mixture import GMM
from sklearn import datasets
from sklearn.cross_val import StratifiedKFold
from sklearn.mixture import GMM

def make_ellipses(gmm, ax):
for n, color in enumerate('rgb'):
@@ -10,7 +10,7 @@

import numpy as np
import pylab as pl
from scikits.learn import mixture
from sklearn import mixture

n_samples = 300

@@ -21,7 +21,7 @@
import pylab as pl
import matplotlib as mpl

from scikits.learn import mixture
from sklearn import mixture

# Number of samples per component
n_samples = 100
@@ -45,12 +45,12 @@
import scipy.sparse as sp
import pylab as pl

from scikits.learn.datasets import load_mlcomp
from scikits.learn.feature_extraction.text import Vectorizer
from scikits.learn.linear_model.sparse import SGDClassifier
from scikits.learn.metrics import confusion_matrix
from scikits.learn.metrics import classification_report
from scikits.learn.naive_bayes import MultinomialNB
from sklearn.datasets import load_mlcomp
from sklearn.feature_extraction.text import Vectorizer
from sklearn.linear_model.sparse import SGDClassifier
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
from sklearn.naive_bayes import MultinomialNB


if 'MLCOMP_DATASETS_HOME' not in os.environ:
@@ -18,9 +18,9 @@ class dataset, and we classify it with a Support Vector classifier, as
import pylab as pl
import numpy as np

from scikits.learn.linear_model import LogisticRegression
from scikits.learn.svm import SVC
from scikits.learn import datasets
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn import datasets

iris = datasets.load_iris()
X = iris.data[:, :2] # we only take the first two features for visualization
@@ -10,8 +10,8 @@

import random
import pylab as pl
from scikits.learn import svm, datasets
from scikits.learn.metrics import confusion_matrix
from sklearn import svm, datasets
from sklearn.metrics import confusion_matrix

# import some data to play with
iris = datasets.load_iris()
@@ -19,7 +19,7 @@
import pylab as pl

# Import datasets, classifiers and performance metrics
from scikits.learn import datasets, svm, metrics
from sklearn import datasets, svm, metrics

# The digits dataset
digits = datasets.load_digits()
@@ -27,7 +27,7 @@
# import some data to play with

# The IRIS dataset
from scikits.learn import datasets, svm
from sklearn import datasets, svm
iris = datasets.load_iris()

# Some noisy data not correlated
@@ -45,7 +45,7 @@

################################################################################
# Univariate feature selection
from scikits.learn.feature_selection import SelectFpr, f_classif
from sklearn.feature_selection import SelectFpr, f_classif
# As a scoring function, we use a F test for classification
# We use the default selection function: the 10% most significant
# features
@@ -13,8 +13,8 @@
import matplotlib as mpl
from matplotlib import colors

from scikits.learn.lda import LDA
from scikits.learn.qda import QDA
from sklearn.lda import LDA
from sklearn.qda import QDA

###############################################################################
# colormap
@@ -12,12 +12,12 @@
import pylab as pl
import matplotlib as mpl

from scikits.learn.lda import LDA
from scikits.learn.qda import QDA
from sklearn.lda import LDA
from sklearn.qda import QDA

################################################################################
# load sample dataset
from scikits.learn.datasets import load_iris
from sklearn.datasets import load_iris

iris = load_iris()
X = iris.data[:,:2] # Take only 2 dimensions
@@ -10,7 +10,7 @@

import numpy as np
import pylab as pl
from scikits.learn import neighbors, datasets
from sklearn import neighbors, datasets

# import some data to play with
iris = datasets.load_iris()
@@ -20,7 +20,7 @@
# Generate sample data
import numpy as np
import pylab as pl
from scikits.learn import neighbors
from sklearn import neighbors

np.random.seed(0)
X = np.sort(5*np.random.rand(40, 1), axis=0)
@@ -19,10 +19,10 @@
import numpy as np
import pylab as pl

from scikits.learn.svm import SVC
from scikits.learn.cross_val import StratifiedKFold, permutation_test_score
from scikits.learn import datasets
from scikits.learn.metrics import zero_one_score
from sklearn.svm import SVC
from sklearn.cross_val import StratifiedKFold, permutation_test_score
from sklearn import datasets
from sklearn.metrics import zero_one_score


##############################################################################
@@ -22,7 +22,7 @@

import numpy as np
import pylab as pl
from scikits.learn.pls import PLSCanonical, PLSRegression, CCA
from sklearn.pls import PLSCanonical, PLSRegression, CCA

################################################################################
# Dataset based latent variables model
@@ -11,9 +11,9 @@
import random
import pylab as pl
import numpy as np
from scikits.learn import svm, datasets
from scikits.learn.metrics import precision_recall_curve
from scikits.learn.metrics import auc
from sklearn import svm, datasets
from sklearn.metrics import precision_recall_curve
from sklearn.metrics import auc

# import some data to play with
iris = datasets.load_iris()
@@ -7,9 +7,9 @@
"""
print __doc__

from scikits.learn.svm import SVC
from scikits.learn import datasets
from scikits.learn.feature_selection import RFE
from sklearn.svm import SVC
from sklearn import datasets
from sklearn.feature_selection import RFE

################################################################################
# Loading the Digits dataset
@@ -9,11 +9,11 @@
print __doc__
import numpy as np

from scikits.learn.svm import SVC
from scikits.learn.cross_val import StratifiedKFold
from scikits.learn.feature_selection import RFECV
from scikits.learn.datasets import samples_generator
from scikits.learn.metrics import zero_one
from sklearn.svm import SVC
from sklearn.cross_val import StratifiedKFold
from sklearn.feature_selection import RFECV
from sklearn.datasets import samples_generator
from sklearn.metrics import zero_one

################################################################################
# Loading a dataset
@@ -10,9 +10,9 @@

import numpy as np
import pylab as pl
from scikits.learn import svm, datasets
from scikits.learn.utils import shuffle
from scikits.learn.metrics import roc_curve, auc
from sklearn import svm, datasets
from sklearn.utils import shuffle
from sklearn.metrics import roc_curve, auc

random_state = np.random.RandomState(0)

@@ -13,9 +13,9 @@
from scipy import interp
import pylab as pl

from scikits.learn import svm, datasets
from scikits.learn.metrics import roc_curve, auc
from scikits.learn.cross_val import StratifiedKFold
from sklearn import svm, datasets
from sklearn.metrics import roc_curve, auc
from sklearn.cross_val import StratifiedKFold

################################################################################
# Data IO and generation
@@ -17,7 +17,7 @@
# License: BSD Style.

import numpy as np
from scikits.learn import linear_model
from sklearn import linear_model

###############################################################################
# Generate sample data
@@ -11,7 +11,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm, datasets
from sklearn import svm, datasets

# import some data to play with
iris = datasets.load_iris()
@@ -11,7 +11,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm, datasets
from sklearn import svm, datasets

# import some data to play with
iris = datasets.load_iris()
@@ -10,7 +10,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm
from sklearn import svm

xx, yy = np.meshgrid(np.linspace(-7, 7, 500), np.linspace(-7, 7, 500))
X = 0.3 * np.random.randn(100, 2)
@@ -11,7 +11,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm
from sklearn import svm

# we create 40 separable points
np.random.seed(0)
@@ -14,7 +14,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm
from sklearn import svm

# we create 40 separable points
np.random.seed(0)
@@ -10,8 +10,8 @@

import numpy as np
import pylab as pl
from scikits.learn import svm, datasets, feature_selection, cross_val
from scikits.learn.pipeline import Pipeline
from sklearn import svm, datasets, feature_selection, cross_val
from sklearn.pipeline import Pipeline

################################################################################
# Import some data to play with
@@ -12,7 +12,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm
from sklearn import svm

xx, yy = np.meshgrid(np.linspace(-5, 5, 500), np.linspace(-5, 5, 500))
np.random.seed(0)
@@ -22,7 +22,7 @@

###############################################################################
# Fit regression model
from scikits.learn.svm import SVR
from sklearn.svm import SVR

svr_rbf = SVR(kernel='rbf', C=1e4, gamma=0.1)
svr_lin = SVR(kernel='linear', C=1e4)
@@ -10,7 +10,7 @@

import numpy as np
import pylab as pl
from scikits.learn import svm
from sklearn import svm

# we create 20 points
np.random.seed(0)
@@ -9,7 +9,7 @@
import os
import shutil

DISTNAME = 'scikits.learn'
DISTNAME = 'sklearn'
DESCRIPTION = 'A set of python modules for machine learning and data mining'
LONG_DESCRIPTION = open('README.rst').read()
MAINTAINER = 'Fabian Pedregosa'
@@ -34,6 +34,8 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('scikits.learn')
config.add_data_files('scikits/__init__.py')

config.add_subpackage('sklearn')

return config

if __name__ == "__main__":
@@ -2,7 +2,7 @@
Machine Learning module in python
=================================

scikits.learn is a Python module integrating classical machine
sklearn is a Python module integrating classical machine
learning algorithms in the tightly-knit world of scientific Python
packages (numpy, scipy, matplotlib).

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,7 +8,7 @@
from numpy.testing import assert_equal
from scipy.spatial import distance

from scikits.learn.cluster.dbscan_ import DBSCAN, dbscan
from sklearn.cluster.dbscan_ import DBSCAN, dbscan
from .common import generate_clustered_data


@@ -7,9 +7,9 @@
import numpy as np
from scipy.cluster import hierarchy

from scikits.learn.cluster import Ward, WardAgglomeration, ward_tree
from scikits.learn.cluster.hierarchical import _hc_cut
from scikits.learn.feature_extraction.image import grid_to_graph
from sklearn.cluster import Ward, WardAgglomeration, ward_tree
from sklearn.cluster.hierarchical import _hc_cut
from sklearn.feature_extraction.image import grid_to_graph


def test_structured_ward_tree():
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@
Covariance estimators
=====================

:mod:`scikits.learn.covariance` is a module to fit to estimate
:mod:`sklearn.covariance` is a module to fit to estimate
robustly the covariance of features given a set of points.
The precision matrix defined as the inverse of the covariance
is also estimated. Covariance estimation is closely related
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,7 +10,7 @@
ShrunkCovariance, shrunk_covariance, LedoitWolf, ledoit_wolf, OAS, oas

import numpy as np
from scikits.learn import datasets
from sklearn import datasets

X = datasets.load_iris().data
n_samples, n_features = X.shape
@@ -38,14 +38,14 @@ def __init__(self, n, indices=False):

Examples
========
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4]])
>>> y = np.array([1, 2])
>>> loo = cross_val.LeaveOneOut(2)
>>> len(loo)
2
>>> print loo
scikits.learn.cross_val.LeaveOneOut(n=2)
sklearn.cross_val.LeaveOneOut(n=2)
>>> for train_index, test_index in loo:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -105,14 +105,14 @@ def __init__(self, n, p, indices=False):

Examples
========
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
>>> y = np.array([1, 2, 3, 4])
>>> lpo = cross_val.LeavePOut(4, 2)
>>> len(lpo)
6
>>> print lpo
scikits.learn.cross_val.LeavePOut(n=4, p=2)
sklearn.cross_val.LeavePOut(n=4, p=2)
>>> for train_index, test_index in lpo:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -179,14 +179,14 @@ def __init__(self, n, k, indices=False):

Examples
--------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
>>> y = np.array([1, 2, 3, 4])
>>> kf = cross_val.KFold(4, k=2)
>>> len(kf)
2
>>> print kf
scikits.learn.cross_val.KFold(n=4, k=2)
sklearn.cross_val.KFold(n=4, k=2)
>>> for train_index, test_index in kf:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -264,14 +264,14 @@ def __init__(self, y, k, indices=False):

Examples
--------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4]])
>>> y = np.array([0, 0, 1, 1])
>>> skf = cross_val.StratifiedKFold(y, k=2)
>>> len(skf)
2
>>> print skf
scikits.learn.cross_val.StratifiedKFold(labels=[0 0 1 1], k=2)
sklearn.cross_val.StratifiedKFold(labels=[0 0 1 1], k=2)
>>> for train_index, test_index in skf:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -349,15 +349,15 @@ def __init__(self, labels, indices=False):

Examples
----------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
>>> y = np.array([1, 2, 1, 2])
>>> labels = np.array([1, 1, 2, 2])
>>> lol = cross_val.LeaveOneLabelOut(labels)
>>> len(lol)
2
>>> print lol
scikits.learn.cross_val.LeaveOneLabelOut(labels=[1 1 2 2])
sklearn.cross_val.LeaveOneLabelOut(labels=[1 1 2 2])
>>> for train_index, test_index in lol:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -423,15 +423,15 @@ def __init__(self, labels, p, indices=False):

Examples
----------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> X = np.array([[1, 2], [3, 4], [5, 6]])
>>> y = np.array([1, 2, 1])
>>> labels = np.array([1, 2, 3])
>>> lpl = cross_val.LeavePLabelOut(labels, p=2)
>>> len(lpl)
3
>>> print lpl
scikits.learn.cross_val.LeavePLabelOut(labels=[1 2 3], p=2)
sklearn.cross_val.LeavePLabelOut(labels=[1 2 3], p=2)
>>> for train_index, test_index in lpl:
... print "TRAIN:", train_index, "TEST:", test_index
... X_train, X_test = X[train_index], X[test_index]
@@ -536,7 +536,7 @@ def __init__(self, n, n_bootstraps=3, n_train=0.5, n_test=None,

Examples
----------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> bs = cross_val.Bootstrap(9, random_state=0)
>>> len(bs)
3
@@ -635,7 +635,7 @@ class ShuffleSplit(object):

Examples
----------
>>> from scikits.learn import cross_val
>>> from sklearn import cross_val
>>> rs = cross_val.ShuffleSplit(4, n_splits=3, test_fraction=.25,
... random_state=0)
>>> len(rs)
@@ -826,7 +826,7 @@ def permutation_test_score(estimator, X, y, score_func, cv=None,
cv : integer or crossvalidation generator, optional
If an integer is passed, it is the number of fold (default 3).
Specific crossvalidation objects can be passed, see
scikits.learn.cross_val module for the list of possible objects
sklearn.cross_val module for the list of possible objects
n_jobs: integer, optional
The number of CPUs to use to do the computation. -1 means
'all CPUs'.
File renamed without changes.
@@ -34,7 +34,7 @@

# backward compatibility
@deprecated("to be removed in 0.9;"
" use scikits.learn.datasets.load_files instead")
" use sklearn.datasets.load_files instead")
def load_filenames(*args, **kwargs):
"""Deprecated, use ``scikits.learn.datasets.load_files`` instead"""
"""Deprecated, use ``sklearn.datasets.load_files`` instead"""
return load_files(*args, **kwargs)
@@ -85,7 +85,7 @@ def load_files(container_path, description=None, categories=None,
does not try to load the files in memory.

To use utf-8 text files in a scikit-learn classification or clustering
algorithm you will first need to use the `scikits.learn.features.text`
algorithm you will first need to use the `sklearn.features.text`
module to build a feature extraction transformer that suits your
problem.

@@ -189,7 +189,7 @@ def load_iris():
Let's say you are interested in the samples 10, 25, and 50, and want to
know their class name.

>>> from scikits.learn.datasets import load_iris
>>> from sklearn.datasets import load_iris
>>> data = load_iris()
>>> data.target[[10, 25, 50]]
array([0, 0, 1])
@@ -237,7 +237,7 @@ def load_digits(n_class=10):
--------
To load the data and visualize the images::

>>> from scikits.learn.datasets import load_digits
>>> from sklearn.datasets import load_digits
>>> digits = load_digits()

>>> # import pylab as pl
@@ -323,7 +323,7 @@ def load_boston():

Examples
--------
>>> from scikits.learn.datasets import load_boston
>>> from sklearn.datasets import load_boston
>>> data = load_boston()
"""
module_path = dirname(__file__)
@@ -363,7 +363,7 @@ def load_sample_images():
--------
To load the data and visualize the images::

>>> from scikits.learn.datasets import load_sample_images
>>> from sklearn.datasets import load_sample_images
>>> dataset = load_sample_images()
>>> len(dataset.images)
2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -113,7 +113,7 @@ def _load_imgs(file_paths, slice_, color, resize):
"""Internally used to load images"""

# Try to import imread and imresize from PIL. We do this here to prevent
# the whole scikits.learn.datasets module from depending on PIL.
# the whole sklearn.datasets module from depending on PIL.
try:
try:
from scipy.misc import imread
@@ -3,7 +3,7 @@
"""Glue code to load http://mlcomp.org data as a scikit.learn dataset"""

import os
from scikits.learn.datasets.base import load_files
from sklearn.datasets.base import load_files


def _load_document_classification(dataset_path, metadata, set_=None, **kwargs):
@@ -36,7 +36,7 @@ def fetch_mldata(dataname, target_name='label', data_name='data',
2) alternatively, the first column stores target values, and the second
data values
3) the data array is stored as `n_features x n_samples` , and thus needs
to be transposed to match the `scikits.learn` standard
to be transposed to match the `sklearn` standard

Keyword arguments allow to adapt these defaults to specific data sets
(see parameters `target_name`, `data_name`, `transpose_data`, and
@@ -78,15 +78,15 @@ def fetch_mldata(dataname, target_name='label', data_name='data',
Examples
--------
Load the 'iris' dataset from mldata.org:
>>> from scikits.learn.datasets.mldata import fetch_mldata
>>> from sklearn.datasets.mldata import fetch_mldata
>>> iris = fetch_mldata('iris')
>>> print iris.target[0]
1
>>> print iris.data[0]
[-0.555556 0.25 -0.864407 -0.916667]

Load the 'leukemia' dataset from mldata.org, which respects the
scikits.learn axes convention:
sklearn axes convention:
>>> leuk = fetch_mldata('leukemia', transpose_data=False)
>>> print leuk.data.shape[0]
7129
@@ -181,7 +181,7 @@ def fetch_mldata(dataname, target_name='label', data_name='data',
del dataset[col_names[1]]
dataset['data'] = matlab_dict[col_names[1]]

# set axes to scikits.learn conventions
# set axes to sklearn conventions
if transpose_data:
dataset['data'] = dataset['data'].T
if 'target' in dataset:
File renamed without changes.
@@ -382,7 +382,7 @@ def make_blobs(n_samples=100, n_features=2, centers=3, cluster_std=1.0,

Examples
--------
>>> from scikits.learn.datasets.samples_generator import make_blobs
>>> from sklearn.datasets.samples_generator import make_blobs
>>> X, y = make_blobs(n_samples=10, centers=3, n_features=2, random_state=0)
>>> X.shape
(10, 2)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@
from nose.tools import assert_equal
from nose.plugins.skip import SkipTest

from scikits.learn import datasets
from sklearn import datasets

def test_20news():
try:
@@ -2,8 +2,8 @@
import shutil
import tempfile

from scikits.learn.datasets import get_data_home
from scikits.learn.datasets import clear_data_home
from sklearn.datasets import get_data_home
from sklearn.datasets import clear_data_home

from nose.tools import assert_false
from nose.tools import assert_true
@@ -21,9 +21,9 @@
except ImportError:
imsave = None

from scikits.learn.datasets import load_lfw_pairs
from scikits.learn.datasets import load_lfw_people
from scikits.learn.datasets import get_data_home
from sklearn.datasets import load_lfw_pairs
from sklearn.datasets import load_lfw_people
from sklearn.datasets import get_data_home

from numpy.testing import assert_array_equal
from numpy.testing import assert_equal
@@ -1,8 +1,8 @@
"""Test functionality of mldata fetching utilities."""

from scikits.learn import datasets
from scikits.learn.datasets import mldata_filename, fetch_mldata
from scikits.learn.utils.testing import (assert_in, mock_urllib2)
from sklearn import datasets
from sklearn.datasets import mldata_filename, fetch_mldata
from sklearn.utils.testing import (assert_in, mock_urllib2)
from nose.tools import assert_equal, assert_raises
from nose import with_setup
from numpy.testing import assert_array_equal
File renamed without changes.
@@ -4,7 +4,7 @@
from numpy.testing import assert_equal, assert_array_equal
from nose.tools import raises

from scikits.learn.datasets import load_svmlight_file
from sklearn.datasets import load_svmlight_file

currdir = os.path.dirname(os.path.abspath(__file__))
datafile = os.path.join(currdir, "data", "svmlight_classification.txt")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -291,7 +291,7 @@ class ProjectedGradientNMF(BaseEstimator, TransformerMixin):

>>> import numpy as np
>>> X = np.array([[1,1], [2, 1], [3, 1.2], [4, 1], [5, 0.8], [6, 1]])
>>> from scikits.learn.decomposition import ProjectedGradientNMF
>>> from sklearn.decomposition import ProjectedGradientNMF
>>> model = ProjectedGradientNMF(n_components=2, init=0)
>>> model.fit(X) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
ProjectedGradientNMF(beta=1, eta=0.1,
@@ -154,7 +154,7 @@ class PCA(BaseEstimator, TransformerMixin):
Examples
--------
>>> import numpy as np
>>> from scikits.learn.decomposition import PCA
>>> from sklearn.decomposition import PCA
>>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
>>> pca = PCA(n_components=2)
>>> pca.fit(X)
@@ -390,7 +390,7 @@ class RandomizedPCA(BaseEstimator, TransformerMixin):
Examples
--------
>>> import numpy as np
>>> from scikits.learn.decomposition import RandomizedPCA
>>> from sklearn.decomposition import RandomizedPCA
>>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
>>> pca = RandomizedPCA(n_components=2)
>>> pca.fit(X)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -58,7 +58,7 @@ def test_fit_transform():
U1 = spca_lars.transform(Y)
# Test multiple CPUs
if sys.platform == 'win32': # fake parallelism for win32
import scikits.learn.externals.joblib.parallel as joblib_par
import sklearn.externals.joblib.parallel as joblib_par
_mp = joblib_par.multiprocessing
joblib_par.multiprocessing = None
try:
@@ -140,7 +140,7 @@ def test_mini_batch_fit_transform():
U1 = spca_lars.transform(Y)
# Test multiple CPUs
if sys.platform == 'win32': # fake parallelism for win32
import scikits.learn.externals.joblib.parallel as joblib_par
import sklearn.externals.joblib.parallel as joblib_par
_mp = joblib_par.multiprocessing
joblib_par.multiprocessing = None
try:
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -59,7 +59,7 @@
inputs and outputs: Python functions. Joblib can save their
computation to disk and rerun it only if necessary::

>>> from scikits.learn.externals.joblib import Memory
>>> from sklearn.externals.joblib import Memory
>>> mem = Memory(cachedir='/tmp/joblib')
>>> import numpy as np
>>> a = np.vander(np.arange(3))
@@ -78,7 +78,7 @@
2) **Embarrassingly parallel helper:** to make is easy to write readable
parallel code and debug it quickly:

>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed
>>> from math import sqrt
>>> Parallel(n_jobs=1)(delayed(sqrt)(i**2) for i in range(10))
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -199,15 +199,15 @@ class Parallel(Logger):
A simple example:

>>> from math import sqrt
>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed
>>> Parallel(n_jobs=1)(delayed(sqrt)(i**2) for i in range(10))
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]

Reshaping the output when the function has several return
values:

>>> from math import modf
>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed
>>> r = Parallel(n_jobs=1)(delayed(modf)(i/2.) for i in range(10))
>>> res, i = zip(*r)
>>> res
@@ -218,7 +218,7 @@ class Parallel(Logger):
The progress meter::

>>> from time import sleep
>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed
>>> r = Parallel(n_jobs=2, verbose=1)(delayed(sleep)(.1) for _ in range(10)) #doctest: +SKIP
[Parallel(n_jobs=2)]: Done 1 out of 10 |elapsed: 0.1s remaining: 0.9s
[Parallel(n_jobs=2)]: Done 3 out of 10 |elapsed: 0.2s remaining: 0.5s
@@ -232,7 +232,7 @@ class Parallel(Logger):
child process::

>>> from string import atoi
>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed
>>> Parallel(n_jobs=2)(delayed(atoi)(n) for n in ('1', '300', 30)) #doctest: +SKIP
#...
---------------------------------------------------------------------------
@@ -263,7 +263,7 @@ class Parallel(Logger):
number of iterations reported is underestimated::

>>> from math import sqrt
>>> from scikits.learn.externals.joblib import Parallel, delayed
>>> from sklearn.externals.joblib import Parallel, delayed

>>> def producer():
... for i in range(6):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,15 +1,15 @@
from scikits.learn.feature_extraction.text import CharNGramAnalyzer
from scikits.learn.feature_extraction.text import WordNGramAnalyzer
from scikits.learn.feature_extraction.text import strip_accents
from scikits.learn.feature_extraction.text import to_ascii

from scikits.learn.feature_extraction.text import CountVectorizer
from scikits.learn.feature_extraction.text import TfidfTransformer
from scikits.learn.feature_extraction.text import Vectorizer

from scikits.learn.grid_search import GridSearchCV
from scikits.learn.pipeline import Pipeline
from scikits.learn.svm.sparse import LinearSVC as LinearSVC
from sklearn.feature_extraction.text import CharNGramAnalyzer
from sklearn.feature_extraction.text import WordNGramAnalyzer
from sklearn.feature_extraction.text import strip_accents
from sklearn.feature_extraction.text import to_ascii

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import Vectorizer

from sklearn.grid_search import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.svm.sparse import LinearSVC as LinearSVC

import numpy as np
from nose.tools import assert_equal, assert_equals, \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,7 +9,7 @@
import numpy as np
from numpy.testing import assert_array_equal
from scipy import stats
from scikits.learn.datasets.samples_generator import make_classification, \
from sklearn.datasets.samples_generator import make_classification, \
make_regression

##############################################################################
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -158,7 +158,7 @@ class GaussianProcess(BaseEstimator, RegressorMixin):
Example
-------
>>> import numpy as np
>>> from scikits.learn.gaussian_process import GaussianProcess
>>> from sklearn.gaussian_process import GaussianProcess
>>> X = np.atleast_2d([1., 3., 5., 6., 7., 8.]).T
>>> y = (X * np.sin(X)).ravel()
>>> gp = GaussianProcess(theta0=0.1, thetaL=.001, thetaU=1.)
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
"""
Testing for Gaussian Process module (scikits.learn.gaussian_process)
Testing for Gaussian Process module (sklearn.gaussian_process)
"""

# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
@@ -33,7 +33,7 @@ class IterGrid(object):

Examples
---------
>>> from scikits.learn.grid_search import IterGrid
>>> from sklearn.grid_search import IterGrid
>>> param_grid = {'a':[1, 2], 'b':[True, False]}
>>> list(IterGrid(param_grid)) #doctest: +NORMALIZE_WHITESPACE
[{'a': 1, 'b': True}, {'a': 1, 'b': False},
@@ -183,7 +183,7 @@ class GridSearchCV(BaseEstimator):
cv : integer or crossvalidation generator, optional
If an integer is passed, it is the number of fold (default 3).
Specific crossvalidation objects can be passed, see
scikits.learn.cross_val module for the list of possible objects
sklearn.cross_val module for the list of possible objects

refit: boolean
refit the best estimator with the entire dataset
@@ -193,7 +193,7 @@ class GridSearchCV(BaseEstimator):

Examples
--------
>>> from scikits.learn import svm, grid_search, datasets
>>> from sklearn import svm, grid_search, datasets
>>> iris = datasets.load_iris()
>>> parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
>>> svr = svm.SVR()
@@ -578,7 +578,7 @@ class GaussianHMM(_BaseHMM):

Examples
--------
>>> from scikits.learn.hmm import GaussianHMM
>>> from sklearn.hmm import GaussianHMM
>>> GaussianHMM(n_components=2)
GaussianHMM(covars_prior=0.01, covars_weight=1, cvtype='diag',
means_prior=None, means_weight=0, n_components=2,
@@ -823,7 +823,7 @@ class MultinomialHMM(_BaseHMM):

Examples
--------
>>> from scikits.learn.hmm import MultinomialHMM
>>> from sklearn.hmm import MultinomialHMM
>>> MultinomialHMM(n_components=2)
... #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
MultinomialHMM(n_components=2, startprob=array([ 0.5, 0.5]),
@@ -942,7 +942,7 @@ class GMMHMM(_BaseHMM):

Examples
--------
>>> from scikits.learn.hmm import GMMHMM
>>> from sklearn.hmm import GMMHMM
>>> GMMHMM(n_components=2, n_mix=10, cvtype='diag')
... # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
GMMHMM(cvtype='diag',
@@ -40,7 +40,7 @@ class LDA(BaseEstimator, ClassifierMixin, TransformerMixin):
Examples
--------
>>> import numpy as np
>>> from scikits.learn.lda import LDA
>>> from sklearn.lda import LDA
>>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
>>> y = np.array([1, 1, 1, 2, 2, 2])
>>> clf = LDA()
@@ -1,5 +1,5 @@
"""
:mod:`scikits.learn.linear_model` is a module to fit genelarized linear
:mod:`sklearn.linear_model` is a module to fit genelarized linear
models. It includes Ridge regression, Bayesian Regression, Lasso and
Elastic Net estimators computed with Least Angle Regression and
coordinate descent.
@@ -55,7 +55,7 @@ def _center_data(X, y, fit_intercept, normalize=False):
nearly all linear models will want their data to be centered.

WARNING : This function modifies X inplace :
Use scikits.learn.utils.as_float_array before to convert X to np.float.
Use sklearn.utils.as_float_array before to convert X to np.float.
You can specify an argument overwrite_X (default is False).
"""
if fit_intercept:
@@ -101,7 +101,7 @@ class BayesianRidge(LinearModel):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.BayesianRidge()
>>> clf.fit([[0,0], [1, 1], [2, 2]], [0, 1, 2])
BayesianRidge(alpha_1=1e-06, alpha_2=1e-06, compute_score=False,
@@ -321,7 +321,7 @@ class ARDRegression(LinearModel):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.ARDRegression()
>>> clf.fit([[0,0], [1, 1], [2, 2]], [0, 1, 2])
ARDRegression(alpha_1=1e-06, alpha_2=1e-06, compute_score=False,
File renamed without changes.
File renamed without changes.
@@ -226,7 +226,7 @@ class Lasso(ElasticNet):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.Lasso(alpha=0.1)
>>> clf.fit([[0,0], [1, 1], [2, 2]], [0, 1, 2])
Lasso(alpha=0.1, fit_intercept=True, max_iter=1000, normalize=False,
@@ -546,7 +546,7 @@ class LassoCV(LinearModelCV):
cv : integer or crossvalidation generator, optional
If an integer is passed, it is the number of fold (default 3).
Specific crossvalidation objects can be passed, see
scikits.learn.cross_val module for the list of possible objects
sklearn.cross_val module for the list of possible objects

Notes
-----
@@ -601,7 +601,7 @@ class ElasticNetCV(LinearModelCV):
cv : integer or crossvalidation generator, optional
If an integer is passed, it is the number of fold (default 3).
Specific crossvalidation objects can be passed, see
scikits.learn.cross_val module for the list of possible objects
sklearn.cross_val module for the list of possible objects


Notes
@@ -343,7 +343,7 @@ class Lars(LinearModel):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.Lars(n_nonzero_coefs=1)
>>> clf.fit([[-1, 1], [0, 0], [1, 1]], [-1.1111, 0, -1.1111]) # doctest: +ELLIPSIS
Lars(eps=..., fit_intercept=True, n_nonzero_coefs=1,
@@ -479,7 +479,7 @@ class LassoLars(Lars):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.LassoLars(alpha=0.01)
>>> clf.fit([[-1, 1], [0, 0], [1, 1]], [-1, 0, -1]) # doctest: +ELLIPSIS
LassoLars(alpha=0.01, eps=..., fit_intercept=True,
@@ -642,7 +642,7 @@ class LarsCV(LARS):
Maximum number of iterations to perform.

cv : crossvalidation generator, optional
see scikits.learn.cross_val module. If None is passed, default to
see sklearn.cross_val module. If None is passed, default to
a 5-fold strategy

n_jobs : integer, optional
@@ -775,7 +775,7 @@ class LassoLarsCV(LarsCV):
Maximum number of iterations to perform.

cv : crossvalidation generator, optional
see scikits.learn.cross_val module. If None is passed, default to
see sklearn.cross_val module. If None is passed, default to
a 5-fold strategy

n_jobs : integer, optional
@@ -890,7 +890,7 @@ class LassoLarsIC(LassoLars):

Examples
--------
>>> from scikits.learn import linear_model
>>> from sklearn import linear_model
>>> clf = linear_model.LassoLarsIC(criterion='bic')
>>> clf.fit([[-1, 1], [0, 0], [1, 1]], [-1.1111, 0, -1.1111]) # doctest: +ELLIPSIS
LassoLarsIC(criterion='bic', eps=..., fit_intercept=True,
File renamed without changes.
File renamed without changes.
@@ -155,7 +155,7 @@ class Ridge(LinearModel):

Examples
--------
>>> from scikits.learn.linear_model import Ridge
>>> from sklearn.linear_model import Ridge
>>> import numpy as np
>>> n_samples, n_features = 10, 5
>>> np.random.seed(0)
File renamed without changes.