Created
September 24, 2018 12:28
-
-
Save nithyadurai87/d94507f9052a6120dce5f20e31806cea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
from sklearn.linear_model import LinearRegression | |
x = [[6], [8], [10], [14], [18]] | |
y = [[7], [9], [13], [17.5], [18]] | |
model = LinearRegression() | |
model.fit(x,y) | |
plt.figure() | |
plt.title('Pizza price statistics') | |
plt.xlabel('Diameter (inches)') | |
plt.ylabel('Price (dollars)') | |
plt.plot(x,y,'.') | |
plt.plot(x,model.predict(x),'--') | |
plt.axis([0,25,0,25]) | |
plt.grid(True) | |
plt.show() | |
print ("Predicted price = ",model.predict([[21]])) |
Dear Mam, Your work is marvelous to our future young generation. Hats off to Tamil Kaniyam and Team.
Keep it up. I will support always to kaniyam. Nantri.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Madam,
I personally thank you for your effort to write a book for machine learning in Tamil.
I am new to this field. I tried to learn this application for geospatial application.
your book helps me to understand machine learning concepts
Once again I Thanks for your effort.