Created
June 29, 2021 15:15
-
-
Save Steboss89/8f4541c50e0cd5e20efc47795da27d59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
// Read input data | |
let ifile = "Boston.csv"; | |
// read and return a dataframe | |
let df = read_csv(&ifile).unwrap(); | |
// size and shape | |
let height = df.height(); | |
let cols = df.width(); | |
// select features | |
let (features, target) = feature_and_target(&df); | |
//println!("{:#?}", features.unwrap()); | |
// convert to array | |
let features_res = features.unwrap().to_ndarray::<Float64Type>().unwrap(); | |
let target_array = target.unwrap().to_ndarray::<Float64Type>().unwrap(); | |
let (x_train, x_test, y_train, y_test) = train_test_split(&features_res, &target_array, 0.3, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment