Using sklearn, i've fitted a decision tree based on some input data.
regr = DecisionTreeRegressor(max_depth=4)
regr.fit(X,Y1)
dot_data = tree.export_graphviz(regr_2, out_file=None,feature_names=legends,
filled=True, rounded=True, special_characters=True)
graph = graphviz.Source(dot_data)
graph.render("Y")
Now i have a different Y2 that is correlated with Y1.
I want to use the same decision_path as found in regr and generate the same decision tree but for Y2. This tree may not be the optimal solution for X and Y2, but would be very useful for me.
Is it possible? Thanks.