Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exactly with same data GBM&Lime explain() works fine, but failing for RandomForest and CRF with NA/NaN/Inf in 'y' #172

Open
j-ghatak opened this issue Dec 11, 2019 · 0 comments

Comments

@j-ghatak
Copy link

j-ghatak commented Dec 11, 2019

Hi All,

I am using lime and with GBM it works fine (though had to create model_type.gbm and predict_model.gbm, as there is no direct support for GBM and new observation is actually on same training data) but EXACTLY with the same data when I am trying apply to RandomForest and CRF (another version of RandomForest), the following error is showing up.

Any explanation/solution will be highly appreciated.

Note:

  1. The data and model details are copyrighted, so can not publish any detail but open for question and can provide some generic information(if required) without divulging any company specific information.

  2. For testing/new data I have used couple of rows of the same training data , for simplification purpose

  3. The ACTUAL train and test data surely contains NA value, factor value, numeric values, but in this case, there is NO NA values within the data and converted/curated all data types to numeric in type and class.

  4. For GBM also, when I use test data, it fails (currently train and test data DOES NOT contains NA, all data is numeric

The following is the error message (which is generic)

explanation <- explain(local_obs, explainer, n_labels = 1, n_features = 5)
Error in glm.fit(x = x_fit, y = y, weights = weights, family = gaussian()) :
NA/NaN/Inf in 'y'

In addition: Warning messages:
1: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
2: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
3: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
4: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
5: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
6: In gower_work(x = x, y = y, pair_x = pair_x, pair_y = pair_y, n = NULL, :
skipping variable with zero or non-finite range
7: In Ops.factor(y, mu) : ‘-’ not meaningful for factors
8: In Ops.factor(eta, offset) : ‘-’ not meaningful for factors
9: In Ops.factor(y, mu) : ‘-’ not meaningful for factors

@j-ghatak j-ghatak changed the title Exactly with same data GBM&Lime explain() works fine, but failing for CRF with NA/NaN/Inf in 'y' Exactly with same data GBM&Lime explain() works fine, but failing for RandomForest and CRF with NA/NaN/Inf in 'y' Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant