Skip to content

Conversation

relf
Copy link
Member

@relf relf commented Jan 23, 2025

This PR fixes and clarifies the SVR parameterization with regards to the original libsvm code
before:

  • nu_eps(nu, eps) was wrongly wired: eps was used for nu and nu for c
  • c_eps(c, eps) is confusing: eps refers is epsilon of the inner loss function while there is also an epsilon used for the solver
    after:
  • nu_svr(nu, Option<c>) replaces deprecated nu_eps(), optional parameter default is 1. as in libsvm
  • c_svr(c, Option<loss_eps>) replaces deprecated c_eps() second optional parameter default is 0.1 as in libsvm
  • the epsilon of the solver is set through SolverParams::epsilon() as before
  • Bump linfa-svm version to 0.7.2

Fixes #317

@relf relf marked this pull request as ready for review January 24, 2025 09:27
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 34.93%. Comparing base (936680a) to head (0192092).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
algorithms/linfa-svm/src/hyperparams.rs 7.69% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   34.78%   34.93%   +0.15%     
==========================================
  Files          96       96              
  Lines        6324     6334      +10     
==========================================
+ Hits         2200     2213      +13     
+ Misses       4124     4121       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@relf
Copy link
Member Author

relf commented Jan 27, 2025

Not sure to understand why codecov/patch is not happy. The missing lines should be covered by tests in regression.rs, so... @quietlychris, @xd009642, any idea?

@relf relf merged commit a30e5f1 into rust-ml:master Jan 29, 2025
21 of 22 checks passed
@relf relf deleted the fix-svr branch January 29, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is the nu parameter used incorrectly, for svm regression?
1 participant