Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Jupyter kernel crashes after running "train" for decision tree classifier

I tried to perform training on my data and on toy example too. Command prompt doesnt show anything but the message about restarting.

segm_features = np.array([[1,0], [1,1], [0,1]])
labels = np.array([1,0,0])
cv_model = cv.ml.DTrees_create()
dtype = np.int32
train_data = cv.ml.TrainData_create(segm_features.astype(np.float32), cv.ml.ROW_SAMPLE, labels.astype(dtype))

cv_model.train(train_data)