<commit_before>.. _index:

Welcome
=======

Pylearn2 is still undergoing rapid development. Don't expect a clean road without bumps!
If you find a bug please write to <EMAIL>.
If you're a Pylearn2 developer and you find a bug, please write a unit test for it so
the bug doesn't come back!


Pylearn2 is a machine learning library. Most of its functionality is built on top of
`Theano <http://deeplearning.net/software/theano/>`_. 
This means you can write Pylearn2 plugins (new models, algorithms, etc) using
mathematical expressions, and theano will optimize and stabilize those expressions for
you, and compile them to a backend of your choice (CPU or GPU).

Pylearn2 Vision
===============

* Researchers add features as they need them. We avoid getting bogged down by too
  much top-down planning in advance.
* A machine learning toolbox for easy scientific experimentation.
* All models/algorithms published by the LISA lab should have reference implementations
  in Pylearn2.
* Pylearn2 may wrap other libraries such as scikit-learn when this is practical
* Pylearn2 differs from scikit-learn in that Pylearn2 aims to provide great flexibility
  and make it possible for a researcher to do almost anything, while scikit-learn
  aims to work as a "black box" that can produce good results even if the user does not
  understand the implementation
* Dataset interface for vector, images, video, ...
* Small framework for all what is needed for one normal MLP/RBM/SDA/Convolution experiments.
* Easy reuse of sub-component of Pylearn2.
* Using one sub-component of the library does not force you to use / learn to use all of
  the other sub-components if you choose not to.
* Support cross-platform serialization of learned models.
* Remain approachable enough to be used in the classroom (IFT6266 at the University of Montreal).

Download and installation
=========================

No PyPI download yet. You must checkout the version in github for bleeding-edge/development
version, available via:

.. code-block:: bash

   git clone git://github.com/lisa-lab/pylearn2.git

You also need to set your PYLEARN2_DATA_PATH variable. On linux, the best way to do this
is to add a line to your .bashrc file:

.. code-block:: bash

    export PYLEARN2_DATA_PATH=/data/lisa/data

Note that this is only an example, and if you are not in the LISA lab, you will need to
choose a directory path that is valid on your filesystem. Simply choose a path where
it will be convenient for you to store datasets for use with Pylearn2.

Other methods
-------------

Vagrant (any OS)
~~~~~~~~~~~~~~~~

`Pylearn2 in a box <https://github.com/ironchief/pylearn2_vagrant>`_ uses Vagrant to easily create a new VM installed with Pylearn2 and the necessary packages.

1. Download and install Vagrant http://www.vagrantup.com/
2. Download and install Virtual Box and VirtualBox Extension Pack https://www.virtualbox.org/wiki/Downloads
3. Download the Vagrant scripts from `Pylearn2 in a box <https://github.com/ironchief/pylearn2_vagrant>`_
4. Start the VM by running ``vagrant up`` in the directory from step 3

Dependencies
============

* `Theano <http://deeplearning.net/software/theano/>`_ and its dependencies are required to use
  Pylearn2. Since pylearn2 is under rapid development some of its features might depend on the `bleeding-edge version of Theano <http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions>`_.<commit_msg>Added documentation for PYTHONPATH environment variable.<commit_after>.. _index:

Welcome
=======

Pylearn2 is still undergoing rapid development. Don't expect a clean road without bumps!
If you find a bug please write to <EMAIL>.
If you're a Pylearn2 developer and you find a bug, please write a unit test for it so
the bug doesn't come back!


Pylearn2 is a machine learning library. Most of its functionality is built on top of
`Theano <http://deeplearning.net/software/theano/>`_. 
This means you can write Pylearn2 plugins (new models, algorithms, etc) using
mathematical expressions, and theano will optimize and stabilize those expressions for
you, and compile them to a backend of your choice (CPU or GPU).

Pylearn2 Vision
===============

* Researchers add features as they need them. We avoid getting bogged down by too
  much top-down planning in advance.
* A machine learning toolbox for easy scientific experimentation.
* All models/algorithms published by the LISA lab should have reference implementations
  in Pylearn2.
* Pylearn2 may wrap other libraries such as scikit-learn when this is practical
* Pylearn2 differs from scikit-learn in that Pylearn2 aims to provide great flexibility
  and make it possible for a researcher to do almost anything, while scikit-learn
  aims to work as a "black box" that can produce good results even if the user does not
  understand the implementation
* Dataset interface for vector, images, video, ...
* Small framework for all what is needed for one normal MLP/RBM/SDA/Convolution experiments.
* Easy reuse of sub-component of Pylearn2.
* Using one sub-component of the library does not force you to use / learn to use all of
  the other sub-components if you choose not to.
* Support cross-platform serialization of learned models.
* Remain approachable enough to be used in the classroom (IFT6266 at the University of Montreal).

Download and installation
=========================

No PyPI download yet. You must checkout the version in github for bleeding-edge/development
version, available via:

.. code-block:: bash

   git clone git://github.com/lisa-lab/pylearn2.git

You also need to set your PYLEARN2_DATA_PATH variable. On linux, the best way to do this
is to add a line to your .bashrc file:

.. code-block:: bash

    export PYLEARN2_DATA_PATH=/data/lisa/data

Note that this is only an example, and if you are not in the LISA lab, you will need to
choose a directory path that is valid on your filesystem. Simply choose a path where
it will be convenient for you to store datasets for use with Pylearn2.

Once done, you have to append the installation path to the PYTHONPATH variable in
order to allow importing the library from Python. On linux, you can add a line
to the .bashrc file:

.. code-block:: bash

    export PYTHONPATH=$PYTHONPATH:/path/to/installation/directory

Other methods
-------------

Vagrant (any OS)
~~~~~~~~~~~~~~~~

`Pylearn2 in a box <https://github.com/ironchief/pylearn2_vagrant>`_ uses Vagrant to easily create a new VM installed with Pylearn2 and the necessary packages.

1. Download and install Vagrant http://www.vagrantup.com/
2. Download and install Virtual Box and VirtualBox Extension Pack https://www.virtualbox.org/wiki/Downloads
3. Download the Vagrant scripts from `Pylearn2 in a box <https://github.com/ironchief/pylearn2_vagrant>`_
4. Start the VM by running ``vagrant up`` in the directory from step 3

Dependencies
============

* `Theano <http://deeplearning.net/software/theano/>`_ and its dependencies are required to use
  Pylearn2. Since pylearn2 is under rapid development some of its features might depend on the `bleeding-edge version of Theano <http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions>`_.
{'fraction_non_alphanumeric': 0.08019980574441515, 'fraction_numerical': 0.008325239350631331, 'mean_word_length': 4.288334556126192, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '291845', 'n_tokens_mistral': 2037, 'n_tokens_neox': 1932, 'n_words': 979}