import pandas as pd
import numpy as np
from sklearn import tree

data = pd.read_csv('Seattle.csv')

X = data[['bedrooms', 'bathrooms', 'sqft_living', 'sqft_lot','floors', 'waterfront', 'view', 'condition', 'grade', 'sqft_above', 'sqft_basement', 'yr_built', 'yr_renovated', 'zipcode', 'lat', 'long', 'sqft_living15', 'sqft_lot15']].values
y = data['price']

model = tree.DecisionTreeRegressor()
model.fit(X, y)
predictions = model.predict(X)

print(model.feature_importances_)

for index in range(len(predictions)):
  print('Actual: ', y[index], 'Predicted: ', predictions[index])

