ABOVE THE LINE

It overshadows our brightest aspirations and undermines the landscape of our present circumstances. It attempts to overhaul our hope. Intoxicated by it, we are left enticed to believe in our…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Building and Deploying Explainable AI Dashboards using Dash and SHAP

In the app, you will find controls that let you control the total bill, sex, day of the week, etc. Each one of those controls defines an input feature, and every time you update them, a new sample is given to the trained LightGBM model.

In addition to specifying custom model inputs, you can also select a random example from the training set. Whenever you do this, you will see the real label appear on the right side (as a scatter point). You can then tweak the feature values to see how the various SHAP values change.

The current state-of-the-art ML algorithms (e.g. gradient boosting and neural networks) for modeling continuous and categorical features are usually written in optimized C/C++ codes, but they can be conveniently used through Python. As a result, powerful xAI libraries like SHAP are also interfaced in the same language, which lets us train and explain powerful models in just a few lines of Python code. However, although such models are popular in the ML community, considerable effort needs to be made to port them into traditional BI tools, including having to connect external servers and add third-party extensions. Furthermore, building UIs that lets you train these Python-based ML libraries can quickly become cumbersome if you are using those BI tools.

With Dash, you can seamlessly integrate popular and up-to-date ML libraries, which enable Dash app users to quickly answer “what if?” questions, and probe what the ML models have learned from the data. Most of the time, all you need to do is to install and freeze such libraries using pip, which is usually done in a few lines:

Left: Thursday lunch alone. Right: Saturday Dinner with friends.

Furthermore, new features in Dash like pattern-matching callbacks let you simplify the process of creating callbacks. As a result, you can create very complex callbacks between components with very little effort. As an example, there are six controls in our app (one for each input feature), but we only need to specify one Input and one State to our callback to control all the components at the same time:

Then, in one line, we were able to construct a dictionary where the keys are the feature names and the values are what we will input to the model. From then on, it’s easy to process the dictionary in the input format most suitable to your model.

Add a comment

Related posts:

ONLINE DATING IS SOCIAL MEDIA 3.0

I began online dating four months ago and it occurred to me early on how similar the process was to the way businesses market their goods and services through social media. Maybe you only have a…

Welcome

After 5 years of living in Japan, and saw so many different views and opinions for this country, I think I should offer some real stories without idealized or preconception.

Rencara Sheila

keesok harinya saat jam pelajaran berlangsung mereka sedang terfokus oleh mata pelajaran yang sedang dipelajarinya, namun berbeda dengan siswi satu ini dia sedang memikirkan bagaimana rencana supaya…