mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
train-operator-model.cpp File Reference
#include "storage/store_manip.hpp"
#include "util/GridSearch.hpp"
#include <Eigen/LU>
#include <fstream>
#include <iostream>
#include <mutable/catalog/Catalog.hpp>
#include <mutable/catalog/CostModel.hpp>
#include <mutable/IR/Operator.hpp>
#include <mutable/Options.hpp>
#include <mutable/util/ArgParser.hpp>
Include dependency graph for train-operator-model.cpp:

Go to the source code of this file.

Macros

#define ADD(TYPE, VAR, INIT, SHORT, LONG, DESCR, CALLBACK)
 

Typedefs

typedef Matrix< double, Dynamic, Dynamic, RowMajor > RowMatrixXd
 Parses csv file and returns a pair of matrices.
 

Functions

std::pair< RowMatrixXd, VectorXd > load_csv (const char *csv_path)
 
template<typename T >
CostModel load_filter_cost_model (const char *csv_path, unsigned degree=9)
 Load a cost model for the filter operator from a file.
 
template<typename T >
CostModel load_cost_model (const char *csv_path)
 Load a cost model for an operator without transformations from a file.
 
void usage (std::ostream &out, const char *name)
 
int main (int argc, const char **argv)
 

Macro Definition Documentation

◆ ADD

#define ADD (   TYPE,
  VAR,
  INIT,
  SHORT,
  LONG,
  DESCR,
  CALLBACK 
)
Value:
VAR = INIT;\
{\
AP.add<TYPE>(SHORT, LONG, DESCR, CALLBACK);\
}
#define CALLBACK(NAME, FUNC)

Typedef Documentation

◆ RowMatrixXd

typedef Matrix<double, Dynamic, Dynamic, RowMajor> RowMatrixXd

Parses csv file and returns a pair of matrices.

The first matrix contains the feature values and the second matrix is a vector containing the target values.

Definition at line 20 of file train-operator-model.cpp.

Function Documentation

◆ load_cost_model()

template<typename T >
CostModel load_cost_model ( const char *  csv_path)

Load a cost model for an operator without transformations from a file.

Definition at line 109 of file train-operator-model.cpp.

◆ load_csv()

std::pair< RowMatrixXd, VectorXd > load_csv ( const char *  csv_path)

Definition at line 21 of file train-operator-model.cpp.

◆ load_filter_cost_model()

template<typename T >
CostModel load_filter_cost_model ( const char *  csv_path,
unsigned  degree = 9 
)

Load a cost model for the filter operator from a file.

Definition at line 73 of file train-operator-model.cpp.

References M_insist.

◆ main()

int main ( int  argc,
const char **  argv 
)

Definition at line 142 of file train-operator-model.cpp.

References ADD, args, m::Catalog::Get(), and show_help.

◆ usage()

void usage ( std::ostream &  out,
const char *  name 
)

Definition at line 135 of file train-operator-model.cpp.