I am teaching myself some data science and have started a Kaggle project. I have fitted a random forest classification model (using sci-kit learn) with a few millions rows of data. There are two possible outcomes for each row (0 or 1). When I run it against the test data, I get 0 for every row. This is a practical impossibility, but I am at a loss as to how to diagnose my model and how to move forward. Is this an example of extreme overfitting ? Is it more likely a problem with my training data (or test data) that i am not seeing ?
Should I simply increase the # of estimators? Is it possible that I have misformatted the input files in a subtle way that doesn't cause an error ? I am at a loss as to how to move forward.
predict_proba()
? If "1" is a rare outcome then it's pretty likely that your predictions are different but all less than 0.5. If that's the case then you can do a number of things, such as downsampling your training set or using theclass_weights
argument when building your RF. $\endgroup$