pub struct Rvm { /* private fields */ }Expand description
A fitted kernel Relevance Vector Machine.
Implementations§
Source§impl Rvm
impl Rvm
Sourcepub fn fit(
x: &[f64],
n: usize,
d: usize,
t: &[f64],
config: RvmConfig,
) -> CsResult<Self>
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
CsError::InvalidParameterforn == 0,d == 0, or a non-positive RBF length-scale.CsError::ShapeMismatch/CsError::DimensionMismatchon bad shapes.
Sourcepub fn n_relevance(&self) -> usize
pub fn n_relevance(&self) -> usize
Number of relevance vectors retained (excludes the bias term).
Sourcepub fn predict_one(&self, query: &[f64]) -> CsResult<f64>
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.
Trait Implementations§
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> 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