0

I am trying to implement a CART (classification and regression tree) algorithm in python.
When it comes to find the best split I have this code:
for col in X.shape[1]:
sorted_indices = np.argsort(features[:, col])
sorted_features = features[sorted_indices, col]
sorted_target = target[sorted_indic...