Skip to main content

Rvm

Struct Rvm 

Source
pub struct Rvm { /* private fields */ }
Expand description

A fitted kernel Relevance Vector Machine.

Implementations§

Source§

impl Rvm

Source

pub fn fit( x: &[f64], n: usize, d: usize, t: &[f64], config: RvmConfig, ) -> CsResult<Self>

Fit a kernel RVM to n training points x ∈ ℝ^{n×d} (row-major) and targets t.

§Errors
Source

pub fn n_relevance(&self) -> usize

Number of relevance vectors retained (excludes the bias term).

Source

pub fn noise_std(&self) -> f64

Estimated noise standard deviation σ = 1/√β.

Source

pub fn predict_one(&self, query: &[f64]) -> CsResult<f64>

Predict the target at a single query input x⋆ ∈ ℝ^d.

§Errors

CsError::DimensionMismatch if query.len() != d.

Source

pub fn predict(&self, queries: &[f64], n_q: usize) -> CsResult<Vec<f64>>

Predict targets for n_q query points x ∈ ℝ^{n_q×d} (row-major).

§Errors

CsError::ShapeMismatch if queries.len() != n_q * d.

Trait Implementations§

Source§

impl Clone for Rvm

Source§

fn clone(&self) -> Rvm

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rvm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Rvm

§

impl RefUnwindSafe for Rvm

§

impl Send for Rvm

§

impl Sync for Rvm

§

impl Unpin for Rvm

§

impl UnsafeUnpin for Rvm

§

impl UnwindSafe for Rvm

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.