Random Forest R Problem



While running Random Forest , I am getting zero probabilities for one class. I am running Random Forest by using Random Forest Package in R .

I already used type = ‘prob’ in the predict function. My questions are :slight_smile:

  1. Why this is happening ?
  2. what can be done to fix this.



Before making predictions of what is wrong, could you specify what your data is and what data preprocessing/feature engineering steps did you take?


My data is having 6 continuous variable and 2 categorical variable and no null value are present in the data set. The dependent variable is 1 or 0 types.I haven’t done much feature engineering .

Is this information sufficient to answer above question ?


Hi @Arihant

In order to help you better, please share the structure of your training data.: str(data)

And also, share the distribution of the outcome variable: table(as.factor(data$outcome_variable))



Thanks. It is solved now :slight_smile: