feat: + cross_validate, trait Predictor, refactoring
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
//! use smartcore::algorithm::neighbour::cover_tree::*;
|
||||
//! use smartcore::math::distance::Distance;
|
||||
//!
|
||||
//! #[derive(Clone)]
|
||||
//! struct SimpleDistance {} // Our distance function
|
||||
//!
|
||||
//! impl Distance<i32, f64> for SimpleDistance {
|
||||
@@ -453,7 +454,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::math::distance::Distances;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
struct SimpleDistance {}
|
||||
|
||||
impl Distance<i32, f64> for SimpleDistance {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
//! use smartcore::algorithm::neighbour::linear_search::*;
|
||||
//! use smartcore::math::distance::Distance;
|
||||
//!
|
||||
//! #[derive(Clone)]
|
||||
//! struct SimpleDistance {} // Our distance function
|
||||
//!
|
||||
//! impl Distance<i32, f64> for SimpleDistance {
|
||||
@@ -137,6 +138,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::math::distance::Distances;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
struct SimpleDistance {}
|
||||
|
||||
impl Distance<i32, f64> for SimpleDistance {
|
||||
|
||||
Reference in New Issue
Block a user