我正在研究二進制分類并嘗試使用 SHAP 框架解釋我的模型。
我正在使用邏輯回歸演算法。我想用 和 來解釋這個KernelExplainer模型LinearExplainer。

注意:KernelExplainer不支持掩碼,在這種情況下,loc或者iloc將回傳相同的值。
background = Independent(X, max_samples=100)
explainer = LinearExplainer(model,background)
sv = explainer(X.loc[[5]]) # pass the row of interest by index
waterfall(sv[0])

請注意,LinearExplainer的結果可以“按原樣”提供給瀑布
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/485290.html
