Expand description

This module implements the data loader.

Currently we support to kind of input format: csv format and libsvm data format.

Example

LibSVM format

use gbdt::input::InputFormat;
use gbdt::input;
let test_file = "data/xgb_binary_logistic/agaricus.txt.test";
let mut fmt = input::InputFormat::txt_format();
fmt.set_feature_size(126);
fmt.set_delimeter(' ');
let test_data = input::load(test_file, fmt);

CSV format

use gbdt::input::InputFormat;
use gbdt::input;
let test_file = "data/xgb_multi_softmax/dermatology.data.test";
let mut fmt = InputFormat::csv_format();
fmt.set_feature_size(34);
let test_data = input::load(test_file, fmt);

Structs

The input file format struct.

Enums

This enum type defines the data file format.

Functions

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.
Load file with certain input format.
Load csv file.
Load txt file.