pub struct SVMlightModel {
pub name: String,
pub category: PredictionCategory,
pub vectors: Vec<SupportVector>,
pub bias: f64,
pub encoding: FeatureEncoding,
pub kernel_type: KernelType,
pub kernel: Box<dyn Kernel>,
}Fields§
§name: String§category: PredictionCategory§vectors: Vec<SupportVector>§bias: f64§encoding: FeatureEncoding§kernel_type: KernelType§kernel: Box<dyn Kernel>Implementations§
Source§impl SVMlightModel
impl SVMlightModel
pub fn new( name: String, category: PredictionCategory, vectors: Vec<SupportVector>, bias: f64, encoding: FeatureEncoding, kernel_type: KernelType, gamma: f64, ) -> Self
pub fn predict(&self, vec: &FeatureVector) -> Result<f64, NrpsError>
pub fn encode(&self, sequence: &String) -> Vec<f64>
pub fn predict_seq(&self, sequence: &String) -> Result<f64, NrpsError>
pub fn from_handle<R>(
handle: R,
name: String,
category: PredictionCategory,
) -> Result<Self, NrpsError>where
R: Read,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SVMlightModel
impl !RefUnwindSafe for SVMlightModel
impl !Send for SVMlightModel
impl !Sync for SVMlightModel
impl Unpin for SVMlightModel
impl !UnwindSafe for SVMlightModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more