import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

dataset = pd.read_csv('data_pol.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, -1].values

from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(random_state=0)
regressor.fit(X, y)

regressor.predict([[6.5]])

X_grind = np.arange(min(X), max(X), 0.1)
X_grind = X_grind.shape((len(X_grind),1 ))
plt.scatter(X,y, color="red")
plt.plot(X_grind, regressor.predict(X_grind), color="blue")
plt.show()
d0c0c1867381c1b98b7ffdf87a1029a19943f679
<mask token>

<mask token>
regressor.fit(X, y)
regressor.predict([[6.5]])
<mask token>
plt.scatter(X, y, color='red')
plt.plot(X_grind, regressor.predict(X_grind), color='blue')
plt.show()

<mask token>
dataset = pd.read_csv('data_pol.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, -1].values
<mask token>
regressor = DecisionTreeRegressor(random_state=0)
regressor.fit(X, y)
regressor.predict([[6.5]])
X_grind = np.arange(min(X), max(X), 0.1)
X_grind = X_grind.shape((len(X_grind), 1))
plt.scatter(X, y, color='red')
plt.plot(X_grind, regressor.predict(X_grind), color='blue')
plt.show()

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('data_pol.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, -1].values
from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(random_state=0)
regressor.fit(X, y)
regressor.predict([[6.5]])
X_grind = np.arange(min(X), max(X), 0.1)
X_grind = X_grind.shape((len(X_grind), 1))
plt.scatter(X, y, color='red')
plt.plot(X_grind, regressor.predict(X_grind), color='blue')
plt.show()

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

dataset = pd.read_csv('data_pol.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, -1].values

from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(random_state=0)
regressor.fit(X, y)

regressor.predict([[6.5]])

X_grind = np.arange(min(X), max(X), 0.1)
X_grind = X_grind.shape((len(X_grind),1 ))
plt.scatter(X,y, color="red")
plt.plot(X_grind, regressor.predict(X_grind), color="blue")
plt.show()