feat: adds train/test split function; fixes bug in random forest

This commit is contained in:
Volodymyr Orlov
2020-09-13 16:23:30 -07:00
parent 1920f9cd0b
commit d28f13d849
9 changed files with 187 additions and 10 deletions
+9
View File
@@ -76,6 +76,15 @@ pub trait BaseVector<T: RealNumber>: Clone + Debug {
/// Return a vector with the elements of the one-dimensional array.
fn to_vec(&self) -> Vec<T>;
/// Create new vector with zeros of size `len`.
fn zeros(len: usize) -> Self;
/// Create new vector with ones of size `len`.
fn ones(len: usize) -> Self;
/// Create new vector of size `len` where each element is set to `value`.
fn fill(len: usize, value: T) -> Self;
}
/// Generic matrix type.