![]() |
BayesNet 1.0.7.
Bayesian Network and basic classifiers Library.
|
Public Member Functions | |
Network (const Network &) | |
torch::Tensor & | getSamples () |
void | addNode (const std::string &) |
void | addEdge (const std::string &, const std::string &) |
std::map< std::string, std::unique_ptr< Node > > & | getNodes () |
std::vector< std::string > | getFeatures () const |
int | getStates () const |
std::vector< std::pair< std::string, std::string > > | getEdges () const |
int | getNumEdges () const |
int | getClassNumStates () const |
std::string | getClassName () const |
void | fit (const std::vector< std::vector< int > > &input_data, const std::vector< int > &labels, const std::vector< double > &weights, const std::vector< std::string > &featureNames, const std::string &className, const std::map< std::string, std::vector< int > > &states, const Smoothing_t smoothing) |
void | fit (const torch::Tensor &X, const torch::Tensor &y, const torch::Tensor &weights, const std::vector< std::string > &featureNames, const std::string &className, const std::map< std::string, std::vector< int > > &states, const Smoothing_t smoothing) |
void | fit (const torch::Tensor &samples, const torch::Tensor &weights, const std::vector< std::string > &featureNames, const std::string &className, const std::map< std::string, std::vector< int > > &states, const Smoothing_t smoothing) |
std::vector< int > | predict (const std::vector< std::vector< int > > &) |
torch::Tensor | predict (const torch::Tensor &) |
torch::Tensor | predict_tensor (const torch::Tensor &samples, const bool proba) |
std::vector< std::vector< double > > | predict_proba (const std::vector< std::vector< int > > &) |
torch::Tensor | predict_proba (const torch::Tensor &) |
double | score (const std::vector< std::vector< int > > &, const std::vector< int > &) |
std::vector< std::string > | topological_sort () |
std::vector< std::string > | show () const |
std::vector< std::string > | graph (const std::string &title) const |
void | initialize () |
std::string | dump_cpt () const |
std::string | version () |
bayesnet::Network::Network | ( | ) |
Definition at line 17 of file Network.cc.
|
explicit |
Definition at line 20 of file Network.cc.
void bayesnet::Network::addEdge | ( | const std::string & | parent, |
const std::string & | child ) |
Definition at line 94 of file Network.cc.
void bayesnet::Network::addNode | ( | const std::string & | name | ) |
Definition at line 42 of file Network.cc.
std::string bayesnet::Network::dump_cpt | ( | ) | const |
Definition at line 497 of file Network.cc.
void bayesnet::Network::fit | ( | const std::vector< std::vector< int > > & | input_data, |
const std::vector< int > & | labels, | ||
const std::vector< double > & | weights, | ||
const std::vector< std::string > & | featureNames, | ||
const std::string & | className, | ||
const std::map< std::string, std::vector< int > > & | states, | ||
const Smoothing_t | smoothing ) |
Definition at line 185 of file Network.cc.
void bayesnet::Network::fit | ( | const torch::Tensor & | samples, |
const torch::Tensor & | weights, | ||
const std::vector< std::string > & | featureNames, | ||
const std::string & | className, | ||
const std::map< std::string, std::vector< int > > & | states, | ||
const Smoothing_t | smoothing ) |
Definition at line 177 of file Network.cc.
void bayesnet::Network::fit | ( | const torch::Tensor & | X, |
const torch::Tensor & | y, | ||
const torch::Tensor & | weights, | ||
const std::vector< std::string > & | featureNames, | ||
const std::string & | className, | ||
const std::map< std::string, std::vector< int > > & | states, | ||
const Smoothing_t | smoothing ) |
Definition at line 166 of file Network.cc.
std::string bayesnet::Network::getClassName | ( | ) | const |
Definition at line 74 of file Network.cc.
int bayesnet::Network::getClassNumStates | ( | ) | const |
Definition at line 62 of file Network.cc.
std::vector< std::pair< std::string, std::string > > bayesnet::Network::getEdges | ( | ) | const |
Definition at line 448 of file Network.cc.
std::vector< std::string > bayesnet::Network::getFeatures | ( | ) | const |
Definition at line 58 of file Network.cc.
std::map< std::string, std::unique_ptr< Node > > & bayesnet::Network::getNodes | ( | ) |
Definition at line 124 of file Network.cc.
int bayesnet::Network::getNumEdges | ( | ) | const |
Definition at line 460 of file Network.cc.
torch::Tensor & bayesnet::Network::getSamples | ( | ) |
Definition at line 38 of file Network.cc.
int bayesnet::Network::getStates | ( | ) | const |
Definition at line 66 of file Network.cc.
std::vector< std::string > bayesnet::Network::graph | ( | const std::string & | title | ) | const |
Definition at line 434 of file Network.cc.
void bayesnet::Network::initialize | ( | ) |
Definition at line 29 of file Network.cc.
std::vector< int > bayesnet::Network::predict | ( | const std::vector< std::vector< int > > & | tsamples | ) |
Definition at line 295 of file Network.cc.
torch::Tensor bayesnet::Network::predict | ( | const torch::Tensor & | samples | ) |
Definition at line 288 of file Network.cc.
std::vector< std::vector< double > > bayesnet::Network::predict_proba | ( | const std::vector< std::vector< int > > & | tsamples | ) |
Definition at line 337 of file Network.cc.
torch::Tensor bayesnet::Network::predict_proba | ( | const torch::Tensor & | samples | ) |
Definition at line 282 of file Network.cc.
torch::Tensor bayesnet::Network::predict_tensor | ( | const torch::Tensor & | samples, |
const bool | proba ) |
Definition at line 239 of file Network.cc.
double bayesnet::Network::score | ( | const std::vector< std::vector< int > > & | tsamples, |
const std::vector< int > & | labels ) |
Definition at line 375 of file Network.cc.
std::vector< std::string > bayesnet::Network::show | ( | ) | const |
Definition at line 421 of file Network.cc.
std::vector< std::string > bayesnet::Network::topological_sort | ( | ) |
Definition at line 464 of file Network.cc.