Skater icon indicating copy to clipboard operation
Skater copied to clipboard

better plotting api for setting axes, comparing multiple models

Open aikramer2 opened this issue 8 years ago • 0 comments

This pattern is enabled for FI but not for pdps:

f, axes = plt.subplots(2,2, figsize = (16, 16))

ax_dict = {
    'mlp':axes[0][0],
    'knn':axes[1][0],
    'reg':axes[0][1],
    'gb':axes[1][1]
}

interpreter = Interpretation()
interpreter.load_data(X_test, feature_names=data.feature_names)
for model_key in models:
    pyint_model = InMemoryModel(models[model_key].predict_proba, examples=X_train)
    ax = ax_dict[model_key]
    interpreter.feature_importance.plot_feature_importance(pyint_model, ax=ax)
    ax.set_title(model_key)

aikramer2 avatar Apr 10 '17 19:04 aikramer2