It would be strange to learn Machine Learning and never use Jupyter notebooks. Data scientists LOVE Jupyter notebooks. It's what they use on kaggle and Google Colab. So let's begin.
Install
pip install notebook
Launch
Run the following command from the directory where .ipynb
file is
jupyter notebook
On Windows make sure that C:\Users\<user_name>\AppData\Local\Programs\Python\Python38\Scripts\
is in your user environment variables
Updates
pip install jupyter --upgrade
pip install notebook --upgrade
- Jupyter is metapackage that allows you to install all the Jupyter components in one go.
Dark theme
Set dark theme (more info in this StackOverflow question)
pip install jupyterthemes jt -l jt -t theme-name
Try online
Tips
- Organize code in classes. Class works as a namespace for variables and functions. This way many parameters can be saved locally in objects and you can compare between different iterations still sitting in memory. But be careful, because there are no objects in Python
- If objects instantiate the same class then functions of the class can be overridden which means all objects will use the new version. This replacement can be temporary.
- Functions help repeat multiple actions by writing one line