{ "info": { "author": "Laurent El Shafey", "author_email": "laurent.el-shafey@idiap.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": "=================================================\n Example of an Article with Reproducible Results\n=================================================\n\nThis package demonstrates how to provide scripts and source code relying on Bob\nfor reproducible machine learning experiments. In particular, this document\nexplains how to produce the Receiver Operating Characteristic (ROC) of our paper.\n\nIf you use this package and/or its results, please cite the following\npublications:\n\n1. The original paper attached with this satellite package::\n\n @article{Bob_2013,\n author = {L. El~Shafey AND A. Anjos AND M. G\\\"unther AND E. Khoury AND I. Chingovska AND F. Moulin AND S. Marcel},\n title = {Bob: A Free Library for Reproducible Machine Learning},\n year = {2013},\n }\n\n2. To use the MNIST database, you should also mention the following paper,\n where it is introduced::\n\n @article{LeCun_1998,\n author = {Y. LeCun AND L. Bottou AND Y. Bengio AND P. Haffner},\n title = {Gradient-Based Learning Applied to Document Recognition},\n journal = {Proceedings of the IEEE},\n month = {November},\n volume = {86},\n number = {11},\n pages = {2278-2324},\n year = {1998}\n }\n\n\nThis package is built upon two other satellite packages:\n\n1. `xbob.db.mnist `_ which contains easy accessors\n to the MNIST database\n\n2. `xbob.mlp.lbfgs `_ which shows how to extend\n Bob with an additional learning algorithm.\n\nThis decomposition in three pieces is performed for clarity and reusability. Data access,\nlearning algorithm implementation and scripts for generating the plots and evaluating the\nperformances are, hence, well separated. In addition, anyone could reuse any of these\nsatellite packages easily for his own work.\n\n\nRaw data\n--------\n\nThe data used in the paper is publicly available and can be downloaded and\ninstalled prior to using the scripts provided in this package. Visit\n`THE MNIST DATABASE of handwritten digits website `_,\ndownload the four provided .gz files and save them in a directory of your choice, without\nextracting the archives. If the path to the downloaded data is not supplied when\nrunning the any of the scripts, this database will be downloaded on the fly in a\ntemporary directory at **each** script call.\n\nInstallation\n------------\n\nFirst, you have to install `Bob `_ following the instructions\n`there `_.\nAfterward, you need a copy of this package.\n\n.. note::\n\n If you are reading this page through our GitHub portal and not through PyPI,\n note **the development tip of the package may not be stable** or become\n unstable in a matter of moments.\n\n Go to `http://pypi.python.org/pypi/xbob.paper.example\n `_ to download the latest\n stable version of this package.\n\nThere are 2 options you can follow to get this package installed and\noperational on your computer: you can use automatic installers like `pip\n`_ (or `easy_install\n`_) or manually download, unpack and\nuse `zc.buildout `_ to create a\nvirtual work environment just for this package. In both cases, the two\ndependences listed above will be automatically downloaded and installed.\n\nUsing an automatic installer\n============================\n\nUsing ``pip`` is the easiest (shell commands are marked with a ``$`` signal)::\n\n $ pip install xbob.paper.example\n\nYou can also do the same with ``easy_install``::\n\n $ easy_install xbob.paper.example\n\nThis will download and install this package plus any other required\ndependencies. It will also verify if the version of Bob you have installed\nis compatible.\n\nThis scheme works well with virtual environments by `virtualenv\n`_ or if you have root access to your\nmachine. Otherwise, we recommend you use the next option.\n\nUsing ``zc.buildout``\n=====================\n\nDownload the latest version of this package from `PyPI\n`_ and unpack it in your\nworking area. The installation of the toolkit itself uses `buildout\n`_. You don't need to understand its inner workings\nto use this package. Here is a recipe to get you started::\n\n $ python bootstrap.py\n $ ./bin/buildout\n\nThese 2 commands should download and install all non-installed dependencies and\nget you a fully operational test and development environment.\n\n.. note::\n\n The python shell used in the first line of the previous command set\n determines the python interpreter that will be used for all scripts developed\n inside this package. Because this package makes use of `Bob`_, you must make\n sure that the ``bootstrap.py`` script is called with the **same** interpreter\n used to build Bob, or unexpected problems might occur.\n\n If Bob is installed by the administrator of your system, it is safe to\n consider it uses the default python interpreter. In this case, the above 2\n command lines should work as expected. If you have Bob installed somewhere\n else on a private directory, edit the file ``buildout.cfg`` **before**\n running ``./bin/buildout``. Find the section named ``buildout`` and edit or\n add the line ``prefixes`` to point to the directory where Bob is installed or\n built. For example::\n\n [buildout]\n ...\n prefixes=/Users/crazyfox/work/bob/build\n\n\nUser Guide\n----------\n\nIt is assumed you have followed the installation instructions for the package\nand got this package installed and optionally the MNIST database downloaded and\nuncompressed in a directory. You should have all required utilities sitting\ninside a binary directory depending on your installation strategy (utilities\nwill be inside the ``bin`` directory if you used the buildout option).\n\n\nPaper Layout: How to Reproduce our Results\n==========================================\n\nThe paper demonstrates how to use and extend the Bob toolkit by considering two\nlearning algorithms applied to multilayer perceptrons (MLP). The first one is the\nR-prop algorithm, which is already integrated into Bob. The second one relies on\nthe L-BFGS optimization procedure, and is integrated in a separate satellite\npackage to demonstrate how the Bob library might be extended. Furthermore, this\nsatellite package aims at only providing that plug these bricks together to\nevaluate algorithms on a specific dataset (MNIST), and to generate plots.\nThe two learning algorithms mentionned above will be applied to two different multilayer\nperceptron architectures. The first one has no hidden layer (linear classifier), whereas\nthe second one has a hidden layer of 50 nodes.\n\nReferences:\n\nAlgorithm 1 - R-prop::\n\n @inproceedings{Riedmiller_1993,\n author = {M. Riedmiller AND H. Braun},\n title = {{Direct Adaptive Method for Faster Backpropagation Learning: The {RPROP} Algorithm}},\n pages = {586--591},\n volume = {Proceedings of the IEEE International Conference on Neural Networks},\n year = {1993}\n }\n\nAlgorithm 2 - L-BFGS::\n\n @article{Byrd_1994,\n author = {R. H. Byrd AND J. Nocedal AND R. B. Schnabel},\n title = {Representations of quasi-{N}ewton matrices and their use in limited memory methods},\n issn={0025-5610},\n journal = {Mathematical Programming},\n volume = {63},\n number = {1-3},\n doi = {10.1007/BF01582063},\n publisher = {Springer-Verlag},\n pages = {129-156},\n year = {1994},\n }\n\nTraining the four multilayer perceptrons\n========================================\n\nTwo scripts are provided to learn multilayer perceptrons. One makes use of the\nR-prop algorithm, whereas the other one relies on the L-BFGS optimization\ntechnique.\n\nIn the paper, the ROC was generated by applying these two learning algorithms\nto two different multilayer perceptron architectures as described above.\n\nTo run the training process, use the following command::\n\n $ ./bin/rprop_training.py -d /root/of/database -H 0 -m rprop_H00.hdf5\n\nThis will train a multilayer perceptron with 0 hidden nodes (linear classifier),\nusing 50 iterations of R-Prop, save the resulting multilayer perceptron into\nan HDF5 file and finally compute the classification error rate on the test\nset of MNIST.\n\nSince the MNIST database used for this example is pretty small, you could also\nrun this script without specifying the path to the database, which will in this\ncase be automatically downloaded in a temporary directory before calling the\nlearning procedure.\n\n\nNext, you could learn the other three multilayer perceptrons in a completely\nsimilar way, as follows::\n\n $ ./bin/rprop_training.py -d /root/of/database -H 50 -m rprop_H50.hdf5\n $ ./bin/lbfgs_training.py -d /root/of/database -H 0 -m lbfgs_H00.hdf5\n $ ./bin/lbfgs_training.py -d /root/of/database -H 50 -m lbfgs_H50.hdf5\n\nOn a recent workstation (Intel core i7), each (single-thread) script should\ncomplete in less than an hour. If you have a multi-core CPU, you could of\ncourse run the scripts in parallel.\n\n\nPlotting the ROC for the four systems\n=====================================\n\nOnce you have learned the multilayer perceptrons, you can easily plot the ROC\nusing the following command::\n\n $ ./bin/plot.py -d /root/of/database -m rprop_H00.hdf5 rprop_H50.hdf5 lbfgs_H00.hdf5 lbfgs_H50.hdf5 \\\n -l '1-layer MLP (R-prop)' '2-layer MLP (R-prop)' '1-layer MLP (L-BFGS)' '2-layer MLP (L-BFGS)' -o roc.pdf\n\nThis will compute the scores on the test set of the MNIST database for each\nmultilayer perceptron, and plot the performances on a ROC, which is saved as a\npdf file.\n\n\nEvaluating to get the classification error rate\n===============================================\n\nIf you have a trained multilayer perceptron, you can easily compute\nthe classification error rate (CER) using the following command::\n\n $ ./bin/evaluate.py -d /root/of/database -m MLP_TO_EVALUATE.hdf5\n\nThis will return the CER on the test set of the MNIST database.\n\n\nGetting further\n---------------\n\nIf you are interested into packaging your own work into your own satellite\npackage, you could reuse the layout of this package. You can also find more\ndetailed information in this\n`tutorial `_.\n\nLearning by looking at `other examples `_\nis also a good practice.\n\nIn case of problem or question, just ask for help to the Bob's **community**\nthrough the `mailing list `_\nor the `issue tracker `_.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bioidiap/xbob.paper.example", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "xbob.paper.example", "package_url": "https://pypi.org/project/xbob.paper.example/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/xbob.paper.example/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/bioidiap/xbob.paper.example" }, "release_url": "https://pypi.org/project/xbob.paper.example/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Example of an article using Bob for reproducible experiments", "version": "0.2.0" }, "last_serial": 996981, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "0010fe3df5e4f9756816bb23a381f096", "sha256": "714db16f3650fd9cbe09216ac12f140d5edd91fbab0e303947e786bc78c3e2dd" }, "downloads": -1, "filename": "xbob.paper.example-0.2.0.zip", "has_sig": false, "md5_digest": "0010fe3df5e4f9756816bb23a381f096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62570, "upload_time": "2014-02-11T10:52:43", "url": "https://files.pythonhosted.org/packages/ef/e3/d0201c7439243f03c1df161c102cdde4138eeb7dda9557859239de0715be/xbob.paper.example-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0010fe3df5e4f9756816bb23a381f096", "sha256": "714db16f3650fd9cbe09216ac12f140d5edd91fbab0e303947e786bc78c3e2dd" }, "downloads": -1, "filename": "xbob.paper.example-0.2.0.zip", "has_sig": false, "md5_digest": "0010fe3df5e4f9756816bb23a381f096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62570, "upload_time": "2014-02-11T10:52:43", "url": "https://files.pythonhosted.org/packages/ef/e3/d0201c7439243f03c1df161c102cdde4138eeb7dda9557859239de0715be/xbob.paper.example-0.2.0.zip" } ] }