pub fn eval_est<Est: Estimator>(
    est: &mut Est,
    train_columns: &ArrayView2<'_, D>,
    train_target: &ArrayView1<'_, D>,
    val_columns: &ArrayView2<'_, D>,
    val_target: &ArrayView1<'_, D>) -> D {
    est.fit(train_columns, train_target);
    let preds = est.predict(val_columns);
    preds.mean_sq_err(val_target).unwrap() as D
}
/// Fit estimator on training data and calculate mean squared error on validation data.
Fit estimator on training data and calculate mean squared error on validation data.
Fit estimator on training data and calculate mean squared error on validation data .
pub fn eval_est<Est: Estimator>(
    est: &mut Est,
    train_columns: &ArrayView2<'_, D>,
    train_target: &ArrayView1<'_, D>,
    val_columns: &ArrayView2<'_, D>,
    val_target: &ArrayView1<'_, D>) -> D {
    est.fit(train_columns, train_target);
    let preds = est.predict(val_columns);
    preds.mean_sq_err(val_target).unwrap() as D
}
pub fn eval_est < Est : Estimator > ( est : & mut Est , train_columns : & ArrayView2 < ' _ , D > , train_target : & ArrayView1 < ' _ , D > , val_columns : & ArrayView2 < ' _ , D > , val_target : & ArrayView1 < ' _ , D > ) -> D { est . fit ( train_columns , train_target ) ; let preds = est . predict ( val_columns ) ; preds . mean_sq_err ( val_target ) . unwrap ( ) as D }
Fit estimator on training data and calculate mean squared error on validation data.
Fit estimator on training data and calculate mean squared error on validation data .
est
&mut Est
train_columns
&ArrayView2<'_, D>
train_target
&ArrayView1<'_, D>
val_columns
&ArrayView2<'_, D>
val_target
&ArrayView1<'_, D>
est
&mut Est
train_columns
&ArrayView2<'_, D>
train_target
&ArrayView1<'_, D>
val_columns
&ArrayView2<'_, D>
val_target
&ArrayView1<'_, D>