I get this error when using the "explain" function from the "lime" library on a h2o random forest.
Error in elnet(x, is.sparse, ix, jx, y, weights, offset, type.gaussian, :
y is constant; gaussian glmnet fails at standardization step
I can't find documentation online, or help about this question online. Can you help me root-cause and resolve it?
Here is my code:
explainer_h2o_rf <- lime(x=big_df,
model=fit_rf.hex,
bin_continuous = FALSE,
use_density = T,
quantile_bins = F)
# for(i in 1:25){
i <- c(1,2)
explanation_rf <- explain(x = x_lime[i,],
explainer = explainer_h2o_rf,
n_features = 15,
feature_select = "auto",
labels = "1")
Notes:
- I am predicting a binomial variable within the h2o model, 'fit_rf.hex'.
- I worked through this and it worked, but my current approach does not
- The "lime" tag does not seem to apply to this lime library, but to something that is used for unit testing.
- The non-gaussian shouldn't be a problem, because (I think) I have set the flags that deal with non-gaussian (nearly all my data is non-Gaussian) data using kernel methods.
Here are sites/questions that didn't contain my answer: