X, y = X_transformed2, data.lpuntaje
X_train, X_test, y_train, y_test = train_test_split(X,
                                                    y,
                                                    test_size=0.1,
                                                    random_state=0)

clf = DecisionTreeRegressor(max_depth=6)

# Train Decision Tree Classifer
clf = clf.fit(X_train, y_train)

#Predict the response for test dataset
y_pred = clf.predict(X_test)

clf.score(X, y)
clf.get_depth()
clf.get_n_leaves()
clf.get_params()

# In[18]:

clf.get_depth()

# In[33]:

clf.score(X_test, y_test)

# In[31]:

# evaluate decision tree performance on train and test sets with different tree depths
from sklearn.datasets import make_classification