Interface for Parser.
More...
#include <dataset.h>
|
virtual | ~Parser () |
| virtual destructor
|
|
virtual void | ParseOneLine (const char *str, std::vector< std::pair< int, double > > *out_features, double *out_label) const =0 |
| Parse one line with label.
|
|
virtual int | TotalColumns () const =0 |
|
|
static Parser * | CreateParser (const char *filename, bool header, int num_features, int label_idx) |
| Create a object of parser, will auto choose the format depend on file.
|
|
◆ CreateParser()
Parser * LightGBM::Parser::CreateParser |
( |
const char * |
filename, |
|
|
bool |
header, |
|
|
int |
num_features, |
|
|
int |
label_idx |
|
) |
| |
|
static |
Create a object of parser, will auto choose the format depend on file.
- Parameters
-
filename | One Filename of data |
num_features | Pass num_features of this data file if you know, <=0 means don't know |
label_idx | index of label column |
- Returns
- Object of parser
◆ ParseOneLine()
virtual void LightGBM::Parser::ParseOneLine |
( |
const char * |
str, |
|
|
std::vector< std::pair< int, double > > * |
out_features, |
|
|
double * |
out_label |
|
) |
| const |
|
pure virtual |
The documentation for this class was generated from the following files:
- External/LightGBM_2.2.3/LightGBM-2.2.3/include/LightGBM/dataset.h
- External/LightGBM_2.2.3/LightGBM-2.2.3/src/io/parser.cpp