Skip to content

Commit

Permalink
Filter data to measurement parameters only when initializing from rec…
Browse files Browse the repository at this point in the history
…ommender
  • Loading branch information
Alex6022 committed Jan 13, 2025
1 parent e075b9e commit bf9cf2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion baybe/insights/shap.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ def from_recommender(
searchspace, objective, measurements
)

data = measurements[[p.name for p in searchspace.parameters]]

return cls.from_surrogate(
surrogate_model,
searchspace.transform(measurements) if use_comp_rep else measurements,
searchspace.transform(data) if use_comp_rep else data,
explainer_cls=explainer_cls,
use_comp_rep=use_comp_rep,
)
Expand Down

0 comments on commit bf9cf2b

Please sign in to comment.