Files
BayesNet/docs/manual/classbayesnet_1_1_node.html

26 KiB

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="clipboard.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="cookie.js"></script> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> </head>
BayesNet 1.0.5
Bayesian Network Classifiers using libtorch from scratch
<script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ var searchBox = new SearchBox("searchBox", "search/",'.html'); /* @license-end */ </script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function() { codefold.init(0); }); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); /* @license-end */ </script>
<script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function(){initNavTree('classbayesnet_1_1_node.html',''); initResizable(true); }); /* @license-end */ </script>
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 laplaceSmoothing, const torch::Tensor &weights)
 
int getNumStates () const
 
void setNumStates (int)
 
unsigned minFill ()
 
std::vector< std::string > graph (const std::string &clasName)
 
float 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 laplaceSmoothing,
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()

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

Definition at line 124 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 132 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:
  • /Users/rmontanana/Code/BayesNet/bayesnet/network/Node.h
  • /Users/rmontanana/Code/BayesNet/bayesnet/network/Node.cc
</html>