Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created June 21, 2021 12:58
Show Gist options
  • Save amankharwal/6350d5674a3a0f3276705c48ef4d1f5b to your computer and use it in GitHub Desktop.
Save amankharwal/6350d5674a3a0f3276705c48ef4d1f5b to your computer and use it in GitHub Desktop.
from sklearn.tree import DecisionTreeRegressor
model = DecisionTreeRegressor()
model.fit(xtrain, ytrain)
ypred = model.predict(xtest)
data = pd.DataFrame(data={"Predicted Rate": ypred})
print(data.head())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment