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

A soft decision tree's rules, one per leaf, over weighted facts. More...

#include <rule_extraction.hpp>

Public Member Functions

datalog::WeightedFactDatabase< double > Facts (const SoftDecisionTree &tree, int64_t row, const std::string &sample) const
 The weighted facts for row row of tree's last forward(): right and left with its gate probabilities, and leaf with the leaves' distributions.
 

Public Attributes

std::vector< datalog::Rule > rules
 
std::vector< std::string > class_names
 
int64_t inner = 0
 
int64_t leaves = 0
 

Detailed Description

A soft decision tree's rules, one per leaf, over weighted facts.

Member Function Documentation

◆ Facts()

datalog::WeightedFactDatabase< double > pulsatrix::SoftTreeRules::Facts ( const SoftDecisionTree &  tree,
int64_t  row,
const std::string &  sample 
) const

The weighted facts for row row of tree's last forward(): right and left with its gate probabilities, and leaf with the leaves' distributions.

Exceptions
std::invalid_argumentif the tree's shape isn't the rules' or row is out of range; std::logic_error before the tree's first forward().

Member Data Documentation

◆ class_names

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

◆ inner

int64_t pulsatrix::SoftTreeRules::inner = 0

◆ leaves

int64_t pulsatrix::SoftTreeRules::leaves = 0

◆ rules

std::vector<datalog::Rule> pulsatrix::SoftTreeRules::rules

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