How to use the predicted data from polynomial regression in python code

I want to use the future predicted points shown in the graph in my python code, how can I get the data points from the graph?

@prakritkt2000

So far we don’t have an option to fetch the predicted data. As the prediction graph is still under construction, and what you are using is only a beta version.

With a Bolt Pro account, you can fetch data that is present in your graph with the ‘get historical data’ API. In the future, if we add the predicted values in the API, we shall make an announcement.

Till then, you can write a python program to make predictions from existing points with the Regression with ML method. Reference for the same - https://towardsdatascience.com/machine-learning-polynomial-regression-with-python-5328e4e8a386

Let me know if you have any other queries.

1 Like

Python has methods for finding a relationship between data-points and to draw a line of polynomial regression. it will show you how to use these methods instead of going through the mathematics formula.

In the example below, we have registered 18 cars as they were passing a certain tollbooth.

We have registered the car’s speed, and the time of day (hour) the passing occurred.

The x-axis represents the hours of the day and the y-axis represents the speed:

Example

Start by drawing a scatter plot:

import matplotlib.pyplot as plt

x = [1,2,3,5,6,7,8,9,10,12,13,14,15,16,18,19,21,22]
y = [100,90,80,60,60,55,60,65,70,70,75,76,78,79,90,99,99,100]

plt.scatter(x, y)
plt.show()

Result:

image