Random Forest R Problem

machine_learning
data_science

#1

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.

#2

@Arihant

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


#3

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 ?


#4

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))

Best,
Saurav,


#5

Thanks. It is solved now :slight_smile: