//! Utility routines for loading and storing data into files. use ndarray::prelude::*; use std::error::Error; use std::collections::HashMap; use csv::ReaderBuilder; use std::str::FromStr; use std::f64; use crate::Label; /// Loads a CSV data file. /// /// The file format should be, for each row: /// label, x1, x2, ... /// where x1, x2, ... are features forming a feature vector. pub fn load_data(fname: &str) -> Result<(Array2, Array1