You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using SuperLearner to predict an outcome from a Random Forest algorithm. However, the Random Forest predicts only 0, and I don't understand how to fix the issue.
But this result isn't unexpected. There is no information in the X variables, and so predicting everyone to have Y=0 is better than using the ranger predictions which are not informative. Since the (weighted) mean of Y is close to 0 even adding SL.mean to the candidate library is unlikely to help much, but this is why you see shifting the mean value of Y gives some weight to the ranger predictions (but if you add SL.mean to the candidate library, it will get weight 1, again because the X variables are not informative here).
Thank you for your answer. It helps me to understand what is happening better.
You are correct that in my example, x1, x2, x3, and x4 are uninformative since they are random. However, in my data, they are informative. Y measures hourly wages (in log), and x1, x2, x3, and x4 are confounders for age, working experience, household composition, and education, respectively. I am sure these confounders matter for wages. However, I get the same warning message and output as the one in my example.
What are you using for the library of candidate algorithms? You may want to try expanding the candidates and could look at the CV risk estimates relative to SL.mean to confirm your assumption about informative variables/algorithms.
I am using SuperLearner to predict an outcome from a Random Forest algorithm. However, the Random Forest predicts only 0, and I don't understand how to fix the issue.
Here is a reproducible example:
This code returns the following output:
Any idea why it predicts only 0 and how I can fix the issue?
I noticed that if I change
y
by byy+2
the prediction works. For instance, like this:The text was updated successfully, but these errors were encountered: