Struct rusty_machine::learning::toolkit::kernel::HyperTan [] [src]

pub struct HyperTan {
    pub alpha: f64,
    pub c: f64,
}

The Hyperbolic Tangent Kernel.

ker(x,y) = tanh(αxTy + c)

Fields

The scaling of the inner product.

The constant to add to the inner product.

Methods

impl HyperTan
[src]

Constructs a new Hyperbolic Tangent Kernel.

Examples

use rusty_machine::learning::toolkit::kernel;
use rusty_machine::learning::toolkit::kernel::Kernel;

// Construct a kernel with alpha = 1, c = 2.
let ker = kernel::HyperTan::new(1.0, 2.0);

println!("{0}", ker.kernel(&[1.,2.,3.], &[3.,4.,5.]));

Trait Implementations

impl Clone for HyperTan
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for HyperTan
[src]

impl Debug for HyperTan
[src]

Formats the value using the given formatter.

impl Default for HyperTan
[src]

Constructs a default Hyperbolic Tangent Kernel.

The defaults are:

Returns the "default value" for a type. Read more

impl Kernel for HyperTan
[src]

The kernel function. Read more