How to Solve NameError: name 'RandomForestClassifier' is not defined -- sklearn
Solution: Import the 'RandomForestClassifier' module
To Solve the error, add the following line to the top of your code.
from sklearn.ensemble import RandomForestClassifier
For more information:
Python sklearn RandomForestClassifier