It'd be pretty straightforward to copy that fit_svm_linear function and switch out the kernel to support svm_rbf() and svm_poly(), but I'd prefer to reduce code duplication here. Is there any way we could just pass a string and switch() it to the right parameter function from linfa?
The choice of SVM kernel is hard-coded into our rust source:
https://github.com/simonpcouch/rinfa/blob/709b7882bfbec5e97d256dd4c1d9fa9358e176b8/src/rust/src/svm.rs#L36
It'd be pretty straightforward to copy that
fit_svm_linear
function and switch out the kernel to supportsvm_rbf()
andsvm_poly()
, but I'd prefer to reduce code duplication here. Is there any way we could just pass a string andswitch()
it to the right parameter function from linfa?