March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I am trying to visualize the output of a prediction model.
I have features, and these features produce a probability of the target. The output also includes the shap value of each feature, meaning the influence it has on the probability of the target.
The visualisation looks like this:
Each line is a feature and each bubble represents an observation. The colors indicate the value of the feature. The influence is on the X-axis.
EG. the first feature, seniority in company: red means higher seniority and blue means lower seniority. The chart shows that lower seniority has a positive impact on the probability of the target, whereas higher seniority has a negative impact.
I am not able to find a PBI visualisation capable of showing this? Any siuggestions? Anyone who has developed something alike in python and imported it in pbi?
We did get it working on power bi desktop using python visuals, using the shap package. However on PBI service it does not work, probably because the shap package is not supported on PBI service. I have posted an idea to include it: https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=2e5526e6-50f6-ee11-a73d-000d3a7ade4a. Please vote for it!
HI @jvandyck
Long back i have tried to create this but shap value is model output and even if you use python in power bi, i wont work because the libary does not suppurted by power bi.
Not sure if current version of power bi able to install that libary, if not then it is not possible for create shap value visualisation with current capabilites.
Regards
any update? Thanks!
Hey,
I'd be highly interested in a solution as well!
Has somebody achieved to visualize it?
@@jvandyck: Unfortunately, the sample data is not accessible anymore.
Best
anyone?
in your sample data what is the meaning of positive_probs ?
This is what I have so far. Not sure how you are color coding and how you are sizing the bubbles.
This already looks pretty good!
The postive_probs col lists the probability of the predicted event. The _shap cols give an indication of the influence on the probability. This is what I would like to see on the X axis, as you already did. The thing missing is the color coding on each line, which would have to indicate the value itself. Let's take age as an example. The X axis shows the age_shap value. Color coding should be applied to the bubbles, based on the actual age of each observation. This way the graph would tell me eg whether high age has positive influence on the prediction. I hope this clarifies?
As you probably noticed I used a standard scatter plot visual. That unforunately doesn't allow dynamic color changes. But you should be able to accomplish that with Deneb.
I have never used Deneb and I looked at some examples and not sure I will be able to create it. Could you work out an example?
Thanks....finally took a look at it.
The bubble size does not need to change. Each bubble is one ID.
The color scale should only change within each Attribute. This way I can see how higher eg ages influence the shap values.
I hope you can fix this....THANKS!
This requirement will be a tall order in Vega-Lite if you want to solve just with the encoding channels, as they might be too simplistic for a 2-dimensional assignment. It may need creative use of a scale for the y-values and then expressions to drive hue based on the value domain for each y grouping.
I have very little available bandwidth for community support questions right now due to the work needed on Deneb's backlog. As luck would have it, this week we've just started to highlight people in the community (including on this forum) who actively welcome questions and might be better placed to be more hands-on with specific requirements. As such, I'm tagging in @giammariam, who may have a creative solution for this.
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thanks @dm-p @for the tag in, and thanks @lbendlin for the work you've done thus far.
@jvandyck, this looks like a fun and challenging visual to try to produce. Give me a little time to digest everything here. I will report back with any questions I have. Thanks!
Any progress on this challenging visual?
Hi @jvandyck. Not sure if you saw my reply on 1/21, but could you please provide the .pbix again? The link you posted before has expired.
sorry I missed that one....here is the link to the sample data: https://acerta-my.sharepoint.com/:x:/g/personal/joos_van_dyck_acerta_be/ETD25i7mnLxKhfR-QvPPWw4BengE...
Does it have to be Python or can it be Vega Lite/Deneb too?
Sure...as long as it works 😉
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |