Why do we need to explain feature in machine learning?
We need the answer to the question:
What features have the biggest impact on predictions?
Problem 1: Why permutation importance?
- fast to calculate,
- widely used and understood, and
- consistent with properties we would want a feature importance measure to have.
What did I learn?:
- How do we get the feature importance?
If I randomly shuffle a single column of the validation data, leaving the target and all other columns in place, how would that affect the accuracy of predictions in that now-shuffled data
- Get a trained model
- Shuffle one column, calculate the loss and measure how much performance deteriation from the shuffling
- Reverse previous shuffle and iterate another column until we calculate all importance
Problem 2: Why partial dependence plots?
Explain a feature affects predictions.
For example,
Controlling for all other house features, what impact do longitude and latitude have on home prices? To restate this, how would similarly sized houses be priced in different areas?
What did I learn?
- Why not coefficient?
partial dependence plots on sophisticated models can capture more complex patterns than coefficients from simple models.
Partial dependence plots are a way to visualize the relationship between a specific feature (or variable) and the predicted outcome of a model, while accounting for the average effects of all other features. They help us understand how changes in one variable affect predictions, independent of other variables.
Pending/TODO
-
From the exercise, I still did not grasp the concept of how to set the feature and target, such that it will have steep partial dependence or flat partial dependence. Maybe more real world use cases would better explain them than the mathametic functions.
-
check out the thread/clips here:
- https://www.kaggle.com/discussions/getting-started/65782
- https://www.youtube.com/watch?v=uQQa3wQgG_s&ab_channel=ritvikmath
Problem 3: What is SHAP values?
Used to break down a prediction to show the impact of each feature
Some use cases, for example, are:
- A model says a bank shouldn’t loan someone money, and the bank is legally required to explain the basis for each loan rejection
- A healthcare provider wants to identify what factors are driving each patient’s risk of some disease so they can directly address those risk factors with targeted health interventions
What did I learn?
Bao-Jhih Shao
A software engineer writing something to keep the memory.
Comments