TheAlgorithms / Rust

All Algorithms implemented in Rust
MIT License
21.51k stars 2.1k forks source link

Implementation of Marginal Ranking Loss Function #742

Open jkauerl opened 3 weeks ago

jkauerl commented 3 weeks ago

Pull Request Template

Description

PR including the implementation for the Marginal Ranking Loss Function of this issue #559 . It creates a new file called marginal_ranking.rs with the function called mrg_ranking_loss. This implementation is inspired on the documentation of PyTorch of Marginal Ranking.

Type of change

Checklist:

PD: Im new to Rust and Open Source so I would love a clarification regarding the items I did not checked. Also let me know if I should squash the commits. Last PR had a wrong branch name #733.

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.03%. Comparing base (1d9c510) to head (2fe3de7). Report is 5 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #742 +/- ## ========================================== + Coverage 94.95% 95.03% +0.08% ========================================== Files 303 304 +1 Lines 22533 22638 +105 ========================================== + Hits 21396 21515 +119 + Misses 1137 1123 -14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.