TheAlgorithms / Rust

All Algorithms implemented in Rust
MIT License
22.21k stars 2.17k forks source link

Implementation of Marginal Ranking Loss Function #733

Closed jkauerl closed 3 months ago

jkauerl commented 4 months 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.

codecov-commenter commented 4 months ago

Codecov Report

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

Project coverage is 94.95%. Comparing base (1d9c510) to head (30f8b05). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #733 +/- ## ======================================= Coverage 94.95% 94.95% ======================================= Files 303 304 +1 Lines 22533 22549 +16 ======================================= + Hits 21396 21412 +16 Misses 1137 1137 ```

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

vil02 commented 4 months ago

Let's first focus on #734.