Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
LightGBM::TSVParser Class Reference
Inheritance diagram for LightGBM::TSVParser:
LightGBM::Parser

Public Member Functions

 TSVParser (int label_idx, int total_columns)
 
void ParseOneLine (const char *str, std::vector< std::pair< int, double > > *out_features, double *out_label) const override
 Parse one line with label.
 
int TotalColumns () const override
 
- Public Member Functions inherited from LightGBM::Parser
virtual ~Parser ()
 virtual destructor
 

Additional Inherited Members

- Static Public Member Functions inherited from LightGBM::Parser
static ParserCreateParser (const char *filename, bool header, int num_features, int label_idx)
 Create a object of parser, will auto choose the format depend on file.
 

Member Function Documentation

◆ ParseOneLine()

void LightGBM::TSVParser::ParseOneLine ( const char *  str,
std::vector< std::pair< int, double > > *  out_features,
double *  out_label 
) const
inlineoverridevirtual

Parse one line with label.

Parameters
strOne line record, string format, should end with '\0'
out_featuresOutput columns, store in (column_idx, values)
out_labelLabel will store to this if exists

Implements LightGBM::Parser.

◆ TotalColumns()

int LightGBM::TSVParser::TotalColumns ( ) const
inlineoverridevirtual

Implements LightGBM::Parser.


The documentation for this class was generated from the following file: