Package: mempamal
.. -*- mode: rst -*-MEmPaMaL========Means for EMbarrassingly PArallel MAchine Learning.*Même pas mal!* is a french exclamation standing for *Did not hurt!*.So, if your computer cannot manage your machine learning load, justrespond MEmPaMaL and give it a try.MEmPaMaL is a Python module for some machine learning workflows built on top ofScikit-learn and distributed under the 3-Clause BSD license.Purpose-------MEmPaMaL is a set of python helpers to produce and run someembarrassingly parallel machine learning workflows. The goal ofMEmPaMaL is to produce a list of commands and dependencies. We statethat today, commands and files are a very portable and effectiveapproach for quick and dirty data exploration or new algorithmsdevelopment. *If your workflow runs on your personal computer but takestoo many times, MEmPaMal can help you to scale out!*For the machine learning description it relies on the Scikit-learn [1]design (pipelines, estimators with fit/predict, transformers withfit/transform, etc.) and can accept estimators that respect theScikit-learn conventions. One possible back-end to execute the list ofcommands and dependencies is Soma-Workflow [2]. This approach wassuccessfully applied to personal multicore computers, clusters (withmore than 2,000 cores) and cloud. To see more on the origins andmotivations of this project, you can read [3].So, what is this set of machine learning workflows and the restrictions?Restrictions------------- **Suited for supervised learning**. For a given set of samples wemeasure features, an array denoted X of shape (n_samples,n_features), and targets, an array y of shape (n_samples,n_targets). The goal is to construct a predictive model and tomeasure its goodness of fit on unseen data (see examples for moreinsight).- **Did you say Big Data?** MEmPaMaL don't care about this marketingterm, it just some scripts to help you distribute your computationas seamlessly as possible. If your code and computing infrastructureis able to perform *Big Data* analysis with simple files andcommands, it should work but it is NOT the purpose of MEmPaMaL.- **Need your knowledge**. You need do understand what you do. Forinstance, most of the times multi-targets are inappropriate for agiven estimator. Knowing about your data is probably more importantthan being able to compute many models.- **It's not magic!** You need the computing resources correspondingto your load then MEmPaMaL can help you to scale out.- **It's really not magic!** If your algorithm is not efficient orconsume too many memory, MEmPaMaL will just help you to run it manytimes in parallel. So, be careful of the snowball effect and if notsure, try it at small scale first.- **It's definitely not magic!** Some codes are already parallel(multiprocessing, OpenMP, etc.) and you need to understand theimplications and make choices. For instance, you can limit OpenMP toone thread: ``export OMP_NUM_THREADS=1``. In some cases, you wouldlike to play with the limits of your system and for that you mustdeeply understand the underlying technologies and the possibilitiesof the execution back-end.Examples--------A simple example:http://nbviewer.ipython.org/github/BenoitDamota/mempamal/blob/master/mempamal/examples/MEmPaMaL_first_example.ipynbAn example with model selection:http://nbviewer.ipython.org/github/BenoitDamota/mempamal/blob/master/mempamal/examples/MEmPaMaL_second_example.ipynbAn example with ParsimonY (another Python machine learing library):http://nbviewer.ipython.org/github/BenoitDamota/mempamal/blob/master/mempamal/examples/MEmPaMaL_third_example.ipynbAn example with nested parallelism:http://nbviewer.ipython.org/github/BenoitDamota/mempamal/blob/master/mempamal/examples/MEmPaMaL_fourth_example.ipynbReferences----------[1] Scikit-learn: Machine Learning in Python, Pedregosa et al., JMLR12, pp. 2825-2830, 2011. (http://scikit-learn.org)[2] Soma-workflow: a unified and simple interface to parallelcomputing resources, S. Laguitton et al., in MICCAI Workshop on HighPerformance and Distributed Computing for Medical Imaging,2011. (http://neurospin.github.io/soma-workflow/)[3] Machine learning patterns for neuroimaging-genetic studies in the cloud,B. Da Mota et al., in Frontiers in neuroinformatics, 2014.