-
Notifications
You must be signed in to change notification settings - Fork 101
feat: Rename estimator_reports_ to reports_ in CrossValidationReport
#1838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MarieSacksick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly ok for me, just one addition I don't understand.
| y_pred=y_pred, | ||
| report_type="comparison-estimator", | ||
| estimators=[report.estimator_ for report in self._parent.reports_], | ||
| estimator_names=self._parent.report_names_, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't output estimator names but the cross validation report names if given when building the - can you remove this line please?
This is already handled, if you check this code:
# %%
from sklearn.datasets import make_classification
from sklearn.ensemble import HistGradientBoostingClassifier
from skore import ComparisonReport, CrossValidationReport
# %%
X, y = make_classification(n_samples=1000, n_features=20, random_state=42)
# %%
cv_rep1 = CrossValidationReport(
HistGradientBoostingClassifier(),
X,
y,
)
# %%
cv_rep2 = CrossValidationReport(
HistGradientBoostingClassifier(learning_rate=1),
X,
y,
)
# %%
comp_named = ComparisonReport(
{"cv_1": cv_rep1, "cv_2": cv_rep2},
)
# %%
comp_named.metrics.roc().plot()
| for estimator_report in report.estimator_reports_ | ||
| for estimator_report in report.reports_ | ||
| ], | ||
| estimator_names=self._parent.report_names_, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just like above, can you remove this line please?
| *, | ||
| report_type: ReportType, | ||
| estimators: Sequence[BaseEstimator], | ||
| estimator_names: list[str], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this new parameter in this function? I don't see where it's used.
|
Some conflicts need to be solved here. |
|
Superseded by #2033 |
Closes #1760
Hi @MarieSacksick , @glemaitre !
I've renamed
estimator_reports_toreports_throughout theCrossValidationReportclass, aligning the API withComparisonReport.Solved the pickling error by introducing
allow_nested = Falseinside inprogress_decoratorof function_compute_metric_scoresinmetrics_acessor.pyandallow_nested = Truein_progress_bar.py.Add the requested unittest in
test_progress_bar.py.If I missed something kindly let me know
Thank You !