Skip to content
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

Row-wise sample weighting #563

Open
alex-smith-bind opened this issue Oct 30, 2024 · 1 comment
Open

Row-wise sample weighting #563

alex-smith-bind opened this issue Oct 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alex-smith-bind
Copy link

Feature request

Sample (row-by-row) weighting.

What is the expected behavior?

Row-wise sample weights can be specified and applied during training.

What is motivation or use case for adding/changing the behavior?

This will allow one to provide weights based on business knowledge of confidence in the labels.

How should this be implemented in your opinion?

The weights can be applied in the loss function and metric function. The loss can be specified with reduction='none' so the weights can be applied per sample and then a weighted average across the batch is taken.

Mods are needed to accommodate the extra weight data in addition to the X and y data.

Are you willing to work on this yourself?

Yes. I have created a branch in a private copy of the repo and have a version of the logic nearly working. I would like to contribute this to the project because I believe it may be useful to others. I need access in order to push my branch so I can create a PR when it is ready. Is there anyone I could communicate with to discuss my approach? It looks like the Slack channel is defunct.

@alex-smith-bind alex-smith-bind added the enhancement New feature or request label Oct 30, 2024
@Optimox
Copy link
Collaborator

Optimox commented Oct 31, 2024

you do not need any specific access to push a PR, I would be happy to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants