Professional Documents
Culture Documents
ipynb - Colaboratory
# visualisatin de dataset:
data
Quartier
0 800 50 75 10
1
Quartier
1 1200 80 82 12
2
Quartier
2 950 60 68 9
3
Quartier
3 1100 75 77 11
4
Quartier
4 700 40 71 8
5
Quartier
5 850 55 85 10
6
Quartier
6 1000 65 74 9
7
Quartier
7 1300 90 78 12
8
Quartier
8 900 70 80 10
9
Quartier
9 1000 60 76 9
10
Quartier
10 850 45 72 8
11
Quartier
11 1100 85 83 13
12
Quartier
12 750 55 69 8
13
print(Intercept,coefficients,Score)
print(Intercept,coefficients)
https://colab.research.google.com/drive/1KUY2IwOyobimlVFknQx3xt-m18Qq3o0J#printMode=true 1/3
5/16/23, 1:31 PM Untitled0.ipynb - Colaboratory
array([[ 8.54624432],
[11.71101017],
[ 8.66982469],
[10.81426587],
[ 7.31501389],
[ 9.95544762],
[ 9.68223395],
[12.14865252],
[10.74404253],
[ 9.44694633],
[ 7.79849771],
[12.2768262 ],
[ 8.40120434],
[10.76446669],
[12.28078391],
[ 8.3478473 ],
[10.79384171],
[ 9.57907773],
[11.92587363],
[ 9.7978989 ]])
#validation du model en testant pour un datatest et les resultat sont trés proche
appart=[1000,60,88]
estimation=np.sum(coefficients*appart)+Intercept
estimation
array([10.63732845])
# calcule de RSS:
residuals=Y-Y_pred
https://colab.research.google.com/drive/1KUY2IwOyobimlVFknQx3xt-m18Qq3o0J#printMode=true 2/3
5/16/23, 1:31 PM Untitled0.ipynb - Colaboratory
RSS=np.sum(residuals**2)
RSS
https://colab.research.google.com/drive/1KUY2IwOyobimlVFknQx3xt-m18Qq3o0J#printMode=true 3/3