Random Forest predict() does not produce reproducible results. random_state=42 #28920
Labels
Needs Investigation
Issue requires investigation
Needs Reproducible Code
Issue requires reproducible code
Describe the bug
If I load my pre trained model and set of samples and call predict() multiple times I get different predicted classes. Here are some sample results. I am using a juypter notebook. I have tried restarting the kernal multiple times and also just re-running the cell multiple times
I have a random forest I trained with the following parameters
The model was save using joblib. I load the model as follows
I make predictions as follow
I have tried setting calling random.seed()
Any suggestions would be greatly apreciated.
p.s.
When I trained I save the label encoder and load as follows. (This was to insure the class number match the class names)
I can make my trained model avaliable
Steps/Code to Reproduce
predictions = model.predict(XNP)
yProbability = model.predict_proba(XNP)
Expected Results
predict(X) == predict(X)
Actual Results
Versions
The text was updated successfully, but these errors were encountered: