Comments (5)
Hi @hbaniecki
explainer1$data[1, , drop=FALSE]
runs smoothly and prints the first subject in the sample
For:
explainer1$predict_function(explainer1$model, explainer1$data)
explainer1$predict_function(explainer1$model, explainer1$data[1, ])
explainer1$predict_function(explainer1$model, explainer1$data[1, , drop=FALSE])
We get an error, that we have encountered in Python originally but solved it via formatting:
Error in py_call_impl(callable, dots$args, dots$keywords) :
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
Regarding the example data due to company restrictions we are not allowed to share any of the data itself
from modelstudio.
Hi @vsteiger,
- Does the full example code work for you?
- For your use-case:
a) in Python: what is the verbose output of an Explainer?
b) in Python: can you accessexplainer.y_hat
andexplainer.residuals
?
c) in R: can you accessexplainer$y_hat
andexplainer$residuals
?
Lines 655 to 659 in 91da18c
from modelstudio.
Hi @hbaniecki
We found the error in the explainer building step in python.
We've corrected this and now the verbose output in Python looks clean.
We continued in R:
explainer1 <- py_load_object("explainer_scikitlearn_precalculateTrue_v02.pickle", pickle = "pickle")
class(explainer1)
"explainer" "explainer" "explainer" "dalex._explainer.object.Explainer" "python.builtin.object"
In R we can access both explainer.y_hat and explainer.residuals and they are not NULL:
is.null(explainer1$residuals) [1] FALSE
> is.null(explainer1$y_hat) [1] FALSE
Now, when running modelStudio(explainer1, B = 5)
on the explainer file, we got this error message:
new_observation
argument is NULL.new_observation_n
observations needed to calculate local explanations are taken from the data.Error in modelStudio.explainer(explainer1, B = 5) :
explainer$predict_function
returns an error when executed onnew_observation[1,, drop = FALSE]
from modelstudio.
@vsteiger great!
what do you get from explainer$data[1, , drop=FALSE]
?
explainer$predict_function(explainer$model, explainer$data)
explainer$predict_function(explainer$model, explainer$data[1, ])
explainer$predict_function(explainer$model, explainer$data[1, , drop=FALSE])
Just for context, I ran the example from documentation https://modelstudio.drwhy.ai/articles/ms-r-python-examples.html and it runs OK for me with the same software versions.
So maybe to solve this I would need to have exemplary data/model made by you where the error occurs.
from modelstudio.
Yes, but it could be synthetically generated data from numpy
working on a changed model in sklearn
, just to reproduce the error.
from modelstudio.
Related Issues (20)
- There is a plan to export modelStudio to python? HOT 2
- add `verbose` as an alias to `show_info`
- add `ms_merge_observations()` function to merge multiple modelStudio into one
- add `happiness` dataset
- update DALEX, ingredients, and iBreakDown versions? HOT 1
- add information about css needed for a proper modelStudio rendering in rmd -> html (vignette)
- update GIFs with the happiness demo example
- modelStudio fails on R v4.2 (devel) due to changes in logical operators HOT 1
- multiple modelstudio objects overlap HOT 3
- model_diagnostics fails due to no rows to aggregate HOT 10
- add `variable_splits` to modelStudio HOT 1
- Add a parameter to set, which plots to open and on which positions
- Why are Break Down plot intercepts the same for different regression models? HOT 8
- Is 4x4 panels the only way to present ModelStudio? HOT 2
- Partial display of ModelStudio applet in Quatro HTML file HOT 2
- v2.1.0 release checklist
- Support for explainer objects from the `survex` package HOT 2
- Error in R - Error in eval(predvars, data, env) : object 'Breach' not found HOT 1
- Parsing error for only one variable model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modelstudio.