from isotree import IsolationForest data= [ np.random.rand(500, 10, 20, 30) ] data = data.reshape(data.shape[0], -1) scaler = StandardScaler() data_scaled = scaler.fit_transform(data) iso_forest = IsolationForest(ndim=100, sample_size='auto', max_depth='auto', ntrees=100, missing_action="fail", coefs="uniform", standardize_data=False) outliers = iso_forest.fit_predict(data_scaled) explainer = shap.TreeExplainer(iso_forest)
When I try to use TreeExplainer on isotree model , I got error for not supported by shap , but due to my data are time consuming on KernelExplainer , is there any way to get feature controbution by TreeExplainer? thanks
shap is a library that implements algorithms to work on models produced from other libraries, not the other way around. You might want to raise the issue with them instead.
from isotree import IsolationForest data= [ np.random.rand(500, 10, 20, 30) ] data = data.reshape(data.shape[0], -1) scaler = StandardScaler() data_scaled = scaler.fit_transform(data) iso_forest = IsolationForest(ndim=100, sample_size='auto', max_depth='auto', ntrees=100, missing_action="fail", coefs="uniform", standardize_data=False) outliers = iso_forest.fit_predict(data_scaled) explainer = shap.TreeExplainer(iso_forest)
When I try to use TreeExplainer on isotree model , I got error for not supported by shap , but due to my data are time consuming on KernelExplainer , is there any way to get feature controbution by TreeExplainer? thanks