feat: adds e-SVR

This commit is contained in:
Volodymyr Orlov
2020-10-15 16:23:26 -07:00
parent bb96354363
commit 20e58a8817
8 changed files with 719 additions and 2 deletions
+10
View File
@@ -85,6 +85,12 @@ pub trait BaseVector<T: RealNumber>: Clone + Debug {
/// Create new vector of size `len` where each element is set to `value`.
fn fill(len: usize, value: T) -> Self;
/// Vector dot product
fn dot(&self, other: &Self) -> T;
/// Returns True if matrices are element-wise equal within a tolerance `error`.
fn approximate_eq(&self, other: &Self, error: T) -> bool;
}
/// Generic matrix type.
@@ -110,6 +116,10 @@ pub trait BaseMatrix<T: RealNumber>: Clone + Debug {
/// * `row` - row number
fn get_row_as_vec(&self, row: usize) -> Vec<T>;
/// Get the `row`'th row
/// * `row` - row number
fn get_row(&self, row: usize) -> Self::RowVector;
/// Copies a vector with elements of the `row`'th row into `result`
/// * `row` - row number
/// * `result` - receiver for the row