diff --git a/doc/datasets/index.rst b/doc/datasets/index.rst index 7588fb1d1a34cc91d99e33c8559d1d5ce159674d..9e0e2758d54faa1ff120dacb4134f36c97649a8d 100644 --- a/doc/datasets/index.rst +++ b/doc/datasets/index.rst @@ -108,8 +108,8 @@ Sample generators In addition, scikit-learn includes various random sample generators that can be used to build artifical datasets of controled size and complexity. -.. image:: ../auto_examples/images/plot_random_dataset_1.png - :target: ../auto_examples/plot_random_dataset.html +.. image:: ../auto_examples/datasets/images/plot_random_dataset_1.png + :target: ../auto_examples/datasets/plot_random_dataset.html :scale: 50 :align: center diff --git a/doc/modules/pipeline.rst b/doc/modules/pipeline.rst index 5714d75d0e5f006e0619e186dc21601ee82e2237..97499e641ce23842afd7b18fc8f62646ac0b3c73 100644 --- a/doc/modules/pipeline.rst +++ b/doc/modules/pipeline.rst @@ -28,6 +28,7 @@ Usage The :class:`Pipeline` is build using a list of ``(key, value)`` pairs, where the ``key`` a string containing the name you want to give this step and ``value`` is an estimator object:: + >>> from sklearn.pipeline import Pipeline >>> from sklearn.svm import SVC >>> from sklearn.decomposition import PCA @@ -40,21 +41,25 @@ is an estimator object:: shrinking=True, tol=0.001, verbose=False))]) The estimators of the pipeline are stored as a list in the ``steps`` attribute:: + >>> clf.steps[0] ('reduce_dim', PCA(copy=True, n_components=None, whiten=False)) and as a ``dict`` in ``named_steps``:: + >>> clf.named_steps['reduce_dim'] PCA(copy=True, n_components=None, whiten=False) Parameters of the estimators in the pipeline can be accessed using the ``<estimator>__<parameter>`` syntax:: + >>> clf.set_params(svm__C=10) # NORMALIZE_WHITESPACE Pipeline(steps=[('reduce_dim', PCA(copy=True, n_components=None, whiten=False)), ('svm', SVC(C=10, cache_size=200, class_weight=None, coef0=0.0, degree=3, gamma=0.0, kernel='rbf', probability=False, shrinking=True, tol=0.001, verbose=False))]) This is particularly important for doing grid searches:: + >>> from sklearn.grid_search import GridSearchCV >>> params = dict(reduce_dim__n_components=[2, 5, 10], ... svm__C=[0.1, 10, 100]) diff --git a/doc/presentations.rst b/doc/presentations.rst index 530226f59be50ef9a3ceb2e770fbb1cbfe6f8e89..b593288a1b7acb495818c9a5a7008aafa7628be1 100644 --- a/doc/presentations.rst +++ b/doc/presentations.rst @@ -13,12 +13,14 @@ Videos - `Introduction to scikit-learn <http://videolectures.net/icml2010_varaquaux_scik/>`_ by `Gael Varoquaux`_ at ICML 2010 + A three minute video from a very early stage of the scikit, explaining the basic idea and approach we are following. - `Introduction to statistical learning with scikit learn <http://archive.org/search.php?query=scikit-learn>`_ by `Gael Varoquaux`_ at SciPy 2011 + An extensive tutorial, consisting of four sessions of one hour. The tutorial covers basics of machine learning, many algorithms and how to apply them using scikit-learn. The @@ -36,10 +38,12 @@ Videos - `Introduction to Interactive Predictive Analytics in Python with scikit-learn <http://www.youtube.com/watch?v=Zd5dfooZWG4>`_ by `Olivier Grisel`_ at PyCon 2012 + 3-hours long introduction to prediction tasks using the scikit-learn. - `scikit-learn - Machine Learning in Python <http://marakana.com/s/scikit-learn_machine_learning_in_python,1152/index.html>`_ by `Jake Vanderplas`_ at the 2012 PyData workshop at Google + Interactive demonstration of some scikit-learn features. 75 minutes. .. _Gael Varoquaux: http://gael-varoquaux.info diff --git a/doc/tutorial/basic/tutorial.rst b/doc/tutorial/basic/tutorial.rst index ba5d294d5fc415ed738f46705aa8be0243e759f3..699df18ec4fa676989a19f218bfe7e1375684b4a 100644 --- a/doc/tutorial/basic/tutorial.rst +++ b/doc/tutorial/basic/tutorial.rst @@ -179,8 +179,8 @@ which we have not used to train the classifier:: The corresponding image is the following: -.. image:: ../../auto_examples/images/datasets/plot_digits_last_image_1.png - :target: ../../auto_examples/plot_digits_last_image.html +.. image:: ../../auto_examples/datasets/images/plot_digits_last_image_1.png + :target: ../../auto_examples/datasets/plot_digits_last_image.html :align: center :scale: 50 diff --git a/doc/tutorial/statistical_inference/settings.rst b/doc/tutorial/statistical_inference/settings.rst index 6fce0dd462eca221d0fc19cfa8a36ae6fbb58aed..63cca4f010dda22ae6619037f5b50e914fda16da 100644 --- a/doc/tutorial/statistical_inference/settings.rst +++ b/doc/tutorial/statistical_inference/settings.rst @@ -31,8 +31,8 @@ needs to be preprocessed to be used by the scikit. .. topic:: An example of reshaping data: the digits dataset - .. image:: ../../auto_examples/images/datasets/plot_digits_last_image_1.png - :target: ../../auto_examples/plot_digits_last_image.html + .. image:: ../../auto_examples/datasets/images/plot_digits_last_image_1.png + :target: ../../auto_examples/datasets/plot_digits_last_image.html :align: right :scale: 60 diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index 37ca2793b1b05e0e66cb1d595140b5fd69f88faa..0a65b2627877a66dfbde89ae6711dc42eb52086c 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -39,8 +39,8 @@ Nearest neighbor and the curse of dimensionality .. topic:: Classifying irises: - .. image:: ../../auto_examples/images/datasets/plot_iris_dataset_1.png - :target: ../../auto_examples/plot_iris_dataset.html + .. image:: ../../auto_examples/datasets/images/plot_iris_dataset_1.png + :target: ../../auto_examples/datasets/plot_iris_dataset.html :align: right :scale: 65 @@ -546,8 +546,8 @@ creating an decision energy by positioning *kernels* on observations: `svm_gui.py`; add data points of both classes with right and left button, fit the model and change parameters and data. -.. image:: ../../auto_examples/images/datasets/plot_iris_dataset_1.png - :target: ../../auto_examples/plot_iris_dataset.html +.. image:: ../../auto_examples/datasets/images/plot_iris_dataset_1.png + :target: ../../auto_examples/datasets/plot_iris_dataset.html :align: right :scale: 70