Running Linear Regression on Jupyter notebook

Shashipraba Perera
1 min readJan 14, 2024
Ref: Scikit-learn in 2024

Jupyter notebook is a Python development environment that has configured with the necessary libraries to run Machine learning algorithms.

1. Go to the following link and download the Jupyter notebook for the given example.

http://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py

2. Open Anaconda navigator by opening the terminal and typing ‘anaconda-navigator’.

3. Launch the Jupyter notebook.

4. It will show the directories of the current directory and the running notebooks.

5. Upload the downloaded notebook using the upload button.

6. Once uploaded, the uploaded notebook should appear on the list given.

7. Click on the notebook to run it. Now Jupyter will run the given code and display the results. Try to read the code and understand what’s going on. You may have to refer sci-kit learn documentation to understand what each function is doing. The dataset is a test dataset given in scikit-learn.

http://scikit-learn.org/stable/modules/classes.html

8. If you select ‘Cell’->’Run All’, it should run the python code in the cell and generate the results again (it might take some time depending on the speed of your PC).

9. Download the resulting file using file->Download as html.

--

--

Shashipraba Perera

Passionate about bridging the worlds of AI, Machine Learning and Development.