pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::TreeRules Struct Reference

A crisp tree's rules, one per leaf. More...

#include <rule_extraction.hpp>

Public Member Functions

std::vector< datalog::Rule > Program () const
 The rules alone, for the engine.
 
datalog::FactDatabase Facts (const std::string &sample, const std::vector< float > &x) const
 sample(<id>) and an le or gt fact for every (feature, threshold) the rules test.
 

Public Attributes

std::vector< ExtractedRule > rules
 
std::vector< std::string > feature_names
 
std::vector< std::string > class_names
 

Detailed Description

A crisp tree's rules, one per leaf.

Member Function Documentation

◆ Facts()

datalog::FactDatabase pulsatrix::TreeRules::Facts ( const std::string &  sample,
const std::vector< float > &  x 
) const

sample(<id>) and an le or gt fact for every (feature, threshold) the rules test.

Exceptions
std::invalid_argumentif x has fewer values than the tree's features.

◆ Program()

std::vector< datalog::Rule > pulsatrix::TreeRules::Program ( ) const

The rules alone, for the engine.

Member Data Documentation

◆ class_names

std::vector<std::string> pulsatrix::TreeRules::class_names

◆ feature_names

std::vector<std::string> pulsatrix::TreeRules::feature_names

◆ rules

std::vector<ExtractedRule> pulsatrix::TreeRules::rules

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