-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathone.py
More file actions
32 lines (27 loc) · 691 Bytes
/
one.py
File metadata and controls
32 lines (27 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import linear_model
mydata=pd.read_csv('csvSamples/zillow.csv')
mydata.head()
mydata.describe(include="all")
mydata.info()
#%matplotlib inline
histogram=mydata.hist(figsize=(5,10))
#histogram=plt.hist(mydata["Beds"])
#histogram.show()
pairplot=sns.pairplot(mydata)
#pairplot.show()
#getting the mean and standard deviation
mean=mydata['Beds'].mean()
print(mean)
stdev=mydata['Beds'].std()
print(stdev)
#create a linear regression model
regr=linear_model.LinearRegression()
y=mydata['']
x=mydata[[''], ['']]
regr.fit(x,y)
regr.coef_
regr.intercept_