How to get score of prediction from random forest?

0 votes
I'm using sklearn's Random Forest classifier for a model I've built. When using it for predictions, I was wondering if there's a way to get the certainty level of the predictions ? Please help.
Sep 9, 2019 in Python by Neel
• 3,010 points
98 views

1 answer to this question.

0 votes
Well, there's a built-in method for this in the RandomForestClassifier. It is called forest.predict_proba(X). Random forest classifier creates a set of decision trees from a randomly selected subset of the training set. It then aggregates the votes from different decision trees to decide the final class of the test object.

I hope this helps.
answered Sep 9, 2019 by Arvind
• 2,980 points

Related Questions In Python

0 votes
0 answers
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by aryya
• 7,350 points
190 views
0 votes
1 answer

How to get text label from SAP using pywinauto[python]

Hi. Can you please tell me what ...READ MORE

answered Jun 28, 2018 in Python by Nietzsche's daemon
• 4,260 points
702 views
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,540 points

edited Dec 19, 2018 by Nymeria 30,649 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 944 views
0 votes
0 answers
0 votes
1 answer

How to get a list of built in modules in Python?

simply open the python shell and type ...READ MORE

answered Aug 1, 2019 in Python by Arvind
• 2,980 points
193 views
+1 vote
1 answer

How to convert records from csv to a list in Python?

If you are using Python 3.x then ...READ MORE

answered Jun 25, 2019 in Python by Arvind
• 2,980 points

edited Jun 26, 2019 by Kalgi 493 views