adding all work done so far (lessons 1 - 5)

This commit is contained in:
2019-07-10 19:58:53 +01:00
parent 8085149a49
commit b982957daf
37 changed files with 19407 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
from sklearn.linear_model import LinearRegression
import pandas as pd
df = pd.read_csv('data.csv')
bmi_life_data = df
bmi_life_model = LinearRegression()
# print(bmi_life_data[['Life expectancy']], bmi_life_data[['BMI']])
bmi_life_model.fit(bmi_life_data[['BMI']],
bmi_life_data[['Life expectancy']])
laos_life_exp = bmi_life_model.predict([[21.07931]])
print(laos_life_exp)