[][src]Function gbdt::input::infer

pub fn infer(file_name: &str) -> InputFormat

Function used for input file type inference. This can help recognize the file format. If the file is in csv type, this function also helps to check whether the csv file has header.

Example

use gbdt::input::infer;
let train_file = "dataset/iris/train.txt";
let fmt = infer(train_file);
println!("{}", fmt.to_string());