Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TST Add array API continuous metric common tests#32793

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
lucyleeow wants to merge3 commits intoscikit-learn:main
base:main
Choose a base branch
Loading
fromlucyleeow:tst_continuous_bin_aapi

Conversation

@lucyleeow
Copy link
Member

Reference Issues/PRs

Ref:https://github.com/scikit-learn/scikit-learn/pull/32422/files#r2548690179

What does this implement/fix? Explain your changes.

Moves the array API tests for continuous metrics added in#32422 totest_common.py, so they can be re-used for other continuous metrics (e.g.,#32626)

Any other comments?

cc@OmarManzoor

@github-actions
Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit:f47ace0. Link to the linter CI:here

Copy link
Contributor

@OmarManzoorOmarManzoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the PR@lucyleeow

if"brier"inmetric.__name__:
# `brier_score_loss` and `d2_brier_score` require specifying the
# `pos_label`
metric_kwargs["pos_label"]="yes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is not needed for the multi class case.

@lucyleeow
Copy link
MemberAuthor

@OmarManzoor I've just realised the stringy_true tests are to check for mixed array inputs.

I am wondering whether we separate testing of:

  • support for mixed array input, and
  • support for array API - i.e. result is the same when using numpy vs xp

I've actually have a PR to add a common test to check for mixed array input support:#32755. It means that:

  • we can check for the specific array conversion combinations we wish to
    • it also allows us to check for non-numpy to numpy conversion, which this particular set up does not
  • avoids us amending current common metric tests to add mixed array input tests
    • the separation also makes it also easier to test, as not all metrics will support mixed input during the process of adding support

cc@ogrisel for your thoughts too.

@OmarManzoor
Copy link
Contributor

@OmarManzoor I've just realised the stringy_true tests are to check for mixed array inputs.

I am wondering whether we separate testing of:

  • support for mixed array input, and
  • support for array API - i.e. result is the same when using numpy vs xp

I've actually have a PR to add a common test to check for mixed array input support:#32755. It means that:

  • we can check for the specific array conversion combinations we wish to

    • it also allows us to check for non-numpy to numpy conversion, which this particular set up does not
  • avoids us amending current common metric tests to add mixed array input tests

Yes that should be good I think. The reason the tests fory_true being strings were added in the same test was because we wanted to support that for these metrics. I think you can separate them out now considering the other PR related to mixed types.

lucyleeow reacted with thumbs up emoji

@lucyleeow
Copy link
MemberAuthor

Thanks@OmarManzoor ! I think I need to push#32755 first, before this can go in.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OmarManzoorOmarManzoorOmarManzoor left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Projects

Status: In Progress

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@lucyleeow@OmarManzoor

[8]ページ先頭

©2009-2025 Movatter.jp