Creates a Random Forest Regressor and Mulit-Layer Perceptron model then explains individual predictions with LimeTabularExplainer.
I chose a prediction instance where the two models were discrepant with respect to the prediction of a mass being malignant.
Here we have a specific instance where the two models had a difference in predicted probability greater than 0.4 resulting in discrepant predictions:
The ground truth at row 152 is: 0 The MLP predicted probability: 0.412 The RF Classifier predicted probability: 0.814
The Random Forest Classifier put a heavy partial probability on the BI_RADS between 4 and 5 as the main predictor. It then ranked the next two top features as shape not being oval and the margin not being circumscribed to be important in predicting malignancy.
We can see a marketed difference in feature importances used by each model. The MLP has a much more balanced partial prediction distributions for each feature and puts the shape not being an oval, the shape being irregular and the age being between 45 and 57 as the top 3 features that lead to its prediction. It predicted this instance to be positive even though it was negative.
The R2 for the RF is: 0.840 The R2 for the MLP is: 0.163