diff --git a/doc/conf.py b/doc/conf.py index 1843fec806413941b33dc3dafaae2f97ad79e983..4e06cf1713beb07794e2dfdf6cf867ea7d6ec132 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -53,7 +53,7 @@ master_doc = 'index' # General information about the project. project = u'scikits.learn' -copyright = u'2010, scikits.learn developers' +copyright = u'2010, scikits.learn developers (BSD Lincense)' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/doc/index.rst b/doc/index.rst index ae7bce27e65673d49e0de78a73dd994496347951..a4bc49fd6180b33eb5f4074cd133e68ee593fdc2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -13,9 +13,9 @@ :height: 150 :target: auto_examples/cluster/plot_affinity_propagation.html - .. |banner2| image:: auto_examples/linear_model/images/plot_lasso_lars.png + .. |banner2| image:: auto_examples/gaussian_process/images/plot_gp_regression.png :height: 150 - :target: auto_examples/linear_model/plot_lasso_lars.html + :target: auto_examples/gaussian_process/plot_gp_regression.html .. |banner3| image:: auto_examples/svm/images/plot_oneclass.png :height: 150 @@ -64,51 +64,12 @@ :License: Open source, commercially usable: **BSD license** (3 clause) -.. only:: html - - .. raw:: html - - <div class="example_digits"> - - :ref:`A simple Example: recognizing hand-written digits <example_plot_digits_classification.py>` :: - - import pylab as pl - - from scikits.learn import datasets, svm - digits = datasets.load_digits() - for index, (image, label) in enumerate(zip(digits.images, digits.target)[:4]): - pl.subplot(2, 4, index+1) - pl.imshow(image, cmap=pl.cm.gray_r) - pl.title('Training: %i' % label) - - n_samples = len(digits.images) - data = digits.images.reshape((n_samples, -1)) - - classifier = svm.SVC() - classifier.fit(data[:n_samples/2], digits.target[:n_samples/2]) - - for index, image in enumerate(digits.images[n_samples/2:n_samples/2+4]): - pl.subplot(2, 4, index+5) - pl.imshow(image, cmap=pl.cm.gray_r) - pl.title('Prediction: %i' % classifier.predict(image.ravel())) - - .. image:: images/plot_digits_classification.png - :height: 140 - :target: auto_examples/plot_digits_classification.html - - .. raw:: html - - </div> - - -.. warning:: - - This documentation is for the development version, - documentation for the stable version can be found `here - <http://scikit-learn.sourceforge.net/0.5/>`__ .. include:: big_toc_css.rst +.. note:: This document describes scikits.learn |release|. For other + versions and printable format, see :ref:`documentation_resources`. + User Guide ========== diff --git a/doc/install.rst b/doc/install.rst index 6aa06ace986c532f1458e81b620c27f22be366c1..be89c862758093cc518010db88ebd5411bf407a1 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -27,8 +27,18 @@ Installing an official release ============================== +Installing from source +---------------------- + +Installing from source requires you to have installed numpy, +setuptools, python development headers and a working C++ +compiler. Under debian-like systems you can get all this by executing +with root privileges:: + + sudo apt-get install python-dev python-numpy python-setuptools python-scipy libatlas-dev g++ + Easy install ------------- +~~~~~~~~~~~~ This is usually the fastest way to install the latest stable release. If you have pip or easy_install, you can install or update @@ -40,28 +50,13 @@ or:: easy_install -U scikits.learn -for easy_install. +for easy_install. Note that you might need root privileges to run +these commands. -Windows installer ------------------ - -You can download a windows installer from `downloads -<https://sourceforge.net/projects/scikit-learn/files/>`_ in the -project's web page. Note that must also have installed the packages -numpy and setuptools. +From source package +~~~~~~~~~~~~~~~~~~~ -.. warning:: - - As of python(x,y) 2.6.5.3, python(x,y) users should use `this - package <http://sourceforge.net/projects/scikit-learn/files/scikits.learn-0.5-numpy-1.3.win32-py2.6.exe/download>`_ - instead, the reason being that python(x, y) ships an old version of - numpy. This problem will dissapear when they upgrade to numpy 1.4 - or newer. - - -From Source ------------ Download the package from http://sourceforge.net/projects/scikit-learn/files , unpack the sources and cd into archive. @@ -71,6 +66,17 @@ python modules. The install command is:: python setup.py install +Windows installer +----------------- + +You can download a windows installer from `downloads +<https://sourceforge.net/projects/scikit-learn/files/>`_ in the +project's web page. Note that must also have installed the packages +numpy and setuptools. + +This package is also expected to work with python(x,y) as of 2.6.5.5. + + .. _install_by_distribution: Third party distributions of scikits.learn @@ -118,3 +124,34 @@ Bleeding Edge ============= See section :ref:`git_repo` on how to get the development version. + + +.. _testing: + +Testing +======= + +Testing requires having the `nose +<http://somethingaboutorange.com/mrl/projects/nose/>`_ library. After +installation, the package can be tested by executing from outside the +source directory:: + + python -c "import scikits.learn as skl; skl.test()" + + +It can also be tested without having the package installed. For this +you must compile the sources inplace from the source directory:: + + python setup.py build_ext --inplace + +Test can now be run using nosetest:: + + nosetests scikits/learn/ + +If you are running the deveopment version, this is automated in the +commands `make in` and `make test`. + +.. warning:: + + Because nosetest does not play well with multiprocessing on + windows, this last approach is not recommended on such system. diff --git a/doc/sphinxext/gen_rst.py b/doc/sphinxext/gen_rst.py index 038b8cfeb620f03a099ec90d38167e1f72900318..ee716620f4a1683a28be89b335aadfa9d299103f 100644 --- a/doc/sphinxext/gen_rst.py +++ b/doc/sphinxext/gen_rst.py @@ -92,6 +92,7 @@ def generate_example_rst(app): # we create an index.rst with all examples fhindex = file(os.path.join(root_dir, 'index.rst'), 'w') fhindex.write("""\ + Examples ======== diff --git a/doc/support.rst b/doc/support.rst index d05ec89ab1fc4434ac619e44645248f26a356442..38ef3cb2d7a18b6cf9eaf610f80c78f8592801ee 100644 --- a/doc/support.rst +++ b/doc/support.rst @@ -14,7 +14,7 @@ Bug tracker If you think you've encoutered a bug, please report it to the issue tracker: -http://sourceforge.net/apps/trac/scikit-learn/report/1 +https://github.com/scikit-learn/scikit-learn/issues IRC === @@ -22,3 +22,20 @@ Some devs like to hang out on channel #learn on irc.freenode.net If you do not have an irc client or are behind a firewall this web client works fine: http://webchat.freenode.net + + +.. _documentation_resources: + +Documentation resources +======================= + +This documentation is relative to |release|. Documentation for other +versions can be found here: + + * `Development version <http://scikit-learn.sf.net/dev/>`_ + * `0.6 <http://scikit-learn.sf.net/0.6/>`_ + * `0.5 <http://scikit-learn.sf.net/0.5/>`_ + + +Printable pdf version for all versions can be found `here +<http://sourceforge.net/projects/scikit-learn/files/documentation/>`_ diff --git a/doc/themes/scikit-learn/layout.html b/doc/themes/scikit-learn/layout.html index 21082a3f7090ae60abc5f9abbe8f3cfdd0a5d5cc..edffc225c9e3b5c2a7de34a5dd6c2e5cdc758ad7 100644 --- a/doc/themes/scikit-learn/layout.html +++ b/doc/themes/scikit-learn/layout.html @@ -137,18 +137,21 @@ {%- block footer %} <div class="footer"> + <p style="text-align: center">This documentation is relative + to {{project}} version {{ release|e }}<p> + {%- if show_copyright %} {%- if hasdoc('copyright') %} - {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} + {% trans path=pathto('copyright'), copyright=copyright|e %}© {{ copyright }}.{% endtrans %} {%- else %} - {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {% trans copyright=copyright|e %}© {{ copyright }}.{% endtrans %} {%- endif %} {%- endif %} {%- if last_updated %} {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} {%- endif %} {%- if show_sphinx %} - {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}{% endtrans %} after a design by <a href="http://webylimonada.com">Web y Limonada</a>. + {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}{% endtrans %}. Design by <a href="http://webylimonada.com">Web y Limonada</a>. {%- endif %} </div> {%- endblock %}