Move to enum Kernels instead of Structs for hypertuning - #169
montanalow wants to merge 4 commits into
Conversation
|
This is a breaking change, so may require more thought on the approach. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #169 +/- ##
===============================================
+ Coverage 84.47% 84.51% +0.03%
===============================================
Files 86 86
Lines 9940 9946 +6
===============================================
+ Hits 8397 8406 +9
+ Misses 1543 1540 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
please add the breaking change to the CHANGESLOG |
|
I think that having the I tried that approach in #181 Let me know if that is enough for your use case @montanalow On the other hand, it looks like the original test is failing. Can you check that in your branch? |
Mec-iS
left a comment
There was a problem hiding this comment.
Please adapt these changes to the new code in development.
Kernel is now an object-safe trait. Making an enum of Kernels had been a problem for me because a match expression needs to return the same type. I tried different options but for sure there is something I am missing:
pun enum Kernels {
Linear(LinearKernel),
RBF(RBFKernel)
...
}
match kernel {
Linear => LinearKernel::default(), // this returns a LinearKernel type
RBF => RBFkernel::default(), // this returns a RBFKernel type
...
}
SVCSearchParameters currently uses a Vec for kernels, which means you can't search across multiple kernel types at the same time. This PR converts K to an enum Kernel type, instead of a generic type, so that multiple kinds of kernels may be compared in the same grid search.