QuickRank
v2.0
QuickRank: A C++ suite of Learning to Rank algorithms
|
This class implements IO on Svml files. More...
#include <svml.h>
Public Member Functions | |
Svml () | |
Creates a new Svml IO reader/writer. More... | |
virtual | ~Svml () |
virtual std::unique_ptr< data::Dataset > | read_horizontal (const std::string &file) |
Reads the input dataset and returns in horizontal format. More... | |
virtual void | write (std::shared_ptr< data::Dataset >, const std::string &file) |
Write the dataset to an output file. More... | |
Private Member Functions | |
virtual std::ostream & | put (std::ostream &os) const |
Prints the data reading time stats. More... | |
Private Attributes | |
double | reading_time_ = 0.0 |
double | processing_time_ = 0.0 |
long | file_size_ = 0 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Svml &me) |
The output stream operator. More... | |
This class implements IO on Svml files.
SVML format is as follows:
<line> .=. <target> qid:<qid> <feature>:<value> <feature>:<value> ... <feature>:<value> # <info> <target> .=. <float> <qid> .=. <positive integer> <feature> .=. <positive integer> <value> .=. <float> <info> .=. <string>
|
inline |
Creates a new Svml IO reader/writer.
k | The cut-off threshold. |
|
inlinevirtual |
|
privatevirtual |
Prints the data reading time stats.
|
virtual |
Reads the input dataset and returns in horizontal format.
file | the input filename. |
|
virtual |
Write the dataset to an output file.
file | the output filename. |
|
friend |
The output stream operator.
Prints the data reading time stats.
|
private |
|
private |
|
private |