Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::Simpl::Inexact_simplifier Class Reference

#include <inexact.h>

Collaboration diagram for Brush::Simpl::Inexact_simplifier:

Public Member Functions

void init (int hashSize, const Dataset &data, int numPlanes)
template<ProgramType P>
void analyze_tree (Program< P > &program, const SearchSpace &ss, const Dataset &d)
template<ProgramType P>
Program< P > simplify_tree (Program< P > &program, const SearchSpace &ss, const Dataset &d, SimplificationRecords *records=nullptr)
 Inexact_simplifier ()
 ~Inexact_simplifier ()
template<ProgramType P>
void index (TreeIter &spot, const Dataset &d)
void log_simplification_table (Util::CsvWriter &log, const string &run_id)
 dumps every stored expression. Expects a writer opened with simplification_table_header.

Public Attributes

int inputDim = 1000

Static Public Attributes

static const vector< string > simplification_table_header

Private Member Functions

template<ProgramType P>
vector< size_t > hash (TreeIter &spot, const Dataset &d)
template<ProgramType P>
optional< vector< tree< Node > > > query (TreeIter &spot, const Dataset &d)
string dt_to_string (DataType dt)

Private Attributes

std::unordered_map< DataType, HashStorage > equivalentExpressions
vector< MatrixXf > uniformPlanes

Detailed Description

Definition at line 126 of file inexact.h.

Constructor & Destructor Documentation

◆ Inexact_simplifier()

Brush::Simpl::Inexact_simplifier::Inexact_simplifier ( )

Definition at line 14 of file inexact.cpp.

◆ ~Inexact_simplifier()

Brush::Simpl::Inexact_simplifier::~Inexact_simplifier ( )

Definition at line 47 of file inexact.cpp.

Member Function Documentation

◆ analyze_tree()

template<ProgramType P>
void Brush::Simpl::Inexact_simplifier::analyze_tree ( Program< P > & program,
const SearchSpace & ss,
const Dataset & d )
inline

Definition at line 136 of file inexact.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dt_to_string()

string Brush::Simpl::Inexact_simplifier::dt_to_string ( DataType dt)
inlineprivate

Definition at line 416 of file inexact.h.

Here is the caller graph for this function:

◆ hash()

template<ProgramType P>
vector< size_t > Brush::Simpl::Inexact_simplifier::hash ( TreeIter & spot,
const Dataset & d )
inlineprivate

Definition at line 306 of file inexact.h.

Here is the caller graph for this function:

◆ index()

template<ProgramType P>
void Brush::Simpl::Inexact_simplifier::index ( TreeIter & spot,
const Dataset & d )
inline

Definition at line 270 of file inexact.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void Brush::Simpl::Inexact_simplifier::init ( int hashSize,
const Dataset & data,
int numPlanes )

Definition at line 19 of file inexact.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_simplification_table()

void Brush::Simpl::Inexact_simplifier::log_simplification_table ( Util::CsvWriter & log,
const string & run_id )
inline

dumps every stored expression. Expects a writer opened with simplification_table_header.

Definition at line 294 of file inexact.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ query()

template<ProgramType P>
optional< vector< tree< Node > > > Brush::Simpl::Inexact_simplifier::query ( TreeIter & spot,
const Dataset & d )
inlineprivate

Definition at line 379 of file inexact.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simplify_tree()

template<ProgramType P>
Program< P > Brush::Simpl::Inexact_simplifier::simplify_tree ( Program< P > & program,
const SearchSpace & ss,
const Dataset & d,
SimplificationRecords * records = nullptr )
inline
Parameters
recordsif not null, every replacement is appended to it

Definition at line 165 of file inexact.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ equivalentExpressions

std::unordered_map<DataType, HashStorage> Brush::Simpl::Inexact_simplifier::equivalentExpressions
private

Definition at line 445 of file inexact.h.

◆ inputDim

int Brush::Simpl::Inexact_simplifier::inputDim = 1000

Definition at line 303 of file inexact.h.

◆ simplification_table_header

const vector<string> Brush::Simpl::Inexact_simplifier::simplification_table_header
inlinestatic
Initial value:
= {
"run_id", "DataType", "Plane", "Key", "Tree"}

Definition at line 289 of file inexact.h.

◆ uniformPlanes

vector<MatrixXf> Brush::Simpl::Inexact_simplifier::uniformPlanes
private

Definition at line 447 of file inexact.h.


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