Struct rusty_machine::learning::toolkit::kernel::Multiquadric
[−]
[src]
pub struct Multiquadric { pub c: f64, }
The Multiquadric Kernel.
k(x,y) = sqrt(||x-y||2 + c2)
Fields
c: f64
Constant added to square of difference.
Methods
impl Multiquadric
[src]
fn new(c: f64) -> Multiquadric
Constructs a new Multiquadric Kernel.
Examples
use rusty_machine::learning::toolkit::kernel; use rusty_machine::learning::toolkit::kernel::Kernel; // Construct a kernel with c = 2. let ker = kernel::Multiquadric::new(2.0); println!("{0}", ker.kernel(&[1.,2.,3.], &[3.,4.,5.]));
Trait Implementations
impl Clone for Multiquadric
[src]
fn clone(&self) -> Multiquadric
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 Multiquadric
[src]
impl Debug for Multiquadric
[src]
impl Default for Multiquadric
[src]
Constructs a default Multiquadric Kernel.
The defaults are:
- c = 0
fn default() -> Multiquadric
Returns the "default value" for a type. Read more