Code Monkey home page Code Monkey logo

scikit-learn-mooc's Introduction

scikit-learn tutorial

All notebook material: https://github.com/INRIA/scikit-learn-mooc/

Follow the tutorial online

  • Launch an online notebook environment using Binder

  • Browse the static content online (pre-rendered outputs) using nbviewer

You will need an internet connection but you do not have to install any packages locally.

Running the tutorial locally

Dependencies

The tutorials will require the following packages:

  • python>=3.6
  • jupyter
  • scikit-learn
  • pandas
  • pandas-profiling
  • matplotlib
  • seaborn
  • plotly
  • jupytext (required only for contributors)

Local install

We provide both requirements.txt and environment.yml to install packages.

You can install the packages using pip:

$ pip install -r requirements.txt

Alternatively, you can create an scikit-learn-tutorial conda environment by executing:

$ conda env create -f environment.yml

then activate the environment with:

$ conda activate scikit-learn-tutorial

You can also update your current environment, instead of creating a new environment, using:

$ conda env update --prefix ./env --file environment.yml  --prune

Contributing

The source files, which should be modified, are in the python_scripts directory. The notebooks are generated from these files.

Notebooks saved in Python files

This repository uses Jupytext to display Python files as notebooks. Saving as Python files facilitates version control.

Setting up jupytext

When jupytext is properly connected to jupyter, the python files can be opened in jupyter and are directly displayed as notebooks

With jupyter notebook

Once jupytext is installed, run the following command:

jupyter serverextension enable jupytext

With jupyter lab

To make it work with "jupyter lab" (instead of "jupyter notebook"), you have to install nodejs (conda install nodejs works if you use conda). Then in jupyter lab you have to right click "Open with -> notebook" to open the python scripts with the notebook interface.

Building the rendered notebooks

To rebuild all the rendered notebooks (from time to time, slow to run):

$ make

In some cases you may need to use a jupytext command directly rather than using the provided Makefile. For instance, to create an empty notebook from a Python script:

$ jupytext --to ../notebooks//ipynb python_scripts/your_python_script.py

Direct binder links to OVH, GESIS and GKE to trigger and cache builds

scikit-learn-mooc's People

Contributors

alagarrigue avatar brospars avatar gaelvaroquaux avatar glemaitre avatar hackmd-deploy avatar lesteve avatar lucyleeow avatar ogrisel avatar twsthomas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.