#polynomial regression
In [7]:
from scipy.stats import norm
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(2)
page_speeds = np.random.normal(3.0,1.0,1000)
purchase_amount = np.random.normal(50.0,10.0,1000)/page_speeds
plt.scatter(page_speeds,purchase_amount)
Out[7]:
In [13]:
x= np.array(page_speeds)
y = np.array(purchase_amount)
p4 = np.poly1d(np.polyfit(x,y,3))
In [14]:
xp = np.linspace(0,7,100)
plt.scatter(x,y)
plt.plot(xp,p4(xp), c='r')
plt.show()
In [ ]:
xp = np.linspace(0,7,100)
plt.scatter(x,y)
plt.plot(xp,p4(xp), c='r')
plt.show()
embedded system,Arduino,Raspberry pi,ARM7,MM32,STM32,PIC and Python,Django,Datascience and web development
Monday, April 6, 2020
polynomial_regression in datascience using python
Subscribe to:
Posts (Atom)
-
How to do the programming python in windows command prompt Step 1: please go through below link website f...
-
Serial.print() Description Prints data to the serial port as human-readable ASCII text. This command can take many forms. Numbers a...