BayesNet 1.0.7.
Bayesian Network and basic classifiers Library.
Loading...
Searching...
No Matches
bayesnet::Node Class Reference

Public Member Functions

 Node (const std::string &)
 
void clear ()
 
void addParent (Node *)
 
void addChild (Node *)
 
void removeParent (Node *)
 
void removeChild (Node *)
 
std::string getName () const
 
std::vector< Node * > & getParents ()
 
std::vector< Node * > & getChildren ()
 
torch::Tensor & getCPT ()
 
void computeCPT (const torch::Tensor &dataset, const std::vector< std::string > &features, const double smoothing, const torch::Tensor &weights)
 
int getNumStates () const
 
void setNumStates (int)
 
unsigned minFill ()
 
std::vector< std::string > graph (const std::string &clasName)
 
double getFactorValue (std::map< std::string, int > &)
 

Detailed Description

Definition at line 14 of file Node.h.

Constructor & Destructor Documentation

◆ Node()

bayesnet::Node::Node ( const std::string & name)
explicit

Definition at line 11 of file Node.cc.

Member Function Documentation

◆ addChild()

void bayesnet::Node::addChild ( Node * child)

Definition at line 39 of file Node.cc.

◆ addParent()

void bayesnet::Node::addParent ( Node * parent)

Definition at line 27 of file Node.cc.

◆ clear()

void bayesnet::Node::clear ( )

Definition at line 15 of file Node.cc.

◆ computeCPT()

void bayesnet::Node::computeCPT ( const torch::Tensor & dataset,
const std::vector< std::string > & features,
const double smoothing,
const torch::Tensor & weights )

Definition at line 93 of file Node.cc.

◆ getChildren()

std::vector< Node * > & bayesnet::Node::getChildren ( )

Definition at line 47 of file Node.cc.

◆ getCPT()

torch::Tensor & bayesnet::Node::getCPT ( )

Definition at line 59 of file Node.cc.

◆ getFactorValue()

double bayesnet::Node::getFactorValue ( std::map< std::string, int > & evidence)

Definition at line 133 of file Node.cc.

◆ getName()

std::string bayesnet::Node::getName ( ) const

Definition at line 23 of file Node.cc.

◆ getNumStates()

int bayesnet::Node::getNumStates ( ) const

Definition at line 51 of file Node.cc.

◆ getParents()

std::vector< Node * > & bayesnet::Node::getParents ( )

Definition at line 43 of file Node.cc.

◆ graph()

std::vector< std::string > bayesnet::Node::graph ( const std::string & clasName)

Definition at line 141 of file Node.cc.

◆ minFill()

unsigned bayesnet::Node::minFill ( )

Definition at line 70 of file Node.cc.

◆ removeChild()

void bayesnet::Node::removeChild ( Node * child)

Definition at line 35 of file Node.cc.

◆ removeParent()

void bayesnet::Node::removeParent ( Node * parent)

Definition at line 31 of file Node.cc.

◆ setNumStates()

void bayesnet::Node::setNumStates ( int numStates)

Definition at line 55 of file Node.cc.


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