---
title: "How to make a prediction with Linear Regression on Notebooks?"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220806944/How%20to%20make%20a%20prediction%20with%20Linear%20Regression%20on%20Notebooks%3F"
format: markdown
---
EN |  ES This tutorial is based on the following example:  link . In the platform, we will use the Notebooks to easily program a linear regression. In a later post, we will modify this notebook so that it allows parameters and that it can be invoked from a REST API. In statistics, a linear regression is a linear approach to modelling the relationship between one variable and one or more independent variables. Firstly, you must connect to  the Platform's CloudLab Environment  with an Analytics role. This role is given only when requested, but you have a generic account, analytics4demos/Demos2018! , to see and run the examples. Once in the Platform's ControlPanel with this user, go to the Analytic Tool menu and select: You will see a screen like this one. From here, select  NEW NOTEBOOK Give the Notebook a name, then access the Notebook and fill in the paragraphs. By clicking  Ctrl+Alt+T,  you can give a title to a paragraph. In the first paragraph, you will recover the file of its location (In this example case, GitHub) and have a look at its contents: Once you have the file, import the Python libraries you will use: Regression is no more than six lines where you load the file via Pandas, adapt the values between -1 and 1, model the regression and make a prediction on the Y variable: Lastly, show the variables used for regression and prediction: If you go to the last paragraph and select  Link this  paragraph, you will receive an URL that you can embed as an iFrame in any web: https://www.onesaitplatform.online/controlpanel/notebooks/app/#/notebook/2DTG1H1S5/paragraph/20181029-173557_1956459329?asIframe In a later tutorial, we will complete this Notebook so it can be run via the REST API offered by the Notebook engine and predict the Y value for an X variable.