Struct rusty_machine::learning::toolkit::kernel::Linear
[−]
[src]
pub struct Linear { pub c: f64, }
The Linear Kernel
k(x,y) = xTy + c
Fields
c: f64
Constant term added to inner product.
Methods
impl Linear
[src]
fn new(c: f64) -> Linear
Constructs a new Linear Kernel.
Examples
use rusty_machine::learning::toolkit::kernel; use rusty_machine::learning::toolkit::kernel::Kernel; let ker = kernel::Linear::new(5.0); println!("{0}", ker.kernel(&[1.,2.,3.], &[3.,4.,5.]));
Trait Implementations
impl Clone for Linear
[src]
fn clone(&self) -> Linear
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Linear
[src]
impl Debug for Linear
[src]
impl Default for Linear
[src]
Constructs the default Linear Kernel
The defaults are:
- c = 0