/tutorial-scikit-learn-IMC

Breve tutorial sobre scikit-learn para asignatura de IMC

Primary LanguageJupyter NotebookCreative Commons Zero v1.0 UniversalCC0-1.0

Tutorial sobre scikit-learn para IMC

Este breve tutorial explica algunos de los conceptos relacionados con la librería scikit-learn de python.

Se incluyen dos versiones:

Para ejecutar el código tendrás que instalar la última versión de scikit-learn. Para la tercera práctica, deberás tener la última versión de click:

pip install click --user --upgrade
pip install scikit-learn --user --upgrade

Nota: si haces este tutorial fuera del entorno de la UCO, no es necesario utilizar la opción --user, ya que ésta sirve para instalar las bibliotecas en la carpeta de usuario, en lugar de hacerlo a nivel global (que requiere privilegios de administración).

Si no tienes instalado jupyter puedes instalarlo con:

pip install jupyter --user --upgrade

También puedes instalar jupyter, click y scikit-learn a través de apt, pero las versiones disponibles puede que no sean las últimas.

Lo primero que deberías hacer es clonar el repositorio:

git clone https://github.com/ayrna/tutorial-scikit-learn-IMC.git

Ahora, desde la carpeta del repositorio, lanza jupyter mediante:

cd tutorial-scikit-learn-IMC/
jupyter notebook

Si no aparece de forma automática, puede que tengas que abrir una navegador e introducir la dirección indicada (que será del tipo http://localhost:8888/?token=...). Una vez iniciada la interfaz de Jupyter abre el fichero tutorial.ipynb.

Si estáis usando vuestro portátil, existen instrucciones de instalación de Python con las librerías científicas en:

En cualquier caso, si tenéis cualquier problema con Jupyter, podéis acceder a la salida del tutorial ya ejecutado.

Otra posibilidad es utilizar Google Colab, que pone a vuestra disposición los recursos computacionales (CPU, GPU, TPU..) para ejecutar cuadernos de Jupyter utilizando las librerías científicas más habituales (scikit-learn, TensorFlow...). Tan solo necesitáis un cuenta de Google.

Te recomiendo que sigas el tutorial completo para aprender más sobre scikit-learn.

scikit-learn tutorial for IMC

This brief tutorial explains some concepts related with the Python library scikit-learn.

Two versions are included:

To run the code, you will need the last version of scikit-learn. For the third lab assignment, you will need the last version of click:

pip install click --user --upgrade
pip install scikit-learn --user --upgrade

Note: if you run this tutorial from your computer, you do not really need the option --user, given that this is for installing libraries for your user instead of system-wide (which requires root privileges).

If you do not have installed jupyter, you can install it by:

pip install jupyter --user --upgrade

You can also install jupyter, click and scikit-learn using apt, but the available versions may not be the most recent ones.

First, you should clone the repository:

git clone https://github.com/ayrna/tutorial-scikit-learn-IMC.git

Now, from the repository folder, you should run jupyter by:

cd tutorial-scikit-learn-IMC/
jupyter notebook

If your browser is not automatically opened, you should manually open it and introduce the address (something similar to http://localhost:8888/?token=...). Once you can see the Jupyter server, open the file tutorialEn.ipynb.

If you are using your own computer, you may have problems with the scientific libraries. Take a look at:

In any case, if you are experiencing problems with Jupyter, use the output of the tutorial.

Another possibility is to use Google Colab, which makes available the computational resources (CPU, GPU, TPU..) to run Jupyter notebooks using the most common scientific libraries (scikit-learn, TensorFlow...). You will only need a Google account.

It is recommended to follow the complete tutorial to learn more about scikit-learn.