vendredi 8 mars 2019

Does setting a random state in sklearn's RandomForestClassifier bias your model?

I've training a random forest model and am using a consistent random_state value. I'm also getting really good accuracies across my training, test, and validation datasets (all are around ~.98). Though the minority class comprises only ~10% of the dataset.

Here's some code if you're interested:

model = RandomForestClassifier(n_jobs=-1, oob_score=True, random_state=310, n_estimators=300)
model.fit(subset, train.iloc[:,-1])

Given the good accuracy scores across daatsets, does random_state affect the reliability of my model?




Aucun commentaire:

Enregistrer un commentaire