SHAPによる特徴量の影響説明

SVCで作成した分類器の特徴量の説明をしたいと思い、SHAPを使用してみようと思った。

下記のコードを参考にしている。

ひとまずほぼコピペで動いたが、エラーが大量に出ていた。

==================================

The default of 'normalize' will be set to False in version 1.2 and deprecated in version 1.4.
If you wish to scale the data, use Pipeline with a StandardScaler in a preprocessing stage. To reproduce the previous behavior:

from sklearn.pipeline import make_pipeline

model = make_pipeline(StandardScaler(with_mean=False), LassoLarsIC())

If you wish to pass a sample_weight parameter, you need to pass it as a fit parameter to each step of the pipeline as follows:

kwargs = {s[0] + '__sample_weight': sample_weight for s in model.steps}
model.fit(X, y, **kwargs)

Set parameter alpha to: original_alpha * np.sqrt(n_samples).

==================================


明日はこのエラーについて解析したいと思う。

また、処理に思ったより時間がかかった。


この記事が気に入ったらサポートをしてみませんか?