I'm trying to figure out this calculation by hand. But I do not understand all the steps to how regression trees are split.
My target is drug effectiveness and my feature is dosage. The tree it produces is below. How can I calculate mse by hand to get the same outcome as sklearn?
data = {"doseage": [10,20,35,5,15], "drug_effective": [98,0,6,44,88]}
df = pd.DataFrame(data=data)
target = df["drug_effective"]
features = df.drop(columns=['drug_effective', "age"])
tree = DecisionTreeRegressor()
tree.fit(features,target)
plot_tree(tree)