Rust icon indicating copy to clipboard operation
Rust copied to clipboard

Suggestion: Adding Loss functions of Machine Learning in maths folder

Open GreatRSingh opened this issue 2 years ago • 20 comments

I would like to suggest adding Loss functions in this repo.

The loss function estimates how well a particular algorithm models the provided data.

Add Loss Functions to: machine_learning/loss_functions

Task List:

  • [x] Cross-Entropy
  • [x] Hinge loss
  • [x] Huber loss.
  • [x] MSE
  • [ ] NLL
  • [x] MAE
  • [ ] Marginal Ranking
  • [x] KL Divergence

GreatRSingh avatar Oct 09 '23 19:10 GreatRSingh

Hi @GreatRSingh , Thanks for the suggestion. Just to give an update, Some of them already implemented in maths section. Please check that. I have taken this up to add as many functions as possible.

Navaneeth-Sharma avatar Oct 10 '23 03:10 Navaneeth-Sharma

@Navaneeth-Sharma Can you put up a list of loss functions that you are going to implement and which you have already implemented?

GreatRSingh avatar Oct 10 '23 04:10 GreatRSingh

Sorry @GreatRSingh , I think I miss read loss as activation functions. Loss functions aren't implemented. But have a plans to do that specially the basic ones like Cross Entropy, MSE, RMSE. You can take it up some of those, if you like to contribute.

Navaneeth-Sharma avatar Oct 10 '23 12:10 Navaneeth-Sharma

@Navaneeth-Sharma ok I will do that.

GreatRSingh avatar Oct 10 '23 13:10 GreatRSingh

Hi, Just an info so that we dont implement the same losses, I will try to take up these loss functions

  • Cross-Entropy loss (bin class, multi class)
  • Hinge loss
  • Huber loss. Let me know if any of them are already taken @GreatRSingh

Navaneeth-Sharma avatar Oct 10 '23 18:10 Navaneeth-Sharma

@Navaneeth-Sharma No none of them are already taken.

I will take up MSE, NLL, MAE, MarginRanking, KLDivergence.

GreatRSingh avatar Oct 10 '23 18:10 GreatRSingh

@Navaneeth-Sharma @siriak I have added a list of Loss Functions in the description. Keep Suggesting any other if needed.

GreatRSingh avatar Oct 11 '23 21:10 GreatRSingh

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 20 '23 00:11 github-actions[bot]

Working on adding Hinge Loss

GreatRSingh avatar Nov 20 '23 17:11 GreatRSingh

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 22 '23 00:12 github-actions[bot]

Are all these functions taken ?

mobley-trent avatar Jan 04 '24 18:01 mobley-trent

No, you can start working on them.

On Fri, Jan 5, 2024, 12:21 AM Eddy Oyieko @.***> wrote:

Are all these functions taken ?

— Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/Rust/issues/559#issuecomment-1877597795, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY6WHSWG3XIZJPTNJ44IDLYM32Z5AVCNFSM6AAAAAA5ZIPZLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGU4TONZZGU . You are receiving this because you were mentioned.Message ID: @.***>

GreatRSingh avatar Jan 04 '24 18:01 GreatRSingh

Opened a PR to add KL divergence loss as a sub task of this issue. #656 Kindly review.

avats-dev avatar Jan 09 '24 18:01 avats-dev

I have opened a PR that implements Huber loss function, which is mentioned is this issue #697 :rocket:. Let's take a look on this PR :hugs:.

sozelfist avatar Mar 23 '24 15:03 sozelfist

Are there any function that can still be worked on?

jkauerl avatar May 29 '24 08:05 jkauerl

I think NLL and Marginal Ranking from the list are still not implemented

siriak avatar May 29 '24 10:05 siriak

Finished implementing both, but have a question regarding the PR. Should I open 2 separate PR's or 1 PR containing both algorithms?

jkauerl avatar Jun 02 '24 20:06 jkauerl

2 separate PRs please

siriak avatar Jun 03 '24 06:06 siriak

When opening a PR, please make sure that your PR is on a separate branch like feat/ml/loss/nll{marginal_ranking} instead of the master branch (on your fork). This helps the git history clean and avoid accidents when merging the code from the original to your fork repository. Please commit changes with meaningful messages that reflect changes on the source code, not try to make many redundant commits for a single change.

sozelfist avatar Jun 03 '24 07:06 sozelfist