pub fn load_txt(file: &mut File, input_format: InputFormat) -> Result<DataVec>
Expand description

Load txt file.

Example

use std::fs::File;
use gbdt::input::{InputFormat, load_txt};
let test_file = "xgb-data/xgb_binary_logistic/agaricus.txt.test";
let mut file = File::open(test_file.to_string()).unwrap();
let mut fmt = InputFormat::csv_format();
fmt.set_feature_size(126);
fmt.set_delimeter(' ');
let test_dv = load_txt(&mut file, fmt);

Error

Raise error if file cannot be read correctly.