Diferencia entre revisiones de «Tutorial Python Alex 19-10-12»
De Grupo de Inteligencia Computacional (GIC)
(No se muestran 45 ediciones intermedias de 2 usuarios) | |||
Línea 3: | Línea 3: | ||
= Python Tutorial = | = Python Tutorial = | ||
Author: Alex, October 19th, 2012 | |||
* '''Install the software''' | |||
sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python- | Base OS: [http://www.ubuntu.com/ Ubuntu 12.04.1] | ||
</font> | |||
For Ubuntu repository versions: | |||
sudo pip install -U scikit-image scikit-learn statsmodels | <font face="monospace"> | ||
</font></ | sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python-matplotlib git python-pip python-nibabel cython python-statsmodels python-sklearn python-skimage | ||
</font> | |||
For updated versions we can use [http://pypi.python.org/pypi Python Package Index (PyPI)]: | |||
<font face="monospace"> | |||
sudo apt-get install python-pip python-dev build-essential | |||
sudo pip install -U pip | |||
sudo pip install -U ipython | |||
sudo pip install -U cython | |||
sudo pip install -U numpy | |||
sudo apt-get install build-essential gfortran libblas-dev liblapack-dev libumfpack5.4.0 | |||
sudo pip install -U scipy | |||
sudo pip install -U pandas | |||
sudo pip install -U scikit-image scikit-learn statsmodels | |||
</font> | |||
Neuroimaging: | |||
[http://nipy.sourceforge.net/ Nipy] | |||
<font face="monospace"> | |||
sudo pip install -U sympy | |||
sudo pip install -U nibabel nipype nipy | |||
sudo pip install -U dipy nitime | |||
</font> | |||
* '''Download the data''' | |||
*** [[Media:Python alex docs.zip | docs]] | |||
*** [http://www.ehu.es/ccwintco/groupware/webdav.php/apps/phpbrain/648/nisl_data.tar.gz nisl_data.tar.gz] | |||
*** [http://db.tt/e4oouc2R nisl_data.tar.gz] | |||
* '''Python'''<strike> </strike> | * '''Python'''<strike> </strike> | ||
** '''Hello World!''' | ** [http://python.about.com/od/gettingstarted/ss/helloworld_all.htm '''Hello World!'''] | ||
** Tutorials: | ** Tutorials: | ||
*** [http://docs.python.org/tutorial/index.html <font color="#3465A4">http://docs.python.org/tutorial/index.html</font>] | *** [http://docs.python.org/tutorial/index.html <font color="#3465A4">http://docs.python.org/tutorial/index.html</font>] | ||
Línea 23: | Línea 51: | ||
* '''IDEs''' | * '''IDEs''' | ||
** [http://ipython.org <font color="#3465A4">http://ipython.org</font>] | ** [http://ipython.org <font color="#3465A4">http://ipython.org</font>] | ||
** [http://www.sagemath.org/ <font color="#3465A4">Sage</font>] | |||
** [http://code.google.com/p/pythonxy/ <font color="#3465A4">http://code.google.com/p/pythonxy/</font>] | ** [http://code.google.com/p/pythonxy/ <font color="#3465A4">http://code.google.com/p/pythonxy/</font>] | ||
** [http://spyder-ide.blogspot.com.es/ <font color="#3465A4">http://spyder-ide.blogspot.com.es | ** [http://spyder-ide.blogspot.com.es/ <font color="#3465A4">http://spyder-ide.blogspot.com.es</font>] | ||
* | ** [http://eric-ide.python-projects.org/ Eric Python IDE] | ||
** [http://www.reinteract.org/addons.html Reinteract] | |||
How to install a few of them: | |||
<font face="monospace"> | |||
sudo apt-get install ipython | |||
sudo apt-get install ipython-qtconsole | |||
sudo apt-get install spyder | |||
sudo apt-get install eric | |||
sudo apt-get install reinteract | |||
</font> | |||
* '''Installing libraries''' | * '''Installing libraries''' | ||
** Ubuntu repositories | ** Ubuntu repositories | ||
Línea 62: | Línea 102: | ||
*** [http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html#scipy.stats.pearsonr <font color="#3465A4">http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html#scipy.stats.pearsonr</font>] | *** [http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html#scipy.stats.pearsonr <font color="#3465A4">http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html#scipy.stats.pearsonr</font>] | ||
** Tutorial scikit-learn: | ** Tutorial scikit-learn: | ||
'''Download data:''' | |||
[http://www.ehu.es/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes <font color="#3465A4">http://www.ehu.es/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes</font>] | |||
[http://www.ehu.es/ccwintco/uploads/a/a3/Salinas_corrected.mat <font color="#3465A4">http://www.ehu.es/ccwintco/uploads/a/a3/Salinas_corrected.mat</font>] | |||
[http://www.ehu.es/ccwintco/uploads/f/fa/Salinas_gt.mat <font color="#3465A4">http://www.ehu.es/ccwintco/uploads/f/fa/Salinas_gt.mat</font>] | |||
sklearn_on_salinas.py in zip file | |||
* '''Neuroimaging with Scikit-learn''' | * '''Neuroimaging with Scikit-learn''' | ||
Línea 72: | Línea 112: | ||
** [http://nisl.github.com/auto_examples/index.html <font color="#3465A4">http://nisl.github.com/auto_examples/index.html</font>] | ** [http://nisl.github.com/auto_examples/index.html <font color="#3465A4">http://nisl.github.com/auto_examples/index.html</font>] | ||
** Tutorial: | ** Tutorial: | ||
<font face="monospace"> | |||
$ git clone [https://github.com/nisl/tutorial.git <font color="#3465A4">https://github.com/nisl/tutorial.git</font>] | |||
$ cd tutorial | |||
$ sudo python setup.py install | |||
$ ipython | |||
[http://nisl.github.com/auto_examples/plot_ica_resting_state.html#example-tutorial-plot-ica-resting-state-py <font color="#3465A4">http://nisl.github.com/auto_examples/plot_ica_resting_state.html#example-tutorial-plot-ica-resting-state-py</font>] | |||
</font> | |||
<strike> </strike> | <strike> </strike> | ||
Línea 100: | Línea 141: | ||
** [http://forge.scilab.org/index.php/p/sciscipy/ <font color="#3465A4">http://forge.scilab.org/index.php/p/sciscipy/</font>] | ** [http://forge.scilab.org/index.php/p/sciscipy/ <font color="#3465A4">http://forge.scilab.org/index.php/p/sciscipy/</font>] | ||
** [http://rpy.sourceforge.net/rpy2.html <font color="#3465A4">http://rpy.sourceforge.net/rpy2.html</font>] | ** [http://rpy.sourceforge.net/rpy2.html <font color="#3465A4">http://rpy.sourceforge.net/rpy2.html</font>] | ||
** Boost.python | ** [http://www.boost.org/doc/libs/1_51_0/libs/python/doc/index.html Boost.python] | ||
** [http://cython.org/ <font color="#3465A4">http://cython.org/</font>] | ** [http://cython.org/ <font color="#3465A4">http://cython.org/</font>] | ||
Línea 115: | Línea 156: | ||
** [http://sympy.org/en/index.html <font color="#3465A4">http://sympy.org/en/index.html</font>] | ** [http://sympy.org/en/index.html <font color="#3465A4">http://sympy.org/en/index.html</font>] | ||
** Machine Learning, Stephen Marsland: link, book, python source code | ** Machine Learning, Stephen Marsland: link, book, python source code | ||
* '''Added later''' | |||
** [http://www.pymvpa.org/ PyMVPA] | |||
** [http://scikit-learn.org/stable/ scikit-learn] | |||
** [http://statsmodels.sourceforge.net/ scikit-statsmodels] | |||
** [http://scikit-image.org/ scikit-image] | |||
** [http://pybrain.org/pages/features PyBrain] | |||
** [http://mlpy.sourceforge.net/ mlpy] | |||
** [http://pyml.sourceforge.net/index.html PyML] | |||
** [http://luispedro.org/software/pymorph pymorph] | |||
** [http://luispedro.org/software/mahotas mahotas] | |||
* '''Cleanup before leaving... ?''' | * '''Cleanup before leaving... ?''' | ||
<font face="monospace"> | |||
sudo pip uninstall nisl rm -r | sudo pip uninstall nisl | ||
rm -r tutorial | |||
</font> |
Revisión actual - 17:06 21 nov 2012
Python Tutorial
Author: Alex, October 19th, 2012
- Install the software
Base OS: Ubuntu 12.04.1
For Ubuntu repository versions:
sudo apt-get install ipython python-numpy python-scipy python-mvpa2 python-matplotlib git python-pip python-nibabel cython python-statsmodels python-sklearn python-skimage
For updated versions we can use Python Package Index (PyPI):
sudo apt-get install python-pip python-dev build-essential sudo pip install -U pip sudo pip install -U ipython sudo pip install -U cython sudo pip install -U numpy sudo apt-get install build-essential gfortran libblas-dev liblapack-dev libumfpack5.4.0 sudo pip install -U scipy sudo pip install -U pandas sudo pip install -U scikit-image scikit-learn statsmodels
Neuroimaging:
Nipy sudo pip install -U sympy sudo pip install -U nibabel nipype nipy sudo pip install -U dipy nitime
- Download the data
- Python
- Hello World!
- Tutorials:
- IDEs
How to install a few of them:
sudo apt-get install ipython sudo apt-get install ipython-qtconsole sudo apt-get install spyder sudo apt-get install eric sudo apt-get install reinteract
- Installing libraries
- Ubuntu repositories
- http://pypi.python.org/pypi
- Numpy
- http://numpy.scipy.org/
- http://www.scipy.org/Tentative_NumPy_Tutorial
- Numpy for Matlab users
- Tutorials:
- Scipy
- Statistics and Pattern analysis
Download data:
http://www.ehu.es/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes http://www.ehu.es/ccwintco/uploads/a/a3/Salinas_corrected.mat http://www.ehu.es/ccwintco/uploads/f/fa/Salinas_gt.mat sklearn_on_salinas.py in zip file
- Neuroimaging with Scikit-learn
$ git clone https://github.com/nisl/tutorial.git $ cd tutorial $ sudo python setup.py install $ ipython http://nisl.github.com/auto_examples/plot_ica_resting_state.html#example-tutorial-plot-ica-resting-state-py
- Imaging
- Hyperspectral Imaging
- Interfaces with other softwares
- Plotting
- Others
- http://igraph.sourceforge.net/
- http://networkx.lanl.gov/
- http://nltk.org/
- http://sympy.org/en/index.html
- Machine Learning, Stephen Marsland: link, book, python source code
- Added later
- Cleanup before leaving... ?
sudo pip uninstall nisl rm -r tutorial