Open ronniec95 opened 1 week ago
After eventually deciphering the error message it's essentially saying that the ParamGuard trait is not implemented for all the SvmValidParams
Fix is (probably) In hyperparameters.rs
impl<F: Float, O> ParamGuard for SvmValidParams<F, O> {
type Checked = SvmValidParams<F, O>;
type Error = SvmError;
fn check_ref(&self) -> Result<&Self::Checked, SvmError> {
Ok(&self)
}
fn check(self) -> Result<Self::Checked, SvmError> {
self.check_ref()?;
Ok(self)
}
}
This is a true fix as really it should call all the parameters (kernal,solver,platt) and check them - which need their own implementations of ParamGuard; but I'm not clever enough to do those.
I have a simple struct for setting some params and creating an SVR model
The above works fine but changing the type to F: Float like this
errors with
How do I express the missing trait bounds or get this to work with numeric types?
EDIT: Example rewritten to minimal self contained sample