[−][src]Function bhtsne::load_csv
pub fn load_csv(
file_path: &str,
has_headers: bool,
has_target: bool,
target_hd: &str,
target_col: usize
) -> (Vec<f64>, Option<Vec<String>>)
Loads data from a csv file.
Arguments
-
file_path
- An&str
that specifies the path of the file to load the data from. -
has_headers
- Abool
value that specifies if the file has headers or not. ifhas_headers
andhas_target
are set totrue
the function will locate the column specified bytarget_hd
and will parse all of that column's records as data labels thus putting them in the second vector of the result's pair; in this casetarget_col
will be ignored. Ifhas_headers
is set tofalse
andhas_target
is specified,target_col
will be used for the same purpose. When the csv has no target and no headershas_headers
must be set tofalse
or else the first record of the file won't be parsed. -
has_target
- Abool
value that specifies if the file has a target column or not. -
target_hd
- An&str
that specifies the target header of the file. -
target_col
- Ausize
that specifies the target column of the file.