Skip to content

Commit

Permalink
Update params in inspector + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fraimondo committed Oct 17, 2024
1 parent b68a457 commit d290cfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/99_docs/run_model_inspection_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
for fold_inspector in inspector.folds:
fold_model = fold_inspector.model
c_values.append(
fold_model.get_fitted_params()["svm__model_"].get_params()["C"]
fold_model.get_fitted_params()["svm__C"]
)

##############################################################################
Expand Down
5 changes: 4 additions & 1 deletion julearn/inspect/_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ def get_fitted_params(self):
),
}

return {
private_params = {
param: val
for param, val in all_params.items()
if re.match(r"^[a-zA-Z].*[a-zA-Z0-9]*_$", param)
}
out = self.get_params()
out.update(private_params)
return out

@property
def estimator(self):
Expand Down

0 comments on commit d290cfe

Please sign in to comment.