I am using Random Forest in Python to classify my data into 6 classes. My data are X,Y,Z coordinates, some geometric features and labels. I am using the geometric features and the labels to train the classifier using the training set (a random 70% of my data). I would like though to use also a probability threshold of let's say 50% on the test set (the rest 30% of the data), so the data predicted with less than 50% probability are assigned to a class 6 which represents unknown and all the rest from 0 to 5 as normally. However, the output predicted labels I would like to be in the same order as in my test set so I can then easily associate the predicted labels to the XYZ coordinates for visualization purposes. How could I implement that in Python?