diff --git a/CMakeLists.txt b/CMakeLists.txt index 152447e..ffaabd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,4 +88,18 @@ install(TARGETS BayesNet LIBRARY DESTINATION lib CONFIGURATIONS Release) install(DIRECTORY bayesnet/ DESTINATION include/bayesnet FILES_MATCHING CONFIGURATIONS Release PATTERN "*.h") -install(FILES ${CMAKE_BINARY_DIR}/configured_files/include/bayesnet/config.h DESTINATION include/bayesnet CONFIGURATIONS Release) \ No newline at end of file +install(FILES ${CMAKE_BINARY_DIR}/configured_files/include/bayesnet/config.h DESTINATION include/bayesnet CONFIGURATIONS Release) + +# Documentation +# ------------- +set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in) +set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) +configure_file(${doxyfile_in} ${doxyfile} @ONLY) + +# doc build only target, target is not in default build, so it must be +# triggered explicitly +add_custom_target(doc + COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM) \ No newline at end of file diff --git a/docs/Doxyfile b/docs/Doxyfile.in similarity index 100% rename from docs/Doxyfile rename to docs/Doxyfile.in diff --git a/docs/man3/bayesnet_A2DE.3 b/docs/man3/bayesnet_A2DE.3 deleted file mode 100644 index 6a1593f..0000000 --- a/docs/man3/bayesnet_A2DE.3 +++ /dev/null @@ -1,257 +0,0 @@ -.TH "bayesnet::A2DE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::A2DE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Ensemble\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBA2DE\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title='A2DE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB12\fP of file \fBA2DE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::A2DE::A2DE (bool predict_voting = \fRfalse\fP)" - -.PP -Definition at line \fB10\fP of file \fBA2DE\&.cc\fP\&. -.SS "virtual bayesnet::A2DE::~A2DE ()\fR [inline]\fP, \fR [virtual]\fP" - -.PP -Definition at line \fB15\fP of file \fBA2DE\&.h\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::A2DE::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB23\fP of file \fBA2DE\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::A2DE::graph (const std::string & title = \fR'A2DE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB36\fP of file \fBA2DE\&.cc\fP\&. -.SS "void bayesnet::A2DE::setHyperparameters (const nlohmann::json & hyperparameters)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB14\fP of file \fBA2DE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_AODE.3 b/docs/man3/bayesnet_AODE.3 deleted file mode 100644 index 6894802..0000000 --- a/docs/man3/bayesnet_AODE.3 +++ /dev/null @@ -1,257 +0,0 @@ -.TH "bayesnet::AODE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::AODE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Ensemble\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBAODE\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title='AODE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB12\fP of file \fBAODE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::AODE::AODE (bool predict_voting = \fRfalse\fP)" - -.PP -Definition at line \fB10\fP of file \fBAODE\&.cc\fP\&. -.SS "virtual bayesnet::AODE::~AODE ()\fR [inline]\fP, \fR [virtual]\fP" - -.PP -Definition at line \fB15\fP of file \fBAODE\&.h\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::AODE::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB24\fP of file \fBAODE\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::AODE::graph (const std::string & title = \fR'AODE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB34\fP of file \fBAODE\&.cc\fP\&. -.SS "void bayesnet::AODE::setHyperparameters (const nlohmann::json & hyperparameters)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB15\fP of file \fBAODE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_AODELd.3 b/docs/man3/bayesnet_AODELd.3 deleted file mode 100644 index a684913..0000000 --- a/docs/man3/bayesnet_AODELd.3 +++ /dev/null @@ -1,296 +0,0 @@ -.TH "bayesnet::AODELd" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::AODELd -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Ensemble\fP, and \fBbayesnet::Proposal\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBAODELd\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "\fBAODELd\fP & \fBfit\fP (torch::Tensor &X_, torch::Tensor &y_, const std::vector< std::string > &features_, const std::string &className_, map< std::string, std::vector< int > > &states_) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='AODELd') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "\fBProposal\fP (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "void \fBcheckInput\fP (const torch::Tensor &X, const torch::Tensor &y)" -.br -.ti -1c -.RI "torch::Tensor \fBprepareX\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBlocalDiscretizationProposal\fP (const map< std::string, std::vector< int > > &states, \fBNetwork\fP &model)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBfit_local_discretization\fP (const torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBXf\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy\fP" -.br -.ti -1c -.RI "map< std::string, mdlp::CPPFImdlp * > \fBdiscretizers\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB14\fP of file \fBAODELd\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::AODELd::AODELd (bool predict_voting = \fRtrue\fP)" - -.PP -Definition at line \fB10\fP of file \fBAODELd\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::AODELd::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB28\fP of file \fBAODELd\&.cc\fP\&. -.SS "\fBAODELd\fP & bayesnet::AODELd::fit (torch::Tensor & X_, torch::Tensor & y_, const std::vector< std::string > & features_, const std::string & className_, map< std::string, std::vector< int > > & states_)\fR [override]\fP" - -.PP -Definition at line \fB13\fP of file \fBAODELd\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::AODELd::graph (const std::string & name = \fR'AODELd'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB43\fP of file \fBAODELd\&.cc\fP\&. -.SS "void bayesnet::AODELd::trainModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB37\fP of file \fBAODELd\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_BaseClassifier.3 b/docs/man3/bayesnet_BaseClassifier.3 deleted file mode 100644 index 44f3411..0000000 --- a/docs/man3/bayesnet_BaseClassifier.3 +++ /dev/null @@ -1,116 +0,0 @@ -.TH "bayesnet::BaseClassifier" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::BaseClassifier -.SH SYNOPSIS -.br -.PP -.PP -Inherited by \fBbayesnet::Classifier\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "virtual \fBBaseClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0" -.br -.ti -1c -.RI "virtual \fBBaseClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0" -.br -.ti -1c -.RI "virtual \fBBaseClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0" -.br -.ti -1c -.RI "virtual \fBBaseClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights)=0" -.br -.ti -1c -.RI "virtual torch::Tensor \fBpredict\fP (torch::Tensor &X)=0" -.br -.ti -1c -.RI "virtual std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X)=0" -.br -.ti -1c -.RI "virtual torch::Tensor \fBpredict_proba\fP (torch::Tensor &X)=0" -.br -.ti -1c -.RI "virtual std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X)=0" -.br -.ti -1c -.RI "virtual status_t \fBgetStatus\fP () const =0" -.br -.ti -1c -.RI "virtual float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y)=0" -.br -.ti -1c -.RI "virtual float \fBscore\fP (torch::Tensor &X, torch::Tensor &y)=0" -.br -.ti -1c -.RI "virtual int \fBgetNumberOfNodes\fP () const =0" -.br -.ti -1c -.RI "virtual int \fBgetNumberOfEdges\fP () const =0" -.br -.ti -1c -.RI "virtual int \fBgetNumberOfStates\fP () const =0" -.br -.ti -1c -.RI "virtual int \fBgetClassNumStates\fP () const =0" -.br -.ti -1c -.RI "virtual std::vector< std::string > \fBshow\fP () const =0" -.br -.ti -1c -.RI "virtual std::vector< std::string > \fBgraph\fP (const std::string &title='') const =0" -.br -.ti -1c -.RI "virtual std::string \fBgetVersion\fP ()=0" -.br -.ti -1c -.RI "virtual std::vector< std::string > \fBtopological_order\fP ()=0" -.br -.ti -1c -.RI "virtual std::vector< std::string > \fBgetNotes\fP () const =0" -.br -.ti -1c -.RI "virtual std::string \fBdump_cpt\fP () const =0" -.br -.ti -1c -.RI "virtual void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters)=0" -.br -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "virtual void \fBtrainModel\fP (const torch::Tensor &weights)=0" -.br -.in -1c -.SS "Protected Attributes" - -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBBaseClassifier\&.h\fP\&. -.SH "Member Function Documentation" -.PP -.SS "std::vector< std::string > & bayesnet::BaseClassifier::getValidHyperparameters ()\fR [inline]\fP" - -.PP -Definition at line \fB40\fP of file \fBBaseClassifier\&.h\fP\&. -.SH "Member Data Documentation" -.PP -.SS "std::vector bayesnet::BaseClassifier::validHyperparameters\fR [protected]\fP" - -.PP -Definition at line \fB43\fP of file \fBBaseClassifier\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Boost.3 b/docs/man3/bayesnet_Boost.3 deleted file mode 100644 index 04ec0cc..0000000 --- a/docs/man3/bayesnet_Boost.3 +++ /dev/null @@ -1,369 +0,0 @@ -.TH "bayesnet::Boost" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Boost -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Ensemble\fP\&. -.PP -Inherited by \fBbayesnet::BoostA2DE\fP, and \fBbayesnet::BoostAODE\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBBoost\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters_) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "std::vector< int > \fBfeatureSelection\fP (torch::Tensor &weights_)" -.br -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights\fP (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights_block\fP (int k, torch::Tensor &ytrain, torch::Tensor &weights)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Protected Attributes" - -.in +1c -.ti -1c -.RI "torch::Tensor \fBX_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBX_test\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_test\fP" -.br -.ti -1c -.RI "bool \fBbisection\fP = true" -.br -.ti -1c -.RI "int \fBmaxTolerance\fP = 3" -.br -.ti -1c -.RI "std::string \fBorder_algorithm\fP" -.br -.ti -1c -.RI "bool \fBconvergence\fP = true" -.br -.ti -1c -.RI "bool \fBconvergence_best\fP = false" -.br -.ti -1c -.RI "bool \fBselectFeatures\fP = false" -.br -.ti -1c -.RI "std::string \fBselect_features_algorithm\fP = Orders\&.DESC" -.br -.ti -1c -.RI "FeatureSelect * \fBfeatureSelector\fP = nullptr" -.br -.ti -1c -.RI "double \fBthreshold\fP = \-1" -.br -.ti -1c -.RI "bool \fBblock_update\fP = false" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB27\fP of file \fBBoost\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Boost::Boost (bool predict_voting = \fRfalse\fP)\fR [explicit]\fP" - -.PP -Definition at line \fB13\fP of file \fBBoost\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::Boost::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB71\fP of file \fBBoost\&.cc\fP\&. -.SS "std::vector< int > bayesnet::Boost::featureSelection (torch::Tensor & weights_)\fR [protected]\fP" - -.PP -Definition at line \fB102\fP of file \fBBoost\&.cc\fP\&. -.SS "void bayesnet::Boost::setHyperparameters (const nlohmann::json & hyperparameters_)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB18\fP of file \fBBoost\&.cc\fP\&. -.SS "std::tuple< torch::Tensor &, double, bool > bayesnet::Boost::update_weights (torch::Tensor & ytrain, torch::Tensor & ypred, torch::Tensor & weights)\fR [protected]\fP" - -.PP -Definition at line \fB123\fP of file \fBBoost\&.cc\fP\&. -.SS "std::tuple< torch::Tensor &, double, bool > bayesnet::Boost::update_weights_block (int k, torch::Tensor & ytrain, torch::Tensor & weights)\fR [protected]\fP" - -.PP -Definition at line \fB150\fP of file \fBBoost\&.cc\fP\&. -.SH "Member Data Documentation" -.PP -.SS "bool bayesnet::Boost::bisection = true\fR [protected]\fP" - -.PP -Definition at line \fB39\fP of file \fBBoost\&.h\fP\&. -.SS "bool bayesnet::Boost::block_update = false\fR [protected]\fP" - -.PP -Definition at line \fB48\fP of file \fBBoost\&.h\fP\&. -.SS "bool bayesnet::Boost::convergence = true\fR [protected]\fP" - -.PP -Definition at line \fB42\fP of file \fBBoost\&.h\fP\&. -.SS "bool bayesnet::Boost::convergence_best = false\fR [protected]\fP" - -.PP -Definition at line \fB43\fP of file \fBBoost\&.h\fP\&. -.SS "FeatureSelect* bayesnet::Boost::featureSelector = nullptr\fR [protected]\fP" - -.PP -Definition at line \fB46\fP of file \fBBoost\&.h\fP\&. -.SS "int bayesnet::Boost::maxTolerance = 3\fR [protected]\fP" - -.PP -Definition at line \fB40\fP of file \fBBoost\&.h\fP\&. -.SS "std::string bayesnet::Boost::order_algorithm\fR [protected]\fP" - -.PP -Definition at line \fB41\fP of file \fBBoost\&.h\fP\&. -.SS "std::string bayesnet::Boost::select_features_algorithm = Orders\&.DESC\fR [protected]\fP" - -.PP -Definition at line \fB45\fP of file \fBBoost\&.h\fP\&. -.SS "bool bayesnet::Boost::selectFeatures = false\fR [protected]\fP" - -.PP -Definition at line \fB44\fP of file \fBBoost\&.h\fP\&. -.SS "double bayesnet::Boost::threshold = \-1\fR [protected]\fP" - -.PP -Definition at line \fB47\fP of file \fBBoost\&.h\fP\&. -.SS "torch::Tensor bayesnet::Boost::X_test\fR [protected]\fP" - -.PP -Definition at line \fB37\fP of file \fBBoost\&.h\fP\&. -.SS "torch::Tensor bayesnet::Boost::X_train\fR [protected]\fP" - -.PP -Definition at line \fB37\fP of file \fBBoost\&.h\fP\&. -.SS "torch::Tensor bayesnet::Boost::y_test\fR [protected]\fP" - -.PP -Definition at line \fB37\fP of file \fBBoost\&.h\fP\&. -.SS "torch::Tensor bayesnet::Boost::y_train\fR [protected]\fP" - -.PP -Definition at line \fB37\fP of file \fBBoost\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_BoostA2DE.3 b/docs/man3/bayesnet_BoostA2DE.3 deleted file mode 100644 index b3a9dfe..0000000 --- a/docs/man3/bayesnet_BoostA2DE.3 +++ /dev/null @@ -1,316 +0,0 @@ -.TH "bayesnet::BoostA2DE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::BoostA2DE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Boost\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBBoostA2DE\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title='BoostA2DE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "\fBBoost\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters_) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "std::vector< int > \fBfeatureSelection\fP (torch::Tensor &weights_)" -.br -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights\fP (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights_block\fP (int k, torch::Tensor &ytrain, torch::Tensor &weights)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBX_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBX_test\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_test\fP" -.br -.ti -1c -.RI "bool \fBbisection\fP = true" -.br -.ti -1c -.RI "int \fBmaxTolerance\fP = 3" -.br -.ti -1c -.RI "std::string \fBorder_algorithm\fP" -.br -.ti -1c -.RI "bool \fBconvergence\fP = true" -.br -.ti -1c -.RI "bool \fBconvergence_best\fP = false" -.br -.ti -1c -.RI "bool \fBselectFeatures\fP = false" -.br -.ti -1c -.RI "std::string \fBselect_features_algorithm\fP = Orders\&.DESC" -.br -.ti -1c -.RI "FeatureSelect * \fBfeatureSelector\fP = nullptr" -.br -.ti -1c -.RI "double \fBthreshold\fP = \-1" -.br -.ti -1c -.RI "bool \fBblock_update\fP = false" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB14\fP of file \fBBoostA2DE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::BoostA2DE::BoostA2DE (bool predict_voting = \fRfalse\fP)\fR [explicit]\fP" - -.PP -Definition at line \fB19\fP of file \fBBoostA2DE\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "std::vector< std::string > bayesnet::BoostA2DE::graph (const std::string & title = \fR'BoostA2DE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB163\fP of file \fBBoostA2DE\&.cc\fP\&. -.SS "void bayesnet::BoostA2DE::trainModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB44\fP of file \fBBoostA2DE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_BoostAODE.3 b/docs/man3/bayesnet_BoostAODE.3 deleted file mode 100644 index d5b74c1..0000000 --- a/docs/man3/bayesnet_BoostAODE.3 +++ /dev/null @@ -1,316 +0,0 @@ -.TH "bayesnet::BoostAODE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::BoostAODE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Boost\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBBoostAODE\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title='BoostAODE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "\fBBoost\fP (bool predict_voting=false)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters_) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "std::vector< int > \fBfeatureSelection\fP (torch::Tensor &weights_)" -.br -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights\fP (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)" -.br -.ti -1c -.RI "std::tuple< torch::Tensor &, double, bool > \fBupdate_weights_block\fP (int k, torch::Tensor &ytrain, torch::Tensor &weights)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Boost\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBX_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_train\fP" -.br -.ti -1c -.RI "torch::Tensor \fBX_test\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy_test\fP" -.br -.ti -1c -.RI "bool \fBbisection\fP = true" -.br -.ti -1c -.RI "int \fBmaxTolerance\fP = 3" -.br -.ti -1c -.RI "std::string \fBorder_algorithm\fP" -.br -.ti -1c -.RI "bool \fBconvergence\fP = true" -.br -.ti -1c -.RI "bool \fBconvergence_best\fP = false" -.br -.ti -1c -.RI "bool \fBselectFeatures\fP = false" -.br -.ti -1c -.RI "std::string \fBselect_features_algorithm\fP = Orders\&.DESC" -.br -.ti -1c -.RI "FeatureSelect * \fBfeatureSelector\fP = nullptr" -.br -.ti -1c -.RI "double \fBthreshold\fP = \-1" -.br -.ti -1c -.RI "bool \fBblock_update\fP = false" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Ensemble\fP -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB15\fP of file \fBBoostAODE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::BoostAODE::BoostAODE (bool predict_voting = \fRfalse\fP)\fR [explicit]\fP" - -.PP -Definition at line \fB16\fP of file \fBBoostAODE\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "std::vector< std::string > bayesnet::BoostAODE::graph (const std::string & title = \fR'BoostAODE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB157\fP of file \fBBoostAODE\&.cc\fP\&. -.SS "void bayesnet::BoostAODE::trainModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB33\fP of file \fBBoostAODE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Classifier.3 b/docs/man3/bayesnet_Classifier.3 deleted file mode 100644 index 02549d5..0000000 --- a/docs/man3/bayesnet_Classifier.3 +++ /dev/null @@ -1,360 +0,0 @@ -.TH "bayesnet::Classifier" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Classifier -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::BaseClassifier\fP\&. -.PP -Inherited by \fBbayesnet::Ensemble\fP, \fBbayesnet::KDB\fP, \fBbayesnet::SPODE\fP, \fBbayesnet::SPnDE\fP, and \fBbayesnet::TAN\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "virtual std::vector< std::string > \fBgraph\fP (const std::string &title='') const =0" -.br -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "virtual void \fBbuildModel\fP (const torch::Tensor &weights)=0" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Protected Attributes" - -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB15\fP of file \fBClassifier\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Classifier::Classifier (\fBNetwork\fP model)" - -.PP -Definition at line \fB12\fP of file \fBClassifier\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::Classifier::addNodes ()" - -.PP -Definition at line \fB155\fP of file \fBClassifier\&.cc\fP\&. -.SS "void bayesnet::Classifier::buildDataset (torch::Tensor & y)\fR [protected]\fP" - -.PP -Definition at line \fB30\fP of file \fBClassifier\&.cc\fP\&. -.SS "void bayesnet::Classifier::checkFitParameters ()\fR [protected]\fP" - -.PP -Definition at line \fB79\fP of file \fBClassifier\&.cc\fP\&. -.SS "std::string bayesnet::Classifier::dump_cpt () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB184\fP of file \fBClassifier\&.cc\fP\&. -.SS "\fBClassifier\fP & bayesnet::Classifier::fit (std::vector< std::vector< int > > & X, std::vector< int > & y, const std::vector< std::string > & features, const std::string & className, std::map< std::string, std::vector< int > > & states)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB57\fP of file \fBClassifier\&.cc\fP\&. -.SS "\fBClassifier\fP & bayesnet::Classifier::fit (torch::Tensor & dataset, const std::vector< std::string > & features, const std::string & className, std::map< std::string, std::vector< int > > & states)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB68\fP of file \fBClassifier\&.cc\fP\&. -.SS "\fBClassifier\fP & bayesnet::Classifier::fit (torch::Tensor & dataset, const std::vector< std::string > & features, const std::string & className, std::map< std::string, std::vector< int > > & states, const torch::Tensor & weights)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB74\fP of file \fBClassifier\&.cc\fP\&. -.SS "\fBClassifier\fP & bayesnet::Classifier::fit (torch::Tensor & X, torch::Tensor & y, const std::vector< std::string > & features, const std::string & className, std::map< std::string, std::vector< int > > & states)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB49\fP of file \fBClassifier\&.cc\fP\&. -.SS "int bayesnet::Classifier::getClassNumStates () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB176\fP of file \fBClassifier\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Classifier::getNotes () const\fR [inline]\fP, \fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB38\fP of file \fBClassifier\&.h\fP\&. -.SS "int bayesnet::Classifier::getNumberOfEdges () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB168\fP of file \fBClassifier\&.cc\fP\&. -.SS "int bayesnet::Classifier::getNumberOfNodes () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB163\fP of file \fBClassifier\&.cc\fP\&. -.SS "int bayesnet::Classifier::getNumberOfStates () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB172\fP of file \fBClassifier\&.cc\fP\&. -.SS "status_t bayesnet::Classifier::getStatus () const\fR [inline]\fP, \fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB32\fP of file \fBClassifier\&.h\fP\&. -.SS "std::string bayesnet::Classifier::getVersion ()\fR [inline]\fP, \fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB33\fP of file \fBClassifier\&.h\fP\&. -.SS "std::vector< int > bayesnet::Classifier::predict (std::vector< std::vector< int > > & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB103\fP of file \fBClassifier\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Classifier::predict (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB96\fP of file \fBClassifier\&.cc\fP\&. -.SS "std::vector< std::vector< double > > bayesnet::Classifier::predict_proba (std::vector< std::vector< int > > & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB124\fP of file \fBClassifier\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Classifier::predict_proba (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB117\fP of file \fBClassifier\&.cc\fP\&. -.SS "float bayesnet::Classifier::score (std::vector< std::vector< int > > & X, std::vector< int > & y)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB144\fP of file \fBClassifier\&.cc\fP\&. -.SS "float bayesnet::Classifier::score (torch::Tensor & X, torch::Tensor & y)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB139\fP of file \fBClassifier\&.cc\fP\&. -.SS "void bayesnet::Classifier::setHyperparameters (const nlohmann::json & hyperparameters)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB188\fP of file \fBClassifier\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Classifier::show () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB151\fP of file \fBClassifier\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Classifier::topological_order ()\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB180\fP of file \fBClassifier\&.cc\fP\&. -.SS "void bayesnet::Classifier::trainModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB44\fP of file \fBClassifier\&.cc\fP\&. -.SH "Member Data Documentation" -.PP -.SS "std::string bayesnet::Classifier::className\fR [protected]\fP" - -.PP -Definition at line \fB47\fP of file \fBClassifier\&.h\fP\&. -.SS "torch::Tensor bayesnet::Classifier::dataset\fR [protected]\fP" - -.PP -Definition at line \fB49\fP of file \fBClassifier\&.h\fP\&. -.SS "std::vector bayesnet::Classifier::features\fR [protected]\fP" - -.PP -Definition at line \fB46\fP of file \fBClassifier\&.h\fP\&. -.SS "bool bayesnet::Classifier::fitted\fR [protected]\fP" - -.PP -Definition at line \fB42\fP of file \fBClassifier\&.h\fP\&. -.SS "unsigned int bayesnet::Classifier::m\fR [protected]\fP" - -.PP -Definition at line \fB43\fP of file \fBClassifier\&.h\fP\&. -.SS "Metrics bayesnet::Classifier::metrics\fR [protected]\fP" - -.PP -Definition at line \fB45\fP of file \fBClassifier\&.h\fP\&. -.SS "\fBNetwork\fP bayesnet::Classifier::model\fR [protected]\fP" - -.PP -Definition at line \fB44\fP of file \fBClassifier\&.h\fP\&. -.SS "unsigned int bayesnet::Classifier::n\fR [protected]\fP" - -.PP -Definition at line \fB43\fP of file \fBClassifier\&.h\fP\&. -.SS "std::vector bayesnet::Classifier::notes\fR [protected]\fP" - -.PP -Definition at line \fB51\fP of file \fBClassifier\&.h\fP\&. -.SS "std::map > bayesnet::Classifier::states\fR [protected]\fP" - -.PP -Definition at line \fB48\fP of file \fBClassifier\&.h\fP\&. -.SS "status_t bayesnet::Classifier::status = NORMAL\fR [protected]\fP" - -.PP -Definition at line \fB50\fP of file \fBClassifier\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Ensemble.3 b/docs/man3/bayesnet_Ensemble.3 deleted file mode 100644 index f4c6664..0000000 --- a/docs/man3/bayesnet_Ensemble.3 +++ /dev/null @@ -1,348 +0,0 @@ -.TH "bayesnet::Ensemble" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Ensemble -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Classifier\fP\&. -.PP -Inherited by \fBbayesnet::A2DE\fP, \fBbayesnet::AODE\fP, \fBbayesnet::AODELd\fP, and \fBbayesnet::Boost\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBEnsemble\fP (bool predict_voting=true)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "torch::Tensor \fBpredict_average_voting\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_voting\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_average_proba\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_average_proba\fP (std::vector< std::vector< int > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBcompute_arg_max\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "std::vector< int > \fBcompute_arg_max\fP (std::vector< std::vector< double > > &X)" -.br -.ti -1c -.RI "torch::Tensor \fBvoting\fP (torch::Tensor &votes)" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "virtual void \fBbuildModel\fP (const torch::Tensor &weights)=0" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Protected Attributes" - -.in +1c -.ti -1c -.RI "unsigned \fBn_models\fP" -.br -.ti -1c -.RI "std::vector< std::unique_ptr< \fBClassifier\fP > > \fBmodels\fP" -.br -.ti -1c -.RI "std::vector< double > \fBsignificanceModels\fP" -.br -.ti -1c -.RI "bool \fBpredict_voting\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB15\fP of file \fBEnsemble\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Ensemble::Ensemble (bool predict_voting = \fRtrue\fP)" - -.PP -Definition at line \fB11\fP of file \fBEnsemble\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "std::vector< int > bayesnet::Ensemble::compute_arg_max (std::vector< std::vector< double > > & X)\fR [protected]\fP" - -.PP -Definition at line \fB24\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::compute_arg_max (torch::Tensor & X)\fR [protected]\fP" - -.PP -Definition at line \fB33\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::string bayesnet::Ensemble::dump_cpt () const\fR [inline]\fP, \fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB34\fP of file \fBEnsemble\&.h\fP\&. -.SS "int bayesnet::Ensemble::getNumberOfEdges () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB206\fP of file \fBEnsemble\&.cc\fP\&. -.SS "int bayesnet::Ensemble::getNumberOfNodes () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB198\fP of file \fBEnsemble\&.cc\fP\&. -.SS "int bayesnet::Ensemble::getNumberOfStates () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB214\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Ensemble::graph (const std::string & title) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB189\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< int > bayesnet::Ensemble::predict (std::vector< std::vector< int > > & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB74\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::predict (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB79\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::vector< double > > bayesnet::Ensemble::predict_average_proba (std::vector< std::vector< int > > & X)\fR [protected]\fP" - -.PP -Definition at line \fB104\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::predict_average_proba (torch::Tensor & X)\fR [protected]\fP" - -.PP -Definition at line \fB84\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::vector< double > > bayesnet::Ensemble::predict_average_voting (std::vector< std::vector< int > > & X)\fR [protected]\fP" - -.PP -Definition at line \fB133\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::predict_average_voting (torch::Tensor & X)\fR [protected]\fP" - -.PP -Definition at line \fB140\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::vector< double > > bayesnet::Ensemble::predict_proba (std::vector< std::vector< int > > & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB60\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::predict_proba (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB67\fP of file \fBEnsemble\&.cc\fP\&. -.SS "float bayesnet::Ensemble::score (std::vector< std::vector< int > > & X, std::vector< int > & y)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB169\fP of file \fBEnsemble\&.cc\fP\&. -.SS "float bayesnet::Ensemble::score (torch::Tensor & X, torch::Tensor & y)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB158\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Ensemble::show () const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB180\fP of file \fBEnsemble\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Ensemble::topological_order ()\fR [inline]\fP, \fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB30\fP of file \fBEnsemble\&.h\fP\&. -.SS "void bayesnet::Ensemble::trainModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB16\fP of file \fBEnsemble\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Ensemble::voting (torch::Tensor & votes)\fR [protected]\fP" - -.PP -Definition at line \fB38\fP of file \fBEnsemble\&.cc\fP\&. -.SH "Member Data Documentation" -.PP -.SS "std::vector > bayesnet::Ensemble::models\fR [protected]\fP" - -.PP -Definition at line \fB47\fP of file \fBEnsemble\&.h\fP\&. -.SS "unsigned bayesnet::Ensemble::n_models\fR [protected]\fP" - -.PP -Definition at line \fB46\fP of file \fBEnsemble\&.h\fP\&. -.SS "bool bayesnet::Ensemble::predict_voting\fR [protected]\fP" - -.PP -Definition at line \fB50\fP of file \fBEnsemble\&.h\fP\&. -.SS "std::vector bayesnet::Ensemble::significanceModels\fR [protected]\fP" - -.PP -Definition at line \fB48\fP of file \fBEnsemble\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_KDB.3 b/docs/man3/bayesnet_KDB.3 deleted file mode 100644 index 0f9615b..0000000 --- a/docs/man3/bayesnet_KDB.3 +++ /dev/null @@ -1,201 +0,0 @@ -.TH "bayesnet::KDB" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::KDB -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Classifier\fP\&. -.PP -Inherited by \fBbayesnet::KDBLd\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBKDB\fP (int k, float theta=0\&.03)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters_) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='KDB') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBKDB\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::KDB::KDB (int k, float theta = \fR0\&.03\fP)\fR [explicit]\fP" - -.PP -Definition at line \fB10\fP of file \fBKDB\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::KDB::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB28\fP of file \fBKDB\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::KDB::graph (const std::string & name = \fR'KDB'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB103\fP of file \fBKDB\&.cc\fP\&. -.SS "void bayesnet::KDB::setHyperparameters (const nlohmann::json & hyperparameters_)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB15\fP of file \fBKDB\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_KDBLd.3 b/docs/man3/bayesnet_KDBLd.3 deleted file mode 100644 index 4ed0bb5..0000000 --- a/docs/man3/bayesnet_KDBLd.3 +++ /dev/null @@ -1,254 +0,0 @@ -.TH "bayesnet::KDBLd" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::KDBLd -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::KDB\fP, and \fBbayesnet::Proposal\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBKDBLd\fP (int k)" -.br -.ti -1c -.RI "\fBKDBLd\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='KDB') const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::KDB\fP -.in +1c -.ti -1c -.RI "\fBKDB\fP (int k, float theta=0\&.03)" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters_) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "\fBProposal\fP (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)" -.br -.in -1c -.SS "Static Public Member Functions" - -.in +1c -.ti -1c -.RI "static std::string \fBversion\fP ()" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Member Functions inherited from \fBbayesnet::KDB\fP -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "void \fBcheckInput\fP (const torch::Tensor &X, const torch::Tensor &y)" -.br -.ti -1c -.RI "torch::Tensor \fBprepareX\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBlocalDiscretizationProposal\fP (const map< std::string, std::vector< int > > &states, \fBNetwork\fP &model)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBfit_local_discretization\fP (const torch::Tensor &y)" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBXf\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy\fP" -.br -.ti -1c -.RI "map< std::string, mdlp::CPPFImdlp * > \fBdiscretizers\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBKDBLd\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::KDBLd::KDBLd (int k)\fR [explicit]\fP" - -.PP -Definition at line \fB10\fP of file \fBKDBLd\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "\fBKDBLd\fP & bayesnet::KDBLd::fit (torch::Tensor & X, torch::Tensor & y, const std::vector< std::string > & features, const std::string & className, map< std::string, std::vector< int > > & states)\fR [override]\fP" - -.PP -Definition at line \fB11\fP of file \fBKDBLd\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::KDBLd::graph (const std::string & name = \fR'KDB'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::KDB\fP\&. -.PP -Definition at line \fB31\fP of file \fBKDBLd\&.cc\fP\&. -.SS "torch::Tensor bayesnet::KDBLd::predict (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB26\fP of file \fBKDBLd\&.cc\fP\&. -.SS "static std::string bayesnet::KDBLd::version ()\fR [inline]\fP, \fR [static]\fP" - -.PP -Definition at line \fB21\fP of file \fBKDBLd\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Network.3 b/docs/man3/bayesnet_Network.3 deleted file mode 100644 index e5b40a9..0000000 --- a/docs/man3/bayesnet_Network.3 +++ /dev/null @@ -1,223 +0,0 @@ -.TH "bayesnet::Network" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Network -.SH SYNOPSIS -.br -.PP -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBNetwork\fP (float)" -.br -.ti -1c -.RI "\fBNetwork\fP (const \fBNetwork\fP &)" -.br -.ti -1c -.RI "torch::Tensor & \fBgetSamples\fP ()" -.br -.ti -1c -.RI "float \fBgetMaxThreads\fP () const" -.br -.ti -1c -.RI "void \fBaddNode\fP (const std::string &)" -.br -.ti -1c -.RI "void \fBaddEdge\fP (const std::string &, const std::string &)" -.br -.ti -1c -.RI "std::map< std::string, std::unique_ptr< \fBNode\fP > > & \fBgetNodes\fP ()" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetFeatures\fP () const" -.br -.ti -1c -.RI "int \fBgetStates\fP () const" -.br -.ti -1c -.RI "std::vector< std::pair< std::string, std::string > > \fBgetEdges\fP () const" -.br -.ti -1c -.RI "int \fBgetNumEdges\fP () const" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const" -.br -.ti -1c -.RI "std::string \fBgetClassName\fP () const" -.br -.ti -1c -.RI "void \fBfit\fP (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)" -.br -.ti -1c -.RI "void \fBfit\fP (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)" -.br -.ti -1c -.RI "void \fBfit\fP (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)" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (const std::vector< std::vector< int > > &)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (const torch::Tensor &)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_tensor\fP (const torch::Tensor &samples, const bool proba)" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (const std::vector< std::vector< int > > &)" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (const torch::Tensor &)" -.br -.ti -1c -.RI "double \fBscore\fP (const std::vector< std::vector< int > > &, const std::vector< int > &)" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_sort\fP ()" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &title) const" -.br -.ti -1c -.RI "void \fBinitialize\fP ()" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const" -.br -.ti -1c -.RI "std::string \fBversion\fP ()" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB15\fP of file \fBNetwork\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Network::Network ()" - -.PP -Definition at line \fB13\fP of file \fBNetwork\&.cc\fP\&. -.SS "bayesnet::Network::Network (float maxT)\fR [explicit]\fP" - -.PP -Definition at line \fB16\fP of file \fBNetwork\&.cc\fP\&. -.SS "bayesnet::Network::Network (const \fBNetwork\fP & other)\fR [explicit]\fP" - -.PP -Definition at line \fB20\fP of file \fBNetwork\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::Network::addEdge (const std::string & parent, const std::string & child)" - -.PP -Definition at line \fB95\fP of file \fBNetwork\&.cc\fP\&. -.SS "void bayesnet::Network::addNode (const std::string & name)" - -.PP -Definition at line \fB46\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::string bayesnet::Network::dump_cpt () const" - -.PP -Definition at line \fB420\fP of file \fBNetwork\&.cc\fP\&. -.SS "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)" - -.PP -Definition at line \fB177\fP of file \fBNetwork\&.cc\fP\&. -.SS "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)" - -.PP -Definition at line \fB169\fP of file \fBNetwork\&.cc\fP\&. -.SS "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)" - -.PP -Definition at line \fB158\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::string bayesnet::Network::getClassName () const" - -.PP -Definition at line \fB75\fP of file \fBNetwork\&.cc\fP\&. -.SS "int bayesnet::Network::getClassNumStates () const" - -.PP -Definition at line \fB63\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::pair< std::string, std::string > > bayesnet::Network::getEdges () const" - -.PP -Definition at line \fB371\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Network::getFeatures () const" - -.PP -Definition at line \fB59\fP of file \fBNetwork\&.cc\fP\&. -.SS "float bayesnet::Network::getMaxThreads () const" - -.PP -Definition at line \fB38\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::map< std::string, std::unique_ptr< \fBNode\fP > > & bayesnet::Network::getNodes ()" - -.PP -Definition at line \fB116\fP of file \fBNetwork\&.cc\fP\&. -.SS "int bayesnet::Network::getNumEdges () const" - -.PP -Definition at line \fB383\fP of file \fBNetwork\&.cc\fP\&. -.SS "torch::Tensor & bayesnet::Network::getSamples ()" - -.PP -Definition at line \fB42\fP of file \fBNetwork\&.cc\fP\&. -.SS "int bayesnet::Network::getStates () const" - -.PP -Definition at line \fB67\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Network::graph (const std::string & title) const" - -.PP -Definition at line \fB357\fP of file \fBNetwork\&.cc\fP\&. -.SS "void bayesnet::Network::initialize ()" - -.PP -Definition at line \fB29\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< int > bayesnet::Network::predict (const std::vector< std::vector< int > > & tsamples)" - -.PP -Definition at line \fB237\fP of file \fBNetwork\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Network::predict (const torch::Tensor & samples)" - -.PP -Definition at line \fB230\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::vector< double > > bayesnet::Network::predict_proba (const std::vector< std::vector< int > > & tsamples)" - -.PP -Definition at line \fB259\fP of file \fBNetwork\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Network::predict_proba (const torch::Tensor & samples)" - -.PP -Definition at line \fB224\fP of file \fBNetwork\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Network::predict_tensor (const torch::Tensor & samples, const bool proba)" - -.PP -Definition at line \fB205\fP of file \fBNetwork\&.cc\fP\&. -.SS "double bayesnet::Network::score (const std::vector< std::vector< int > > & tsamples, const std::vector< int > & labels)" - -.PP -Definition at line \fB275\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Network::show () const" - -.PP -Definition at line \fB344\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Network::topological_sort ()" - -.PP -Definition at line \fB387\fP of file \fBNetwork\&.cc\fP\&. -.SS "std::string bayesnet::Network::version ()\fR [inline]\fP" - -.PP -Definition at line \fB49\fP of file \fBNetwork\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Node.3 b/docs/man3/bayesnet_Node.3 deleted file mode 100644 index d3279e4..0000000 --- a/docs/man3/bayesnet_Node.3 +++ /dev/null @@ -1,135 +0,0 @@ -.TH "bayesnet::Node" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Node -.SH SYNOPSIS -.br -.PP -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBNode\fP (const std::string &)" -.br -.ti -1c -.RI "void \fBclear\fP ()" -.br -.ti -1c -.RI "void \fBaddParent\fP (\fBNode\fP *)" -.br -.ti -1c -.RI "void \fBaddChild\fP (\fBNode\fP *)" -.br -.ti -1c -.RI "void \fBremoveParent\fP (\fBNode\fP *)" -.br -.ti -1c -.RI "void \fBremoveChild\fP (\fBNode\fP *)" -.br -.ti -1c -.RI "std::string \fBgetName\fP () const" -.br -.ti -1c -.RI "std::vector< \fBNode\fP * > & \fBgetParents\fP ()" -.br -.ti -1c -.RI "std::vector< \fBNode\fP * > & \fBgetChildren\fP ()" -.br -.ti -1c -.RI "torch::Tensor & \fBgetCPT\fP ()" -.br -.ti -1c -.RI "void \fBcomputeCPT\fP (const torch::Tensor &dataset, const std::vector< std::string > &features, const double laplaceSmoothing, const torch::Tensor &weights)" -.br -.ti -1c -.RI "int \fBgetNumStates\fP () const" -.br -.ti -1c -.RI "void \fBsetNumStates\fP (int)" -.br -.ti -1c -.RI "unsigned \fBminFill\fP ()" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &clasName)" -.br -.ti -1c -.RI "float \fBgetFactorValue\fP (std::map< std::string, int > &)" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB14\fP of file \fBNode\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Node::Node (const std::string & name)\fR [explicit]\fP" - -.PP -Definition at line \fB11\fP of file \fBNode\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::Node::addChild (\fBNode\fP * child)" - -.PP -Definition at line \fB39\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::addParent (\fBNode\fP * parent)" - -.PP -Definition at line \fB27\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::clear ()" - -.PP -Definition at line \fB15\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::computeCPT (const torch::Tensor & dataset, const std::vector< std::string > & features, const double laplaceSmoothing, const torch::Tensor & weights)" - -.PP -Definition at line \fB93\fP of file \fBNode\&.cc\fP\&. -.SS "std::vector< \fBNode\fP * > & bayesnet::Node::getChildren ()" - -.PP -Definition at line \fB47\fP of file \fBNode\&.cc\fP\&. -.SS "torch::Tensor & bayesnet::Node::getCPT ()" - -.PP -Definition at line \fB59\fP of file \fBNode\&.cc\fP\&. -.SS "float bayesnet::Node::getFactorValue (std::map< std::string, int > & evidence)" - -.PP -Definition at line \fB124\fP of file \fBNode\&.cc\fP\&. -.SS "std::string bayesnet::Node::getName () const" - -.PP -Definition at line \fB23\fP of file \fBNode\&.cc\fP\&. -.SS "int bayesnet::Node::getNumStates () const" - -.PP -Definition at line \fB51\fP of file \fBNode\&.cc\fP\&. -.SS "std::vector< \fBNode\fP * > & bayesnet::Node::getParents ()" - -.PP -Definition at line \fB43\fP of file \fBNode\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::Node::graph (const std::string & clasName)" - -.PP -Definition at line \fB132\fP of file \fBNode\&.cc\fP\&. -.SS "unsigned bayesnet::Node::minFill ()" - -.PP -Definition at line \fB70\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::removeChild (\fBNode\fP * child)" - -.PP -Definition at line \fB35\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::removeParent (\fBNode\fP * parent)" - -.PP -Definition at line \fB31\fP of file \fBNode\&.cc\fP\&. -.SS "void bayesnet::Node::setNumStates (int numStates)" - -.PP -Definition at line \fB55\fP of file \fBNode\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_Proposal.3 b/docs/man3/bayesnet_Proposal.3 deleted file mode 100644 index ad37186..0000000 --- a/docs/man3/bayesnet_Proposal.3 +++ /dev/null @@ -1,95 +0,0 @@ -.TH "bayesnet::Proposal" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::Proposal -.SH SYNOPSIS -.br -.PP -.PP -Inherited by \fBbayesnet::AODELd\fP, \fBbayesnet::KDBLd\fP, \fBbayesnet::SPODELd\fP, and \fBbayesnet::TANLd\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBProposal\fP (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBcheckInput\fP (const torch::Tensor &X, const torch::Tensor &y)" -.br -.ti -1c -.RI "torch::Tensor \fBprepareX\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBlocalDiscretizationProposal\fP (const map< std::string, std::vector< int > > &states, \fBNetwork\fP &model)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBfit_local_discretization\fP (const torch::Tensor &y)" -.br -.in -1c -.SS "Protected Attributes" - -.in +1c -.ti -1c -.RI "torch::Tensor \fBXf\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy\fP" -.br -.ti -1c -.RI "map< std::string, mdlp::CPPFImdlp * > \fBdiscretizers\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB17\fP of file \fBProposal\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::Proposal::Proposal (torch::Tensor & pDataset, std::vector< std::string > & features_, std::string & className_)" - -.PP -Definition at line \fB10\fP of file \fBProposal\&.cc\fP\&. -.SS "bayesnet::Proposal::~Proposal ()\fR [virtual]\fP" - -.PP -Definition at line \fB11\fP of file \fBProposal\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::Proposal::checkInput (const torch::Tensor & X, const torch::Tensor & y)\fR [protected]\fP" - -.PP -Definition at line \fB17\fP of file \fBProposal\&.cc\fP\&. -.SS "map< std::string, std::vector< int > > bayesnet::Proposal::fit_local_discretization (const torch::Tensor & y)\fR [protected]\fP" - -.PP -Definition at line \fB77\fP of file \fBProposal\&.cc\fP\&. -.SS "map< std::string, std::vector< int > > bayesnet::Proposal::localDiscretizationProposal (const map< std::string, std::vector< int > > & states, \fBNetwork\fP & model)\fR [protected]\fP" - -.PP -Definition at line \fB26\fP of file \fBProposal\&.cc\fP\&. -.SS "torch::Tensor bayesnet::Proposal::prepareX (torch::Tensor & X)\fR [protected]\fP" - -.PP -Definition at line \fB104\fP of file \fBProposal\&.cc\fP\&. -.SH "Member Data Documentation" -.PP -.SS "map bayesnet::Proposal::discretizers\fR [protected]\fP" - -.PP -Definition at line \fB28\fP of file \fBProposal\&.h\fP\&. -.SS "torch::Tensor bayesnet::Proposal::Xf\fR [protected]\fP" - -.PP -Definition at line \fB26\fP of file \fBProposal\&.h\fP\&. -.SS "torch::Tensor bayesnet::Proposal::y\fR [protected]\fP" - -.PP -Definition at line \fB27\fP of file \fBProposal\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_SPODE.3 b/docs/man3/bayesnet_SPODE.3 deleted file mode 100644 index d75d468..0000000 --- a/docs/man3/bayesnet_SPODE.3 +++ /dev/null @@ -1,195 +0,0 @@ -.TH "bayesnet::SPODE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::SPODE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Classifier\fP\&. -.PP -Inherited by \fBbayesnet::SPODELd\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBSPODE\fP (int root)" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='SPODE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB12\fP of file \fBSPODE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::SPODE::SPODE (int root)\fR [explicit]\fP" - -.PP -Definition at line \fB11\fP of file \fBSPODE\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::SPODE::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB13\fP of file \fBSPODE\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::SPODE::graph (const std::string & name = \fR'SPODE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB26\fP of file \fBSPODE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_SPODELd.3 b/docs/man3/bayesnet_SPODELd.3 deleted file mode 100644 index 43e1bdc..0000000 --- a/docs/man3/bayesnet_SPODELd.3 +++ /dev/null @@ -1,268 +0,0 @@ -.TH "bayesnet::SPODELd" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::SPODELd -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::SPODE\fP, and \fBbayesnet::Proposal\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBSPODELd\fP (int root)" -.br -.ti -1c -.RI "\fBSPODELd\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBSPODELd\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBSPODELd\fP & \fBcommonFit\fP (const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states)" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='SPODE') const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::SPODE\fP -.in +1c -.ti -1c -.RI "\fBSPODE\fP (int root)" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "\fBProposal\fP (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)" -.br -.in -1c -.SS "Static Public Member Functions" - -.in +1c -.ti -1c -.RI "static std::string \fBversion\fP ()" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Member Functions inherited from \fBbayesnet::SPODE\fP -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "void \fBcheckInput\fP (const torch::Tensor &X, const torch::Tensor &y)" -.br -.ti -1c -.RI "torch::Tensor \fBprepareX\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBlocalDiscretizationProposal\fP (const map< std::string, std::vector< int > > &states, \fBNetwork\fP &model)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBfit_local_discretization\fP (const torch::Tensor &y)" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBXf\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy\fP" -.br -.ti -1c -.RI "map< std::string, mdlp::CPPFImdlp * > \fBdiscretizers\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBSPODELd\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::SPODELd::SPODELd (int root)\fR [explicit]\fP" - -.PP -Definition at line \fB10\fP of file \fBSPODELd\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "\fBSPODELd\fP & bayesnet::SPODELd::commonFit (const std::vector< std::string > & features, const std::string & className, map< std::string, std::vector< int > > & states)" - -.PP -Definition at line \fB29\fP of file \fBSPODELd\&.cc\fP\&. -.SS "\fBSPODELd\fP & bayesnet::SPODELd::fit (torch::Tensor & dataset, const std::vector< std::string > & features, const std::string & className, map< std::string, std::vector< int > > & states)\fR [override]\fP" - -.PP -Definition at line \fB19\fP of file \fBSPODELd\&.cc\fP\&. -.SS "\fBSPODELd\fP & bayesnet::SPODELd::fit (torch::Tensor & X, torch::Tensor & y, const std::vector< std::string > & features, const std::string & className, map< std::string, std::vector< int > > & states)\fR [override]\fP" - -.PP -Definition at line \fB11\fP of file \fBSPODELd\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::SPODELd::graph (const std::string & name = \fR'SPODE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::SPODE\fP\&. -.PP -Definition at line \fB46\fP of file \fBSPODELd\&.cc\fP\&. -.SS "torch::Tensor bayesnet::SPODELd::predict (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB41\fP of file \fBSPODELd\&.cc\fP\&. -.SS "static std::string bayesnet::SPODELd::version ()\fR [inline]\fP, \fR [static]\fP" - -.PP -Definition at line \fB22\fP of file \fBSPODELd\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_SPnDE.3 b/docs/man3/bayesnet_SPnDE.3 deleted file mode 100644 index afb6e61..0000000 --- a/docs/man3/bayesnet_SPnDE.3 +++ /dev/null @@ -1,193 +0,0 @@ -.TH "bayesnet::SPnDE" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::SPnDE -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Classifier\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBSPnDE\fP (std::vector< int > parents)" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='SPnDE') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBSPnDE\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::SPnDE::SPnDE (std::vector< int > parents)\fR [explicit]\fP" - -.PP -Definition at line \fB11\fP of file \fBSPnDE\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::SPnDE::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB13\fP of file \fBSPnDE\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::SPnDE::graph (const std::string & name = \fR'SPnDE'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB33\fP of file \fBSPnDE\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_TAN.3 b/docs/man3/bayesnet_TAN.3 deleted file mode 100644 index 1aa8b71..0000000 --- a/docs/man3/bayesnet_TAN.3 +++ /dev/null @@ -1,192 +0,0 @@ -.TH "bayesnet::TAN" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::TAN -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::Classifier\fP\&. -.PP -Inherited by \fBbayesnet::TANLd\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='TAN') const override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c -.SS "Protected Member Functions" - -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB11\fP of file \fBTAN\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::TAN::TAN ()" - -.PP -Definition at line \fB10\fP of file \fBTAN\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "void bayesnet::TAN::buildModel (const torch::Tensor & weights)\fR [override]\fP, \fR [protected]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB12\fP of file \fBTAN\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::TAN::graph (const std::string & name = \fR'TAN'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Implements \fBbayesnet::BaseClassifier\fP\&. -.PP -Definition at line \fB41\fP of file \fBTAN\&.cc\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/man3/bayesnet_TANLd.3 b/docs/man3/bayesnet_TANLd.3 deleted file mode 100644 index 45b05d3..0000000 --- a/docs/man3/bayesnet_TANLd.3 +++ /dev/null @@ -1,244 +0,0 @@ -.TH "bayesnet::TANLd" 3 "Version 1.0.5" "BayesNet" \" -*- nroff -*- -.ad l -.nh -.SH NAME -bayesnet::TANLd -.SH SYNOPSIS -.br -.PP -.PP -Inherits \fBbayesnet::TAN\fP, and \fBbayesnet::Proposal\fP\&. -.SS "Public Member Functions" - -.in +1c -.ti -1c -.RI "\fBTANLd\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgraph\fP (const std::string &name='TAN') const override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict\fP (torch::Tensor &X) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "\fBClassifier\fP (\fBNetwork\fP model)" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override" -.br -.ti -1c -.RI "\fBClassifier\fP & \fBfit\fP (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBaddNodes\fP ()" -.br -.ti -1c -.RI "int \fBgetNumberOfNodes\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfEdges\fP () const override" -.br -.ti -1c -.RI "int \fBgetNumberOfStates\fP () const override" -.br -.ti -1c -.RI "int \fBgetClassNumStates\fP () const override" -.br -.ti -1c -.RI "std::vector< int > \fBpredict\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "torch::Tensor \fBpredict_proba\fP (torch::Tensor &X) override" -.br -.ti -1c -.RI "std::vector< std::vector< double > > \fBpredict_proba\fP (std::vector< std::vector< int > > &X) override" -.br -.ti -1c -.RI "status_t \fBgetStatus\fP () const override" -.br -.ti -1c -.RI "std::string \fBgetVersion\fP () override" -.br -.ti -1c -.RI "float \fBscore\fP (torch::Tensor &X, torch::Tensor &y) override" -.br -.ti -1c -.RI "float \fBscore\fP (std::vector< std::vector< int > > &X, std::vector< int > &y) override" -.br -.ti -1c -.RI "std::vector< std::string > \fBshow\fP () const override" -.br -.ti -1c -.RI "std::vector< std::string > \fBtopological_order\fP () override" -.br -.ti -1c -.RI "std::vector< std::string > \fBgetNotes\fP () const override" -.br -.ti -1c -.RI "std::string \fBdump_cpt\fP () const override" -.br -.ti -1c -.RI "void \fBsetHyperparameters\fP (const nlohmann::json &hyperparameters) override" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > & \fBgetValidHyperparameters\fP ()" -.br -.in -1c - -Public Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "\fBProposal\fP (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)" -.br -.in -1c -.SS "Static Public Member Functions" - -.in +1c -.ti -1c -.RI "static std::string \fBversion\fP ()" -.br -.in -1c -.SS "Additional Inherited Members" - - -Protected Member Functions inherited from \fBbayesnet::TAN\fP -.in +1c -.ti -1c -.RI "void \fBbuildModel\fP (const torch::Tensor &weights) override" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "void \fBcheckFitParameters\fP ()" -.br -.ti -1c -.RI "void \fBtrainModel\fP (const torch::Tensor &weights) override" -.br -.ti -1c -.RI "void \fBbuildDataset\fP (torch::Tensor &y)" -.br -.in -1c - -Protected Member Functions inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "void \fBcheckInput\fP (const torch::Tensor &X, const torch::Tensor &y)" -.br -.ti -1c -.RI "torch::Tensor \fBprepareX\fP (torch::Tensor &X)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBlocalDiscretizationProposal\fP (const map< std::string, std::vector< int > > &states, \fBNetwork\fP &model)" -.br -.ti -1c -.RI "map< std::string, std::vector< int > > \fBfit_local_discretization\fP (const torch::Tensor &y)" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Classifier\fP -.in +1c -.ti -1c -.RI "bool \fBfitted\fP" -.br -.ti -1c -.RI "unsigned int \fBm\fP" -.br -.ti -1c -.RI "unsigned int \fBn\fP" -.br -.ti -1c -.RI "\fBNetwork\fP \fBmodel\fP" -.br -.ti -1c -.RI "Metrics \fBmetrics\fP" -.br -.ti -1c -.RI "std::vector< std::string > \fBfeatures\fP" -.br -.ti -1c -.RI "std::string \fBclassName\fP" -.br -.ti -1c -.RI "std::map< std::string, std::vector< int > > \fBstates\fP" -.br -.ti -1c -.RI "torch::Tensor \fBdataset\fP" -.br -.ti -1c -.RI "status_t \fBstatus\fP = NORMAL" -.br -.ti -1c -.RI "std::vector< std::string > \fBnotes\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::BaseClassifier\fP -.in +1c -.ti -1c -.RI "std::vector< std::string > \fBvalidHyperparameters\fP" -.br -.in -1c - -Protected Attributes inherited from \fBbayesnet::Proposal\fP -.in +1c -.ti -1c -.RI "torch::Tensor \fBXf\fP" -.br -.ti -1c -.RI "torch::Tensor \fBy\fP" -.br -.ti -1c -.RI "map< std::string, mdlp::CPPFImdlp * > \fBdiscretizers\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Definition at line \fB13\fP of file \fBTANLd\&.h\fP\&. -.SH "Constructor & Destructor Documentation" -.PP -.SS "bayesnet::TANLd::TANLd ()" - -.PP -Definition at line \fB10\fP of file \fBTANLd\&.cc\fP\&. -.SH "Member Function Documentation" -.PP -.SS "\fBTANLd\fP & bayesnet::TANLd::fit (torch::Tensor & X, torch::Tensor & y, const std::vector< std::string > & features, const std::string & className, map< std::string, std::vector< int > > & states)\fR [override]\fP" - -.PP -Definition at line \fB11\fP of file \fBTANLd\&.cc\fP\&. -.SS "std::vector< std::string > bayesnet::TANLd::graph (const std::string & name = \fR'TAN'\fP) const\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::TAN\fP\&. -.PP -Definition at line \fB32\fP of file \fBTANLd\&.cc\fP\&. -.SS "torch::Tensor bayesnet::TANLd::predict (torch::Tensor & X)\fR [override]\fP, \fR [virtual]\fP" - -.PP -Reimplemented from \fBbayesnet::Classifier\fP\&. -.PP -Definition at line \fB27\fP of file \fBTANLd\&.cc\fP\&. -.SS "static std::string bayesnet::TANLd::version ()\fR [inline]\fP, \fR [static]\fP" - -.PP -Definition at line \fB21\fP of file \fBTANLd\&.h\fP\&. - -.SH "Author" -.PP -Generated automatically by Doxygen for BayesNet from the source code\&. diff --git a/docs/manual/_a2_d_e_8cc_source.html b/docs/manual/_a2_d_e_8cc_source.html deleted file mode 100644 index c60a9ee..0000000 --- a/docs/manual/_a2_d_e_8cc_source.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/A2DE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
A2DE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "A2DE.h"
-
8
-
9namespace bayesnet {
-
10 A2DE::A2DE(bool predict_voting) : Ensemble(predict_voting)
-
11 {
-
12 validHyperparameters = { "predict_voting" };
-
13 }
-
14 void A2DE::setHyperparameters(const nlohmann::json& hyperparameters_)
-
15 {
-
16 auto hyperparameters = hyperparameters_;
-
17 if (hyperparameters.contains("predict_voting")) {
-
18 predict_voting = hyperparameters["predict_voting"];
-
19 hyperparameters.erase("predict_voting");
-
20 }
-
21 Classifier::setHyperparameters(hyperparameters);
-
22 }
-
23 void A2DE::buildModel(const torch::Tensor& weights)
-
24 {
-
25 models.clear();
-
26 significanceModels.clear();
-
27 for (int i = 0; i < features.size() - 1; ++i) {
-
28 for (int j = i + 1; j < features.size(); ++j) {
-
29 auto model = std::make_unique<SPnDE>(std::vector<int>({ i, j }));
-
30 models.push_back(std::move(model));
-
31 }
-
32 }
-
33 n_models = static_cast<unsigned>(models.size());
-
34 significanceModels = std::vector<double>(n_models, 1.0);
-
35 }
-
36 std::vector<std::string> A2DE::graph(const std::string& title) const
-
37 {
-
38 return Ensemble::graph(title);
-
39 }
-
40}
-
-
- - - - diff --git a/docs/manual/_a2_d_e_8h_source.html b/docs/manual/_a2_d_e_8h_source.html deleted file mode 100644 index 9264c69..0000000 --- a/docs/manual/_a2_d_e_8h_source.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/A2DE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
A2DE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef A2DE_H
-
8#define A2DE_H
-
9#include "bayesnet/classifiers/SPnDE.h"
-
10#include "Ensemble.h"
-
11namespace bayesnet {
-
-
12 class A2DE : public Ensemble {
-
13 public:
-
14 A2DE(bool predict_voting = false);
-
15 virtual ~A2DE() {};
-
16 void setHyperparameters(const nlohmann::json& hyperparameters) override;
-
17 std::vector<std::string> graph(const std::string& title = "A2DE") const override;
-
18 protected:
-
19 void buildModel(const torch::Tensor& weights) override;
-
20 };
-
-
21}
-
22#endif
- - -
-
- - - - diff --git a/docs/manual/_a_o_d_e_8cc_source.html b/docs/manual/_a_o_d_e_8cc_source.html deleted file mode 100644 index 01ec16d..0000000 --- a/docs/manual/_a_o_d_e_8cc_source.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
AODE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "AODE.h"
-
8
-
9namespace bayesnet {
-
10 AODE::AODE(bool predict_voting) : Ensemble(predict_voting)
-
11 {
-
12 validHyperparameters = { "predict_voting" };
-
13
-
14 }
-
15 void AODE::setHyperparameters(const nlohmann::json& hyperparameters_)
-
16 {
-
17 auto hyperparameters = hyperparameters_;
-
18 if (hyperparameters.contains("predict_voting")) {
-
19 predict_voting = hyperparameters["predict_voting"];
-
20 hyperparameters.erase("predict_voting");
-
21 }
-
22 Classifier::setHyperparameters(hyperparameters);
-
23 }
-
24 void AODE::buildModel(const torch::Tensor& weights)
-
25 {
-
26 models.clear();
-
27 significanceModels.clear();
-
28 for (int i = 0; i < features.size(); ++i) {
-
29 models.push_back(std::make_unique<SPODE>(i));
-
30 }
-
31 n_models = models.size();
-
32 significanceModels = std::vector<double>(n_models, 1.0);
-
33 }
-
34 std::vector<std::string> AODE::graph(const std::string& title) const
-
35 {
-
36 return Ensemble::graph(title);
-
37 }
-
38}
-
-
- - - - diff --git a/docs/manual/_a_o_d_e_8h_source.html b/docs/manual/_a_o_d_e_8h_source.html deleted file mode 100644 index dbd20c0..0000000 --- a/docs/manual/_a_o_d_e_8h_source.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
AODE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef AODE_H
-
8#define AODE_H
-
9#include "bayesnet/classifiers/SPODE.h"
-
10#include "Ensemble.h"
-
11namespace bayesnet {
-
-
12 class AODE : public Ensemble {
-
13 public:
-
14 AODE(bool predict_voting = false);
-
15 virtual ~AODE() {};
-
16 void setHyperparameters(const nlohmann::json& hyperparameters) override;
-
17 std::vector<std::string> graph(const std::string& title = "AODE") const override;
-
18 protected:
-
19 void buildModel(const torch::Tensor& weights) override;
-
20 };
-
-
21}
-
22#endif
- - -
-
- - - - diff --git a/docs/manual/_a_o_d_e_ld_8cc_source.html b/docs/manual/_a_o_d_e_ld_8cc_source.html deleted file mode 100644 index bcc508c..0000000 --- a/docs/manual/_a_o_d_e_ld_8cc_source.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODELd.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
AODELd.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "AODELd.h"
-
8
-
9namespace bayesnet {
-
10 AODELd::AODELd(bool predict_voting) : Ensemble(predict_voting), Proposal(dataset, features, className)
-
11 {
-
12 }
-
13 AODELd& AODELd::fit(torch::Tensor& X_, torch::Tensor& y_, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
14 {
-
15 checkInput(X_, y_);
-
16 features = features_;
-
17 className = className_;
-
18 Xf = X_;
-
19 y = y_;
-
20 // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-
21 states = fit_local_discretization(y);
-
22 // We have discretized the input data
-
23 // 1st we need to fit the model to build the normal TAN structure, TAN::fit initializes the base Bayesian network
-
24 Ensemble::fit(dataset, features, className, states);
-
25 return *this;
-
26
-
27 }
-
28 void AODELd::buildModel(const torch::Tensor& weights)
-
29 {
-
30 models.clear();
-
31 for (int i = 0; i < features.size(); ++i) {
-
32 models.push_back(std::make_unique<SPODELd>(i));
-
33 }
-
34 n_models = models.size();
-
35 significanceModels = std::vector<double>(n_models, 1.0);
-
36 }
-
37 void AODELd::trainModel(const torch::Tensor& weights)
-
38 {
-
39 for (const auto& model : models) {
-
40 model->fit(Xf, y, features, className, states);
-
41 }
-
42 }
-
43 std::vector<std::string> AODELd::graph(const std::string& name) const
-
44 {
-
45 return Ensemble::graph(name);
-
46 }
-
47}
-
-
- - - - diff --git a/docs/manual/_a_o_d_e_ld_8h_source.html b/docs/manual/_a_o_d_e_ld_8h_source.html deleted file mode 100644 index 1420501..0000000 --- a/docs/manual/_a_o_d_e_ld_8h_source.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODELd.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
AODELd.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef AODELD_H
-
8#define AODELD_H
-
9#include "bayesnet/classifiers/Proposal.h"
-
10#include "bayesnet/classifiers/SPODELd.h"
-
11#include "Ensemble.h"
-
12
-
13namespace bayesnet {
-
-
14 class AODELd : public Ensemble, public Proposal {
-
15 public:
-
16 AODELd(bool predict_voting = true);
-
17 virtual ~AODELd() = default;
-
18 AODELd& fit(torch::Tensor& X_, torch::Tensor& y_, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_) override;
-
19 std::vector<std::string> graph(const std::string& name = "AODELd") const override;
-
20 protected:
-
21 void trainModel(const torch::Tensor& weights) override;
-
22 void buildModel(const torch::Tensor& weights) override;
-
23 };
-
-
24}
-
25#endif // !AODELD_H
- - - -
-
- - - - diff --git a/docs/manual/_base_classifier_8h_source.html b/docs/manual/_base_classifier_8h_source.html deleted file mode 100644 index e27c0b8..0000000 --- a/docs/manual/_base_classifier_8h_source.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/BaseClassifier.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BaseClassifier.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#pragma once
-
8#include <vector>
-
9#include <torch/torch.h>
-
10#include <nlohmann/json.hpp>
-
11namespace bayesnet {
-
12 enum status_t { NORMAL, WARNING, ERROR };
-
- -
14 public:
-
15 // X is nxm std::vector, y is nx1 std::vector
-
16 virtual BaseClassifier& fit(std::vector<std::vector<int>>& X, std::vector<int>& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) = 0;
-
17 // X is nxm tensor, y is nx1 tensor
-
18 virtual BaseClassifier& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) = 0;
-
19 virtual BaseClassifier& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) = 0;
-
20 virtual BaseClassifier& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights) = 0;
-
21 virtual ~BaseClassifier() = default;
-
22 torch::Tensor virtual predict(torch::Tensor& X) = 0;
-
23 std::vector<int> virtual predict(std::vector<std::vector<int >>& X) = 0;
-
24 torch::Tensor virtual predict_proba(torch::Tensor& X) = 0;
-
25 std::vector<std::vector<double>> virtual predict_proba(std::vector<std::vector<int >>& X) = 0;
-
26 status_t virtual getStatus() const = 0;
-
27 float virtual score(std::vector<std::vector<int>>& X, std::vector<int>& y) = 0;
-
28 float virtual score(torch::Tensor& X, torch::Tensor& y) = 0;
-
29 int virtual getNumberOfNodes()const = 0;
-
30 int virtual getNumberOfEdges()const = 0;
-
31 int virtual getNumberOfStates() const = 0;
-
32 int virtual getClassNumStates() const = 0;
-
33 std::vector<std::string> virtual show() const = 0;
-
34 std::vector<std::string> virtual graph(const std::string& title = "") const = 0;
-
35 virtual std::string getVersion() = 0;
-
36 std::vector<std::string> virtual topological_order() = 0;
-
37 std::vector<std::string> virtual getNotes() const = 0;
-
38 std::string virtual dump_cpt()const = 0;
-
39 virtual void setHyperparameters(const nlohmann::json& hyperparameters) = 0;
-
40 std::vector<std::string>& getValidHyperparameters() { return validHyperparameters; }
-
41 protected:
-
42 virtual void trainModel(const torch::Tensor& weights) = 0;
-
43 std::vector<std::string> validHyperparameters;
-
44 };
-
-
45}
- -
-
- - - - diff --git a/docs/manual/_boost_8cc_source.html b/docs/manual/_boost_8cc_source.html deleted file mode 100644 index a6fda15..0000000 --- a/docs/manual/_boost_8cc_source.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Boost.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Boost.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6#include <folding.hpp>
-
7#include "bayesnet/feature_selection/CFS.h"
-
8#include "bayesnet/feature_selection/FCBF.h"
-
9#include "bayesnet/feature_selection/IWSS.h"
-
10#include "Boost.h"
-
11
-
12namespace bayesnet {
-
13 Boost::Boost(bool predict_voting) : Ensemble(predict_voting)
-
14 {
-
15 validHyperparameters = { "order", "convergence", "convergence_best", "bisection", "threshold", "maxTolerance",
-
16 "predict_voting", "select_features", "block_update" };
-
17 }
-
18 void Boost::setHyperparameters(const nlohmann::json& hyperparameters_)
-
19 {
-
20 auto hyperparameters = hyperparameters_;
-
21 if (hyperparameters.contains("order")) {
-
22 std::vector<std::string> algos = { Orders.ASC, Orders.DESC, Orders.RAND };
-
23 order_algorithm = hyperparameters["order"];
-
24 if (std::find(algos.begin(), algos.end(), order_algorithm) == algos.end()) {
-
25 throw std::invalid_argument("Invalid order algorithm, valid values [" + Orders.ASC + ", " + Orders.DESC + ", " + Orders.RAND + "]");
-
26 }
-
27 hyperparameters.erase("order");
-
28 }
-
29 if (hyperparameters.contains("convergence")) {
-
30 convergence = hyperparameters["convergence"];
-
31 hyperparameters.erase("convergence");
-
32 }
-
33 if (hyperparameters.contains("convergence_best")) {
-
34 convergence_best = hyperparameters["convergence_best"];
-
35 hyperparameters.erase("convergence_best");
-
36 }
-
37 if (hyperparameters.contains("bisection")) {
-
38 bisection = hyperparameters["bisection"];
-
39 hyperparameters.erase("bisection");
-
40 }
-
41 if (hyperparameters.contains("threshold")) {
-
42 threshold = hyperparameters["threshold"];
-
43 hyperparameters.erase("threshold");
-
44 }
-
45 if (hyperparameters.contains("maxTolerance")) {
-
46 maxTolerance = hyperparameters["maxTolerance"];
-
47 if (maxTolerance < 1 || maxTolerance > 4)
-
48 throw std::invalid_argument("Invalid maxTolerance value, must be greater in [1, 4]");
-
49 hyperparameters.erase("maxTolerance");
-
50 }
-
51 if (hyperparameters.contains("predict_voting")) {
-
52 predict_voting = hyperparameters["predict_voting"];
-
53 hyperparameters.erase("predict_voting");
-
54 }
-
55 if (hyperparameters.contains("select_features")) {
-
56 auto selectedAlgorithm = hyperparameters["select_features"];
-
57 std::vector<std::string> algos = { SelectFeatures.IWSS, SelectFeatures.CFS, SelectFeatures.FCBF };
-
58 selectFeatures = true;
-
59 select_features_algorithm = selectedAlgorithm;
-
60 if (std::find(algos.begin(), algos.end(), selectedAlgorithm) == algos.end()) {
-
61 throw std::invalid_argument("Invalid selectFeatures value, valid values [" + SelectFeatures.IWSS + ", " + SelectFeatures.CFS + ", " + SelectFeatures.FCBF + "]");
-
62 }
-
63 hyperparameters.erase("select_features");
-
64 }
-
65 if (hyperparameters.contains("block_update")) {
-
66 block_update = hyperparameters["block_update"];
-
67 hyperparameters.erase("block_update");
-
68 }
-
69 Classifier::setHyperparameters(hyperparameters);
-
70 }
-
71 void Boost::buildModel(const torch::Tensor& weights)
-
72 {
-
73 // Models shall be built in trainModel
-
74 models.clear();
-
75 significanceModels.clear();
-
76 n_models = 0;
-
77 // Prepare the validation dataset
-
78 auto y_ = dataset.index({ -1, "..." });
-
79 if (convergence) {
-
80 // Prepare train & validation sets from train data
-
81 auto fold = folding::StratifiedKFold(5, y_, 271);
-
82 auto [train, test] = fold.getFold(0);
-
83 auto train_t = torch::tensor(train);
-
84 auto test_t = torch::tensor(test);
-
85 // Get train and validation sets
-
86 X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), train_t });
-
87 y_train = dataset.index({ -1, train_t });
-
88 X_test = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), test_t });
-
89 y_test = dataset.index({ -1, test_t });
-
90 dataset = X_train;
-
91 m = X_train.size(1);
-
92 auto n_classes = states.at(className).size();
-
93 // Build dataset with train data
-
94 buildDataset(y_train);
-
95 metrics = Metrics(dataset, features, className, n_classes);
-
96 } else {
-
97 // Use all data to train
-
98 X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." });
-
99 y_train = y_;
-
100 }
-
101 }
-
102 std::vector<int> Boost::featureSelection(torch::Tensor& weights_)
-
103 {
-
104 int maxFeatures = 0;
-
105 if (select_features_algorithm == SelectFeatures.CFS) {
-
106 featureSelector = new CFS(dataset, features, className, maxFeatures, states.at(className).size(), weights_);
-
107 } else if (select_features_algorithm == SelectFeatures.IWSS) {
-
108 if (threshold < 0 || threshold >0.5) {
-
109 throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.IWSS + " [0, 0.5]");
-
110 }
-
111 featureSelector = new IWSS(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);
-
112 } else if (select_features_algorithm == SelectFeatures.FCBF) {
-
113 if (threshold < 1e-7 || threshold > 1) {
-
114 throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.FCBF + " [1e-7, 1]");
-
115 }
-
116 featureSelector = new FCBF(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);
-
117 }
-
118 featureSelector->fit();
-
119 auto featuresUsed = featureSelector->getFeatures();
-
120 delete featureSelector;
-
121 return featuresUsed;
-
122 }
-
123 std::tuple<torch::Tensor&, double, bool> Boost::update_weights(torch::Tensor& ytrain, torch::Tensor& ypred, torch::Tensor& weights)
-
124 {
-
125 bool terminate = false;
-
126 double alpha_t = 0;
-
127 auto mask_wrong = ypred != ytrain;
-
128 auto mask_right = ypred == ytrain;
-
129 auto masked_weights = weights * mask_wrong.to(weights.dtype());
-
130 double epsilon_t = masked_weights.sum().item<double>();
-
131 if (epsilon_t > 0.5) {
-
132 // Inverse the weights policy (plot ln(wt))
-
133 // "In each round of AdaBoost, there is a sanity check to ensure that the current base
-
134 // learner is better than random guess" (Zhi-Hua Zhou, 2012)
-
135 terminate = true;
-
136 } else {
-
137 double wt = (1 - epsilon_t) / epsilon_t;
-
138 alpha_t = epsilon_t == 0 ? 1 : 0.5 * log(wt);
-
139 // Step 3.2: Update weights for next classifier
-
140 // Step 3.2.1: Update weights of wrong samples
-
141 weights += mask_wrong.to(weights.dtype()) * exp(alpha_t) * weights;
-
142 // Step 3.2.2: Update weights of right samples
-
143 weights += mask_right.to(weights.dtype()) * exp(-alpha_t) * weights;
-
144 // Step 3.3: Normalise the weights
-
145 double totalWeights = torch::sum(weights).item<double>();
-
146 weights = weights / totalWeights;
-
147 }
-
148 return { weights, alpha_t, terminate };
-
149 }
-
150 std::tuple<torch::Tensor&, double, bool> Boost::update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights)
-
151 {
-
152 /* Update Block algorithm
-
153 k = # of models in block
-
154 n_models = # of models in ensemble to make predictions
-
155 n_models_bak = # models saved
-
156 models = vector of models to make predictions
-
157 models_bak = models not used to make predictions
-
158 significances_bak = backup of significances vector
-
159
-
160 Case list
-
161 A) k = 1, n_models = 1 => n = 0 , n_models = n + k
-
162 B) k = 1, n_models = n + 1 => n_models = n + k
-
163 C) k > 1, n_models = k + 1 => n= 1, n_models = n + k
-
164 D) k > 1, n_models = k => n = 0, n_models = n + k
-
165 E) k > 1, n_models = k + n => n_models = n + k
-
166
-
167 A, D) n=0, k > 0, n_models == k
-
168 1. n_models_bak <- n_models
-
169 2. significances_bak <- significances
-
170 3. significances = vector(k, 1)
-
171 4. Don’t move any classifiers out of models
-
172 5. n_models <- k
-
173 6. Make prediction, compute alpha, update weights
-
174 7. Don’t restore any classifiers to models
-
175 8. significances <- significances_bak
-
176 9. Update last k significances
-
177 10. n_models <- n_models_bak
-
178
-
179 B, C, E) n > 0, k > 0, n_models == n + k
-
180 1. n_models_bak <- n_models
-
181 2. significances_bak <- significances
-
182 3. significances = vector(k, 1)
-
183 4. Move first n classifiers to models_bak
-
184 5. n_models <- k
-
185 6. Make prediction, compute alpha, update weights
-
186 7. Insert classifiers in models_bak to be the first n models
-
187 8. significances <- significances_bak
-
188 9. Update last k significances
-
189 10. n_models <- n_models_bak
-
190 */
-
191 //
-
192 // Make predict with only the last k models
-
193 //
-
194 std::unique_ptr<Classifier> model;
-
195 std::vector<std::unique_ptr<Classifier>> models_bak;
-
196 // 1. n_models_bak <- n_models 2. significances_bak <- significances
-
197 auto significance_bak = significanceModels;
-
198 auto n_models_bak = n_models;
-
199 // 3. significances = vector(k, 1)
-
200 significanceModels = std::vector<double>(k, 1.0);
-
201 // 4. Move first n classifiers to models_bak
-
202 // backup the first n_models - k models (if n_models == k, don't backup any)
-
203 for (int i = 0; i < n_models - k; ++i) {
-
204 model = std::move(models[0]);
-
205 models.erase(models.begin());
-
206 models_bak.push_back(std::move(model));
-
207 }
-
208 assert(models.size() == k);
-
209 // 5. n_models <- k
-
210 n_models = k;
-
211 // 6. Make prediction, compute alpha, update weights
-
212 auto ypred = predict(X_train);
-
213 //
-
214 // Update weights
-
215 //
-
216 double alpha_t;
-
217 bool terminate;
-
218 std::tie(weights, alpha_t, terminate) = update_weights(y_train, ypred, weights);
-
219 //
-
220 // Restore the models if needed
-
221 //
-
222 // 7. Insert classifiers in models_bak to be the first n models
-
223 // if n_models_bak == k, don't restore any, because none of them were moved
-
224 if (k != n_models_bak) {
-
225 // Insert in the same order as they were extracted
-
226 int bak_size = models_bak.size();
-
227 for (int i = 0; i < bak_size; ++i) {
-
228 model = std::move(models_bak[bak_size - 1 - i]);
-
229 models_bak.erase(models_bak.end() - 1);
-
230 models.insert(models.begin(), std::move(model));
-
231 }
-
232 }
-
233 // 8. significances <- significances_bak
-
234 significanceModels = significance_bak;
-
235 //
-
236 // Update the significance of the last k models
-
237 //
-
238 // 9. Update last k significances
-
239 for (int i = 0; i < k; ++i) {
-
240 significanceModels[n_models_bak - k + i] = alpha_t;
-
241 }
-
242 // 10. n_models <- n_models_bak
-
243 n_models = n_models_bak;
-
244 return { weights, alpha_t, terminate };
-
245 }
-
246}
-
-
- - - - diff --git a/docs/manual/_boost_8h_source.html b/docs/manual/_boost_8h_source.html deleted file mode 100644 index eb96a69..0000000 --- a/docs/manual/_boost_8h_source.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Boost.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Boost.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef BOOST_H
-
8#define BOOST_H
-
9#include <string>
-
10#include <tuple>
-
11#include <vector>
-
12#include <nlohmann/json.hpp>
-
13#include <torch/torch.h>
-
14#include "Ensemble.h"
-
15#include "bayesnet/feature_selection/FeatureSelect.h"
-
16namespace bayesnet {
-
17 const struct {
-
18 std::string CFS = "CFS";
-
19 std::string FCBF = "FCBF";
-
20 std::string IWSS = "IWSS";
-
21 }SelectFeatures;
-
22 const struct {
-
23 std::string ASC = "asc";
-
24 std::string DESC = "desc";
-
25 std::string RAND = "rand";
-
26 }Orders;
-
-
27 class Boost : public Ensemble {
-
28 public:
-
29 explicit Boost(bool predict_voting = false);
-
30 virtual ~Boost() = default;
-
31 void setHyperparameters(const nlohmann::json& hyperparameters_) override;
-
32 protected:
-
33 std::vector<int> featureSelection(torch::Tensor& weights_);
-
34 void buildModel(const torch::Tensor& weights) override;
-
35 std::tuple<torch::Tensor&, double, bool> update_weights(torch::Tensor& ytrain, torch::Tensor& ypred, torch::Tensor& weights);
-
36 std::tuple<torch::Tensor&, double, bool> update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights);
-
37 torch::Tensor X_train, y_train, X_test, y_test;
-
38 // Hyperparameters
-
39 bool bisection = true; // if true, use bisection stratety to add k models at once to the ensemble
-
40 int maxTolerance = 3;
-
41 std::string order_algorithm; // order to process the KBest features asc, desc, rand
-
42 bool convergence = true; //if true, stop when the model does not improve
-
43 bool convergence_best = false; // wether to keep the best accuracy to the moment or the last accuracy as prior accuracy
-
44 bool selectFeatures = false; // if true, use feature selection
-
45 std::string select_features_algorithm = Orders.DESC; // Selected feature selection algorithm
-
46 FeatureSelect* featureSelector = nullptr;
-
47 double threshold = -1;
-
48 bool block_update = false;
-
49
-
50 };
-
-
51}
-
52#endif
- - -
-
- - - - diff --git a/docs/manual/_boost_a2_d_e_8cc_source.html b/docs/manual/_boost_a2_d_e_8cc_source.html deleted file mode 100644 index 70825be..0000000 --- a/docs/manual/_boost_a2_d_e_8cc_source.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostA2DE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BoostA2DE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include <set>
-
8#include <functional>
-
9#include <limits.h>
-
10#include <tuple>
-
11#include <folding.hpp>
-
12#include "bayesnet/feature_selection/CFS.h"
-
13#include "bayesnet/feature_selection/FCBF.h"
-
14#include "bayesnet/feature_selection/IWSS.h"
-
15#include "BoostA2DE.h"
-
16
-
17namespace bayesnet {
-
18
-
19 BoostA2DE::BoostA2DE(bool predict_voting) : Boost(predict_voting)
-
20 {
-
21 }
-
22 std::vector<int> BoostA2DE::initializeModels()
-
23 {
-
24 torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-
25 std::vector<int> featuresSelected = featureSelection(weights_);
-
26 if (featuresSelected.size() < 2) {
-
27 notes.push_back("No features selected in initialization");
-
28 status = ERROR;
-
29 return std::vector<int>();
-
30 }
-
31 for (int i = 0; i < featuresSelected.size() - 1; i++) {
-
32 for (int j = i + 1; j < featuresSelected.size(); j++) {
-
33 auto parents = { featuresSelected[i], featuresSelected[j] };
-
34 std::unique_ptr<Classifier> model = std::make_unique<SPnDE>(parents);
-
35 model->fit(dataset, features, className, states, weights_);
-
36 models.push_back(std::move(model));
-
37 significanceModels.push_back(1.0); // They will be updated later in trainModel
-
38 n_models++;
-
39 }
-
40 }
-
41 notes.push_back("Used features in initialization: " + std::to_string(featuresSelected.size()) + " of " + std::to_string(features.size()) + " with " + select_features_algorithm);
-
42 return featuresSelected;
-
43 }
-
44 void BoostA2DE::trainModel(const torch::Tensor& weights)
-
45 {
-
46 //
-
47 // Logging setup
-
48 //
-
49 // loguru::set_thread_name("BoostA2DE");
-
50 // loguru::g_stderr_verbosity = loguru::Verbosity_OFF;
-
51 // loguru::add_file("boostA2DE.log", loguru::Truncate, loguru::Verbosity_MAX);
-
52
-
53 // Algorithm based on the adaboost algorithm for classification
-
54 // as explained in Ensemble methods (Zhi-Hua Zhou, 2012)
-
55 fitted = true;
-
56 double alpha_t = 0;
-
57 torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-
58 bool finished = false;
-
59 std::vector<int> featuresUsed;
-
60 if (selectFeatures) {
-
61 featuresUsed = initializeModels();
-
62 auto ypred = predict(X_train);
-
63 std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-
64 // Update significance of the models
-
65 for (int i = 0; i < n_models; ++i) {
-
66 significanceModels[i] = alpha_t;
-
67 }
-
68 if (finished) {
-
69 return;
-
70 }
-
71 }
-
72 int numItemsPack = 0; // The counter of the models inserted in the current pack
-
73 // Variables to control the accuracy finish condition
-
74 double priorAccuracy = 0.0;
-
75 double improvement = 1.0;
-
76 double convergence_threshold = 1e-4;
-
77 int tolerance = 0; // number of times the accuracy is lower than the convergence_threshold
-
78 // Step 0: Set the finish condition
-
79 // epsilon sub t > 0.5 => inverse the weights policy
-
80 // validation error is not decreasing
-
81 // run out of features
-
82 bool ascending = order_algorithm == Orders.ASC;
-
83 std::mt19937 g{ 173 };
-
84 std::vector<std::pair<int, int>> pairSelection;
-
85 while (!finished) {
-
86 // Step 1: Build ranking with mutual information
-
87 pairSelection = metrics.SelectKPairs(weights_, featuresUsed, ascending, 0); // Get all the pairs sorted
-
88 if (order_algorithm == Orders.RAND) {
-
89 std::shuffle(pairSelection.begin(), pairSelection.end(), g);
-
90 }
-
91 int k = bisection ? pow(2, tolerance) : 1;
-
92 int counter = 0; // The model counter of the current pack
-
93 // VLOG_SCOPE_F(1, "counter=%d k=%d featureSelection.size: %zu", counter, k, featureSelection.size());
-
94 while (counter++ < k && pairSelection.size() > 0) {
-
95 auto feature_pair = pairSelection[0];
-
96 pairSelection.erase(pairSelection.begin());
-
97 std::unique_ptr<Classifier> model;
-
98 model = std::make_unique<SPnDE>(std::vector<int>({ feature_pair.first, feature_pair.second }));
-
99 model->fit(dataset, features, className, states, weights_);
-
100 alpha_t = 0.0;
-
101 if (!block_update) {
-
102 auto ypred = model->predict(X_train);
-
103 // Step 3.1: Compute the classifier amout of say
-
104 std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-
105 }
-
106 // Step 3.4: Store classifier and its accuracy to weigh its future vote
-
107 numItemsPack++;
-
108 models.push_back(std::move(model));
-
109 significanceModels.push_back(alpha_t);
-
110 n_models++;
-
111 // VLOG_SCOPE_F(2, "numItemsPack: %d n_models: %d featuresUsed: %zu", numItemsPack, n_models, featuresUsed.size());
-
112 }
-
113 if (block_update) {
-
114 std::tie(weights_, alpha_t, finished) = update_weights_block(k, y_train, weights_);
-
115 }
-
116 if (convergence && !finished) {
-
117 auto y_val_predict = predict(X_test);
-
118 double accuracy = (y_val_predict == y_test).sum().item<double>() / (double)y_test.size(0);
-
119 if (priorAccuracy == 0) {
-
120 priorAccuracy = accuracy;
-
121 } else {
-
122 improvement = accuracy - priorAccuracy;
-
123 }
-
124 if (improvement < convergence_threshold) {
-
125 // VLOG_SCOPE_F(3, " (improvement<threshold) tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-
126 tolerance++;
-
127 } else {
-
128 // VLOG_SCOPE_F(3, "* (improvement>=threshold) Reset. tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-
129 tolerance = 0; // Reset the counter if the model performs better
-
130 numItemsPack = 0;
-
131 }
-
132 if (convergence_best) {
-
133 // Keep the best accuracy until now as the prior accuracy
-
134 priorAccuracy = std::max(accuracy, priorAccuracy);
-
135 } else {
-
136 // Keep the last accuray obtained as the prior accuracy
-
137 priorAccuracy = accuracy;
-
138 }
-
139 }
-
140 // VLOG_SCOPE_F(1, "tolerance: %d featuresUsed.size: %zu features.size: %zu", tolerance, featuresUsed.size(), features.size());
-
141 finished = finished || tolerance > maxTolerance || pairSelection.size() == 0;
-
142 }
-
143 if (tolerance > maxTolerance) {
-
144 if (numItemsPack < n_models) {
-
145 notes.push_back("Convergence threshold reached & " + std::to_string(numItemsPack) + " models eliminated");
-
146 // VLOG_SCOPE_F(4, "Convergence threshold reached & %d models eliminated of %d", numItemsPack, n_models);
-
147 for (int i = 0; i < numItemsPack; ++i) {
-
148 significanceModels.pop_back();
-
149 models.pop_back();
-
150 n_models--;
-
151 }
-
152 } else {
-
153 notes.push_back("Convergence threshold reached & 0 models eliminated");
-
154 // VLOG_SCOPE_F(4, "Convergence threshold reached & 0 models eliminated n_models=%d numItemsPack=%d", n_models, numItemsPack);
-
155 }
-
156 }
-
157 if (pairSelection.size() > 0) {
-
158 notes.push_back("Pairs not used in train: " + std::to_string(pairSelection.size()));
-
159 status = WARNING;
-
160 }
-
161 notes.push_back("Number of models: " + std::to_string(n_models));
-
162 }
-
163 std::vector<std::string> BoostA2DE::graph(const std::string& title) const
-
164 {
-
165 return Ensemble::graph(title);
-
166 }
-
167}
-
-
- - - - diff --git a/docs/manual/_boost_a2_d_e_8h_source.html b/docs/manual/_boost_a2_d_e_8h_source.html deleted file mode 100644 index cf8b626..0000000 --- a/docs/manual/_boost_a2_d_e_8h_source.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostA2DE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BoostA2DE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef BOOSTA2DE_H
-
8#define BOOSTA2DE_H
-
9#include <string>
-
10#include <vector>
-
11#include "bayesnet/classifiers/SPnDE.h"
-
12#include "Boost.h"
-
13namespace bayesnet {
-
-
14 class BoostA2DE : public Boost {
-
15 public:
-
16 explicit BoostA2DE(bool predict_voting = false);
-
17 virtual ~BoostA2DE() = default;
-
18 std::vector<std::string> graph(const std::string& title = "BoostA2DE") const override;
-
19 protected:
-
20 void trainModel(const torch::Tensor& weights) override;
-
21 private:
-
22 std::vector<int> initializeModels();
-
23 };
-
-
24}
-
25#endif
- - -
-
- - - - diff --git a/docs/manual/_boost_a_o_d_e_8cc_source.html b/docs/manual/_boost_a_o_d_e_8cc_source.html deleted file mode 100644 index c22d8e9..0000000 --- a/docs/manual/_boost_a_o_d_e_8cc_source.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostAODE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BoostAODE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include <random>
-
8#include <set>
-
9#include <functional>
-
10#include <limits.h>
-
11#include <tuple>
-
12#include "BoostAODE.h"
-
13
-
14namespace bayesnet {
-
15
-
16 BoostAODE::BoostAODE(bool predict_voting) : Boost(predict_voting)
-
17 {
-
18 }
-
19 std::vector<int> BoostAODE::initializeModels()
-
20 {
-
21 torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-
22 std::vector<int> featuresSelected = featureSelection(weights_);
-
23 for (const int& feature : featuresSelected) {
-
24 std::unique_ptr<Classifier> model = std::make_unique<SPODE>(feature);
-
25 model->fit(dataset, features, className, states, weights_);
-
26 models.push_back(std::move(model));
-
27 significanceModels.push_back(1.0); // They will be updated later in trainModel
-
28 n_models++;
-
29 }
-
30 notes.push_back("Used features in initialization: " + std::to_string(featuresSelected.size()) + " of " + std::to_string(features.size()) + " with " + select_features_algorithm);
-
31 return featuresSelected;
-
32 }
-
33 void BoostAODE::trainModel(const torch::Tensor& weights)
-
34 {
-
35 //
-
36 // Logging setup
-
37 //
-
38 // loguru::set_thread_name("BoostAODE");
-
39 // loguru::g_stderr_verbosity = loguru::Verbosity_OFF;
-
40 // loguru::add_file("boostAODE.log", loguru::Truncate, loguru::Verbosity_MAX);
-
41
-
42 // Algorithm based on the adaboost algorithm for classification
-
43 // as explained in Ensemble methods (Zhi-Hua Zhou, 2012)
-
44 fitted = true;
-
45 double alpha_t = 0;
-
46 torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-
47 bool finished = false;
-
48 std::vector<int> featuresUsed;
-
49 if (selectFeatures) {
-
50 featuresUsed = initializeModels();
-
51 auto ypred = predict(X_train);
-
52 std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-
53 // Update significance of the models
-
54 for (int i = 0; i < n_models; ++i) {
-
55 significanceModels[i] = alpha_t;
-
56 }
-
57 if (finished) {
-
58 return;
-
59 }
-
60 }
-
61 int numItemsPack = 0; // The counter of the models inserted in the current pack
-
62 // Variables to control the accuracy finish condition
-
63 double priorAccuracy = 0.0;
-
64 double improvement = 1.0;
-
65 double convergence_threshold = 1e-4;
-
66 int tolerance = 0; // number of times the accuracy is lower than the convergence_threshold
-
67 // Step 0: Set the finish condition
-
68 // epsilon sub t > 0.5 => inverse the weights policy
-
69 // validation error is not decreasing
-
70 // run out of features
-
71 bool ascending = order_algorithm == Orders.ASC;
-
72 std::mt19937 g{ 173 };
-
73 while (!finished) {
-
74 // Step 1: Build ranking with mutual information
-
75 auto featureSelection = metrics.SelectKBestWeighted(weights_, ascending, n); // Get all the features sorted
-
76 if (order_algorithm == Orders.RAND) {
-
77 std::shuffle(featureSelection.begin(), featureSelection.end(), g);
-
78 }
-
79 // Remove used features
-
80 featureSelection.erase(remove_if(begin(featureSelection), end(featureSelection), [&](auto x)
-
81 { return std::find(begin(featuresUsed), end(featuresUsed), x) != end(featuresUsed);}),
-
82 end(featureSelection)
-
83 );
-
84 int k = bisection ? pow(2, tolerance) : 1;
-
85 int counter = 0; // The model counter of the current pack
-
86 // VLOG_SCOPE_F(1, "counter=%d k=%d featureSelection.size: %zu", counter, k, featureSelection.size());
-
87 while (counter++ < k && featureSelection.size() > 0) {
-
88 auto feature = featureSelection[0];
-
89 featureSelection.erase(featureSelection.begin());
-
90 std::unique_ptr<Classifier> model;
-
91 model = std::make_unique<SPODE>(feature);
-
92 model->fit(dataset, features, className, states, weights_);
-
93 alpha_t = 0.0;
-
94 if (!block_update) {
-
95 auto ypred = model->predict(X_train);
-
96 // Step 3.1: Compute the classifier amout of say
-
97 std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-
98 }
-
99 // Step 3.4: Store classifier and its accuracy to weigh its future vote
-
100 numItemsPack++;
-
101 featuresUsed.push_back(feature);
-
102 models.push_back(std::move(model));
-
103 significanceModels.push_back(alpha_t);
-
104 n_models++;
-
105 // VLOG_SCOPE_F(2, "numItemsPack: %d n_models: %d featuresUsed: %zu", numItemsPack, n_models, featuresUsed.size());
-
106 }
-
107 if (block_update) {
-
108 std::tie(weights_, alpha_t, finished) = update_weights_block(k, y_train, weights_);
-
109 }
-
110 if (convergence && !finished) {
-
111 auto y_val_predict = predict(X_test);
-
112 double accuracy = (y_val_predict == y_test).sum().item<double>() / (double)y_test.size(0);
-
113 if (priorAccuracy == 0) {
-
114 priorAccuracy = accuracy;
-
115 } else {
-
116 improvement = accuracy - priorAccuracy;
-
117 }
-
118 if (improvement < convergence_threshold) {
-
119 // VLOG_SCOPE_F(3, " (improvement<threshold) tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-
120 tolerance++;
-
121 } else {
-
122 // VLOG_SCOPE_F(3, "* (improvement>=threshold) Reset. tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-
123 tolerance = 0; // Reset the counter if the model performs better
-
124 numItemsPack = 0;
-
125 }
-
126 if (convergence_best) {
-
127 // Keep the best accuracy until now as the prior accuracy
-
128 priorAccuracy = std::max(accuracy, priorAccuracy);
-
129 } else {
-
130 // Keep the last accuray obtained as the prior accuracy
-
131 priorAccuracy = accuracy;
-
132 }
-
133 }
-
134 // VLOG_SCOPE_F(1, "tolerance: %d featuresUsed.size: %zu features.size: %zu", tolerance, featuresUsed.size(), features.size());
-
135 finished = finished || tolerance > maxTolerance || featuresUsed.size() == features.size();
-
136 }
-
137 if (tolerance > maxTolerance) {
-
138 if (numItemsPack < n_models) {
-
139 notes.push_back("Convergence threshold reached & " + std::to_string(numItemsPack) + " models eliminated");
-
140 // VLOG_SCOPE_F(4, "Convergence threshold reached & %d models eliminated of %d", numItemsPack, n_models);
-
141 for (int i = 0; i < numItemsPack; ++i) {
-
142 significanceModels.pop_back();
-
143 models.pop_back();
-
144 n_models--;
-
145 }
-
146 } else {
-
147 notes.push_back("Convergence threshold reached & 0 models eliminated");
-
148 // VLOG_SCOPE_F(4, "Convergence threshold reached & 0 models eliminated n_models=%d numItemsPack=%d", n_models, numItemsPack);
-
149 }
-
150 }
-
151 if (featuresUsed.size() != features.size()) {
-
152 notes.push_back("Used features in train: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()));
-
153 status = WARNING;
-
154 }
-
155 notes.push_back("Number of models: " + std::to_string(n_models));
-
156 }
-
157 std::vector<std::string> BoostAODE::graph(const std::string& title) const
-
158 {
-
159 return Ensemble::graph(title);
-
160 }
-
161}
-
-
- - - - diff --git a/docs/manual/_boost_a_o_d_e_8h_source.html b/docs/manual/_boost_a_o_d_e_8h_source.html deleted file mode 100644 index 7b04ec2..0000000 --- a/docs/manual/_boost_a_o_d_e_8h_source.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostAODE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BoostAODE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef BOOSTAODE_H
-
8#define BOOSTAODE_H
-
9#include <string>
-
10#include <vector>
-
11#include "bayesnet/classifiers/SPODE.h"
-
12#include "Boost.h"
-
13
-
14namespace bayesnet {
-
-
15 class BoostAODE : public Boost {
-
16 public:
-
17 explicit BoostAODE(bool predict_voting = false);
-
18 virtual ~BoostAODE() = default;
-
19 std::vector<std::string> graph(const std::string& title = "BoostAODE") const override;
-
20 protected:
-
21 void trainModel(const torch::Tensor& weights) override;
-
22 private:
-
23 std::vector<int> initializeModels();
-
24 };
-
-
25}
-
26#endif
- - -
-
- - - - diff --git a/docs/manual/_classifier_8cc_source.html b/docs/manual/_classifier_8cc_source.html deleted file mode 100644 index 7d8cd8c..0000000 --- a/docs/manual/_classifier_8cc_source.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Classifier.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Classifier.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include <sstream>
-
8#include "bayesnet/utils/bayesnetUtils.h"
-
9#include "Classifier.h"
-
10
-
11namespace bayesnet {
-
12 Classifier::Classifier(Network model) : model(model), m(0), n(0), metrics(Metrics()), fitted(false) {}
-
13 const std::string CLASSIFIER_NOT_FITTED = "Classifier has not been fitted";
-
14 Classifier& Classifier::build(const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights)
-
15 {
-
16 this->features = features;
-
17 this->className = className;
-
18 this->states = states;
-
19 m = dataset.size(1);
-
20 n = features.size();
-
21 checkFitParameters();
-
22 auto n_classes = states.at(className).size();
-
23 metrics = Metrics(dataset, features, className, n_classes);
-
24 model.initialize();
-
25 buildModel(weights);
-
26 trainModel(weights);
-
27 fitted = true;
-
28 return *this;
-
29 }
-
30 void Classifier::buildDataset(torch::Tensor& ytmp)
-
31 {
-
32 try {
-
33 auto yresized = torch::transpose(ytmp.view({ ytmp.size(0), 1 }), 0, 1);
-
34 dataset = torch::cat({ dataset, yresized }, 0);
-
35 }
-
36 catch (const std::exception& e) {
-
37 std::stringstream oss;
-
38 oss << "* Error in X and y dimensions *\n";
-
39 oss << "X dimensions: " << dataset.sizes() << "\n";
-
40 oss << "y dimensions: " << ytmp.sizes();
-
41 throw std::runtime_error(oss.str());
-
42 }
-
43 }
-
44 void Classifier::trainModel(const torch::Tensor& weights)
-
45 {
-
46 model.fit(dataset, weights, features, className, states);
-
47 }
-
48 // X is nxm where n is the number of features and m the number of samples
-
49 Classifier& Classifier::fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states)
-
50 {
-
51 dataset = X;
-
52 buildDataset(y);
-
53 const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-
54 return build(features, className, states, weights);
-
55 }
-
56 // X is nxm where n is the number of features and m the number of samples
-
57 Classifier& Classifier::fit(std::vector<std::vector<int>>& X, std::vector<int>& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states)
-
58 {
-
59 dataset = torch::zeros({ static_cast<int>(X.size()), static_cast<int>(X[0].size()) }, torch::kInt32);
-
60 for (int i = 0; i < X.size(); ++i) {
-
61 dataset.index_put_({ i, "..." }, torch::tensor(X[i], torch::kInt32));
-
62 }
-
63 auto ytmp = torch::tensor(y, torch::kInt32);
-
64 buildDataset(ytmp);
-
65 const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-
66 return build(features, className, states, weights);
-
67 }
-
68 Classifier& Classifier::fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states)
-
69 {
-
70 this->dataset = dataset;
-
71 const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-
72 return build(features, className, states, weights);
-
73 }
-
74 Classifier& Classifier::fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights)
-
75 {
-
76 this->dataset = dataset;
-
77 return build(features, className, states, weights);
-
78 }
-
79 void Classifier::checkFitParameters()
-
80 {
-
81 if (torch::is_floating_point(dataset)) {
-
82 throw std::invalid_argument("dataset (X, y) must be of type Integer");
-
83 }
-
84 if (dataset.size(0) - 1 != features.size()) {
-
85 throw std::invalid_argument("Classifier: X " + std::to_string(dataset.size(0) - 1) + " and features " + std::to_string(features.size()) + " must have the same number of features");
-
86 }
-
87 if (states.find(className) == states.end()) {
-
88 throw std::invalid_argument("class name not found in states");
-
89 }
-
90 for (auto feature : features) {
-
91 if (states.find(feature) == states.end()) {
-
92 throw std::invalid_argument("feature [" + feature + "] not found in states");
-
93 }
-
94 }
-
95 }
-
96 torch::Tensor Classifier::predict(torch::Tensor& X)
-
97 {
-
98 if (!fitted) {
-
99 throw std::logic_error(CLASSIFIER_NOT_FITTED);
-
100 }
-
101 return model.predict(X);
-
102 }
-
103 std::vector<int> Classifier::predict(std::vector<std::vector<int>>& X)
-
104 {
-
105 if (!fitted) {
-
106 throw std::logic_error(CLASSIFIER_NOT_FITTED);
-
107 }
-
108 auto m_ = X[0].size();
-
109 auto n_ = X.size();
-
110 std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));
-
111 for (auto i = 0; i < n_; i++) {
-
112 Xd[i] = std::vector<int>(X[i].begin(), X[i].end());
-
113 }
-
114 auto yp = model.predict(Xd);
-
115 return yp;
-
116 }
-
117 torch::Tensor Classifier::predict_proba(torch::Tensor& X)
-
118 {
-
119 if (!fitted) {
-
120 throw std::logic_error(CLASSIFIER_NOT_FITTED);
-
121 }
-
122 return model.predict_proba(X);
-
123 }
-
124 std::vector<std::vector<double>> Classifier::predict_proba(std::vector<std::vector<int>>& X)
-
125 {
-
126 if (!fitted) {
-
127 throw std::logic_error(CLASSIFIER_NOT_FITTED);
-
128 }
-
129 auto m_ = X[0].size();
-
130 auto n_ = X.size();
-
131 std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));
-
132 // Convert to nxm vector
-
133 for (auto i = 0; i < n_; i++) {
-
134 Xd[i] = std::vector<int>(X[i].begin(), X[i].end());
-
135 }
-
136 auto yp = model.predict_proba(Xd);
-
137 return yp;
-
138 }
-
139 float Classifier::score(torch::Tensor& X, torch::Tensor& y)
-
140 {
-
141 torch::Tensor y_pred = predict(X);
-
142 return (y_pred == y).sum().item<float>() / y.size(0);
-
143 }
-
144 float Classifier::score(std::vector<std::vector<int>>& X, std::vector<int>& y)
-
145 {
-
146 if (!fitted) {
-
147 throw std::logic_error(CLASSIFIER_NOT_FITTED);
-
148 }
-
149 return model.score(X, y);
-
150 }
-
151 std::vector<std::string> Classifier::show() const
-
152 {
-
153 return model.show();
-
154 }
-
155 void Classifier::addNodes()
-
156 {
-
157 // Add all nodes to the network
-
158 for (const auto& feature : features) {
-
159 model.addNode(feature);
-
160 }
-
161 model.addNode(className);
-
162 }
-
163 int Classifier::getNumberOfNodes() const
-
164 {
-
165 // Features does not include class
-
166 return fitted ? model.getFeatures().size() : 0;
-
167 }
-
168 int Classifier::getNumberOfEdges() const
-
169 {
-
170 return fitted ? model.getNumEdges() : 0;
-
171 }
-
172 int Classifier::getNumberOfStates() const
-
173 {
-
174 return fitted ? model.getStates() : 0;
-
175 }
-
176 int Classifier::getClassNumStates() const
-
177 {
-
178 return fitted ? model.getClassNumStates() : 0;
-
179 }
-
180 std::vector<std::string> Classifier::topological_order()
-
181 {
-
182 return model.topological_sort();
-
183 }
-
184 std::string Classifier::dump_cpt() const
-
185 {
-
186 return model.dump_cpt();
-
187 }
-
188 void Classifier::setHyperparameters(const nlohmann::json& hyperparameters)
-
189 {
-
190 if (!hyperparameters.empty()) {
-
191 throw std::invalid_argument("Invalid hyperparameters" + hyperparameters.dump());
-
192 }
-
193 }
-
194}
-
-
- - - - diff --git a/docs/manual/_classifier_8h_source.html b/docs/manual/_classifier_8h_source.html deleted file mode 100644 index 5b39713..0000000 --- a/docs/manual/_classifier_8h_source.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Classifier.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Classifier.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef CLASSIFIER_H
-
8#define CLASSIFIER_H
-
9#include <torch/torch.h>
-
10#include "bayesnet/utils/BayesMetrics.h"
-
11#include "bayesnet/network/Network.h"
-
12#include "bayesnet/BaseClassifier.h"
-
13
-
14namespace bayesnet {
-
-
15 class Classifier : public BaseClassifier {
-
16 public:
-
17 Classifier(Network model);
-
18 virtual ~Classifier() = default;
-
19 Classifier& fit(std::vector<std::vector<int>>& X, std::vector<int>& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) override;
-
20 Classifier& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) override;
-
21 Classifier& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) override;
-
22 Classifier& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights) override;
-
23 void addNodes();
-
24 int getNumberOfNodes() const override;
-
25 int getNumberOfEdges() const override;
-
26 int getNumberOfStates() const override;
-
27 int getClassNumStates() const override;
-
28 torch::Tensor predict(torch::Tensor& X) override;
-
29 std::vector<int> predict(std::vector<std::vector<int>>& X) override;
-
30 torch::Tensor predict_proba(torch::Tensor& X) override;
-
31 std::vector<std::vector<double>> predict_proba(std::vector<std::vector<int>>& X) override;
-
32 status_t getStatus() const override { return status; }
-
33 std::string getVersion() override { return { project_version.begin(), project_version.end() }; };
-
34 float score(torch::Tensor& X, torch::Tensor& y) override;
-
35 float score(std::vector<std::vector<int>>& X, std::vector<int>& y) override;
-
36 std::vector<std::string> show() const override;
-
37 std::vector<std::string> topological_order() override;
-
38 std::vector<std::string> getNotes() const override { return notes; }
-
39 std::string dump_cpt() const override;
-
40 void setHyperparameters(const nlohmann::json& hyperparameters) override; //For classifiers that don't have hyperparameters
-
41 protected:
-
42 bool fitted;
-
43 unsigned int m, n; // m: number of samples, n: number of features
-
44 Network model;
-
45 Metrics metrics;
-
46 std::vector<std::string> features;
-
47 std::string className;
-
48 std::map<std::string, std::vector<int>> states;
-
49 torch::Tensor dataset; // (n+1)xm tensor
-
50 status_t status = NORMAL;
-
51 std::vector<std::string> notes; // Used to store messages occurred during the fit process
-
52 void checkFitParameters();
-
53 virtual void buildModel(const torch::Tensor& weights) = 0;
-
54 void trainModel(const torch::Tensor& weights) override;
-
55 void buildDataset(torch::Tensor& y);
-
56 private:
-
57 Classifier& build(const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights);
-
58 };
-
-
59}
-
60#endif
-
61
-
62
-
63
-
64
-
65
- - - -
-
- - - - diff --git a/docs/manual/_ensemble_8cc_source.html b/docs/manual/_ensemble_8cc_source.html deleted file mode 100644 index 7cffac3..0000000 --- a/docs/manual/_ensemble_8cc_source.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Ensemble.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Ensemble.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "Ensemble.h"
-
8
-
9namespace bayesnet {
-
10
-
11 Ensemble::Ensemble(bool predict_voting) : Classifier(Network()), n_models(0), predict_voting(predict_voting)
-
12 {
-
13
-
14 };
-
15 const std::string ENSEMBLE_NOT_FITTED = "Ensemble has not been fitted";
-
16 void Ensemble::trainModel(const torch::Tensor& weights)
-
17 {
-
18 n_models = models.size();
-
19 for (auto i = 0; i < n_models; ++i) {
-
20 // fit with std::vectors
-
21 models[i]->fit(dataset, features, className, states);
-
22 }
-
23 }
-
24 std::vector<int> Ensemble::compute_arg_max(std::vector<std::vector<double>>& X)
-
25 {
-
26 std::vector<int> y_pred;
-
27 for (auto i = 0; i < X.size(); ++i) {
-
28 auto max = std::max_element(X[i].begin(), X[i].end());
-
29 y_pred.push_back(std::distance(X[i].begin(), max));
-
30 }
-
31 return y_pred;
-
32 }
-
33 torch::Tensor Ensemble::compute_arg_max(torch::Tensor& X)
-
34 {
-
35 auto y_pred = torch::argmax(X, 1);
-
36 return y_pred;
-
37 }
-
38 torch::Tensor Ensemble::voting(torch::Tensor& votes)
-
39 {
-
40 // Convert m x n_models tensor to a m x n_class_states with voting probabilities
-
41 auto y_pred_ = votes.accessor<int, 2>();
-
42 std::vector<int> y_pred_final;
-
43 int numClasses = states.at(className).size();
-
44 // votes is m x n_models with the prediction of every model for each sample
-
45 auto result = torch::zeros({ votes.size(0), numClasses }, torch::kFloat32);
-
46 auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-
47 for (int i = 0; i < votes.size(0); ++i) {
-
48 // n_votes store in each index (value of class) the significance added by each model
-
49 // i.e. n_votes[0] contains how much value has the value 0 of class. That value is generated by the models predictions
-
50 std::vector<double> n_votes(numClasses, 0.0);
-
51 for (int j = 0; j < n_models; ++j) {
-
52 n_votes[y_pred_[i][j]] += significanceModels.at(j);
-
53 }
-
54 result[i] = torch::tensor(n_votes);
-
55 }
-
56 // To only do one division and gain precision
-
57 result /= sum;
-
58 return result;
-
59 }
-
60 std::vector<std::vector<double>> Ensemble::predict_proba(std::vector<std::vector<int>>& X)
-
61 {
-
62 if (!fitted) {
-
63 throw std::logic_error(ENSEMBLE_NOT_FITTED);
-
64 }
-
65 return predict_voting ? predict_average_voting(X) : predict_average_proba(X);
-
66 }
-
67 torch::Tensor Ensemble::predict_proba(torch::Tensor& X)
-
68 {
-
69 if (!fitted) {
-
70 throw std::logic_error(ENSEMBLE_NOT_FITTED);
-
71 }
-
72 return predict_voting ? predict_average_voting(X) : predict_average_proba(X);
-
73 }
-
74 std::vector<int> Ensemble::predict(std::vector<std::vector<int>>& X)
-
75 {
-
76 auto res = predict_proba(X);
-
77 return compute_arg_max(res);
-
78 }
-
79 torch::Tensor Ensemble::predict(torch::Tensor& X)
-
80 {
-
81 auto res = predict_proba(X);
-
82 return compute_arg_max(res);
-
83 }
-
84 torch::Tensor Ensemble::predict_average_proba(torch::Tensor& X)
-
85 {
-
86 auto n_states = models[0]->getClassNumStates();
-
87 torch::Tensor y_pred = torch::zeros({ X.size(1), n_states }, torch::kFloat32);
-
88 auto threads{ std::vector<std::thread>() };
-
89 std::mutex mtx;
-
90 for (auto i = 0; i < n_models; ++i) {
-
91 threads.push_back(std::thread([&, i]() {
-
92 auto ypredict = models[i]->predict_proba(X);
-
93 std::lock_guard<std::mutex> lock(mtx);
-
94 y_pred += ypredict * significanceModels[i];
-
95 }));
-
96 }
-
97 for (auto& thread : threads) {
-
98 thread.join();
-
99 }
-
100 auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-
101 y_pred /= sum;
-
102 return y_pred;
-
103 }
-
104 std::vector<std::vector<double>> Ensemble::predict_average_proba(std::vector<std::vector<int>>& X)
-
105 {
-
106 auto n_states = models[0]->getClassNumStates();
-
107 std::vector<std::vector<double>> y_pred(X[0].size(), std::vector<double>(n_states, 0.0));
-
108 auto threads{ std::vector<std::thread>() };
-
109 std::mutex mtx;
-
110 for (auto i = 0; i < n_models; ++i) {
-
111 threads.push_back(std::thread([&, i]() {
-
112 auto ypredict = models[i]->predict_proba(X);
-
113 assert(ypredict.size() == y_pred.size());
-
114 assert(ypredict[0].size() == y_pred[0].size());
-
115 std::lock_guard<std::mutex> lock(mtx);
-
116 // Multiply each prediction by the significance of the model and then add it to the final prediction
-
117 for (auto j = 0; j < ypredict.size(); ++j) {
-
118 std::transform(y_pred[j].begin(), y_pred[j].end(), ypredict[j].begin(), y_pred[j].begin(),
-
119 [significanceModels = significanceModels[i]](double x, double y) { return x + y * significanceModels; });
-
120 }
-
121 }));
-
122 }
-
123 for (auto& thread : threads) {
-
124 thread.join();
-
125 }
-
126 auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-
127 //Divide each element of the prediction by the sum of the significances
-
128 for (auto j = 0; j < y_pred.size(); ++j) {
-
129 std::transform(y_pred[j].begin(), y_pred[j].end(), y_pred[j].begin(), [sum](double x) { return x / sum; });
-
130 }
-
131 return y_pred;
-
132 }
-
133 std::vector<std::vector<double>> Ensemble::predict_average_voting(std::vector<std::vector<int>>& X)
-
134 {
-
135 torch::Tensor Xt = bayesnet::vectorToTensor(X, false);
-
136 auto y_pred = predict_average_voting(Xt);
-
137 std::vector<std::vector<double>> result = tensorToVectorDouble(y_pred);
-
138 return result;
-
139 }
-
140 torch::Tensor Ensemble::predict_average_voting(torch::Tensor& X)
-
141 {
-
142 // Build a m x n_models tensor with the predictions of each model
-
143 torch::Tensor y_pred = torch::zeros({ X.size(1), n_models }, torch::kInt32);
-
144 auto threads{ std::vector<std::thread>() };
-
145 std::mutex mtx;
-
146 for (auto i = 0; i < n_models; ++i) {
-
147 threads.push_back(std::thread([&, i]() {
-
148 auto ypredict = models[i]->predict(X);
-
149 std::lock_guard<std::mutex> lock(mtx);
-
150 y_pred.index_put_({ "...", i }, ypredict);
-
151 }));
-
152 }
-
153 for (auto& thread : threads) {
-
154 thread.join();
-
155 }
-
156 return voting(y_pred);
-
157 }
-
158 float Ensemble::score(torch::Tensor& X, torch::Tensor& y)
-
159 {
-
160 auto y_pred = predict(X);
-
161 int correct = 0;
-
162 for (int i = 0; i < y_pred.size(0); ++i) {
-
163 if (y_pred[i].item<int>() == y[i].item<int>()) {
-
164 correct++;
-
165 }
-
166 }
-
167 return (double)correct / y_pred.size(0);
-
168 }
-
169 float Ensemble::score(std::vector<std::vector<int>>& X, std::vector<int>& y)
-
170 {
-
171 auto y_pred = predict(X);
-
172 int correct = 0;
-
173 for (int i = 0; i < y_pred.size(); ++i) {
-
174 if (y_pred[i] == y[i]) {
-
175 correct++;
-
176 }
-
177 }
-
178 return (double)correct / y_pred.size();
-
179 }
-
180 std::vector<std::string> Ensemble::show() const
-
181 {
-
182 auto result = std::vector<std::string>();
-
183 for (auto i = 0; i < n_models; ++i) {
-
184 auto res = models[i]->show();
-
185 result.insert(result.end(), res.begin(), res.end());
-
186 }
-
187 return result;
-
188 }
-
189 std::vector<std::string> Ensemble::graph(const std::string& title) const
-
190 {
-
191 auto result = std::vector<std::string>();
-
192 for (auto i = 0; i < n_models; ++i) {
-
193 auto res = models[i]->graph(title + "_" + std::to_string(i));
-
194 result.insert(result.end(), res.begin(), res.end());
-
195 }
-
196 return result;
-
197 }
-
198 int Ensemble::getNumberOfNodes() const
-
199 {
-
200 int nodes = 0;
-
201 for (auto i = 0; i < n_models; ++i) {
-
202 nodes += models[i]->getNumberOfNodes();
-
203 }
-
204 return nodes;
-
205 }
-
206 int Ensemble::getNumberOfEdges() const
-
207 {
-
208 int edges = 0;
-
209 for (auto i = 0; i < n_models; ++i) {
-
210 edges += models[i]->getNumberOfEdges();
-
211 }
-
212 return edges;
-
213 }
-
214 int Ensemble::getNumberOfStates() const
-
215 {
-
216 int nstates = 0;
-
217 for (auto i = 0; i < n_models; ++i) {
-
218 nstates += models[i]->getNumberOfStates();
-
219 }
-
220 return nstates;
-
221 }
-
222}
-
-
- - - - diff --git a/docs/manual/_ensemble_8h_source.html b/docs/manual/_ensemble_8h_source.html deleted file mode 100644 index 716f7f8..0000000 --- a/docs/manual/_ensemble_8h_source.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Ensemble.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Ensemble.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef ENSEMBLE_H
-
8#define ENSEMBLE_H
-
9#include <torch/torch.h>
-
10#include "bayesnet/utils/BayesMetrics.h"
-
11#include "bayesnet/utils/bayesnetUtils.h"
-
12#include "bayesnet/classifiers/Classifier.h"
-
13
-
14namespace bayesnet {
-
-
15 class Ensemble : public Classifier {
-
16 public:
-
17 Ensemble(bool predict_voting = true);
-
18 virtual ~Ensemble() = default;
-
19 torch::Tensor predict(torch::Tensor& X) override;
-
20 std::vector<int> predict(std::vector<std::vector<int>>& X) override;
-
21 torch::Tensor predict_proba(torch::Tensor& X) override;
-
22 std::vector<std::vector<double>> predict_proba(std::vector<std::vector<int>>& X) override;
-
23 float score(torch::Tensor& X, torch::Tensor& y) override;
-
24 float score(std::vector<std::vector<int>>& X, std::vector<int>& y) override;
-
25 int getNumberOfNodes() const override;
-
26 int getNumberOfEdges() const override;
-
27 int getNumberOfStates() const override;
-
28 std::vector<std::string> show() const override;
-
29 std::vector<std::string> graph(const std::string& title) const override;
-
30 std::vector<std::string> topological_order() override
-
31 {
-
32 return std::vector<std::string>();
-
33 }
-
34 std::string dump_cpt() const override
-
35 {
-
36 return "";
-
37 }
-
38 protected:
-
39 torch::Tensor predict_average_voting(torch::Tensor& X);
-
40 std::vector<std::vector<double>> predict_average_voting(std::vector<std::vector<int>>& X);
-
41 torch::Tensor predict_average_proba(torch::Tensor& X);
-
42 std::vector<std::vector<double>> predict_average_proba(std::vector<std::vector<int>>& X);
-
43 torch::Tensor compute_arg_max(torch::Tensor& X);
-
44 std::vector<int> compute_arg_max(std::vector<std::vector<double>>& X);
-
45 torch::Tensor voting(torch::Tensor& votes);
-
46 unsigned n_models;
-
47 std::vector<std::unique_ptr<Classifier>> models;
-
48 std::vector<double> significanceModels;
-
49 void trainModel(const torch::Tensor& weights) override;
-
50 bool predict_voting;
-
51 };
-
-
52}
-
53#endif
- - -
-
- - - - diff --git a/docs/manual/_k_d_b_8cc_source.html b/docs/manual/_k_d_b_8cc_source.html deleted file mode 100644 index 0bf9c42..0000000 --- a/docs/manual/_k_d_b_8cc_source.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDB.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
KDB.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "KDB.h"
-
8
-
9namespace bayesnet {
-
10 KDB::KDB(int k, float theta) : Classifier(Network()), k(k), theta(theta)
-
11 {
-
12 validHyperparameters = { "k", "theta" };
-
13
-
14 }
-
15 void KDB::setHyperparameters(const nlohmann::json& hyperparameters_)
-
16 {
-
17 auto hyperparameters = hyperparameters_;
-
18 if (hyperparameters.contains("k")) {
-
19 k = hyperparameters["k"];
-
20 hyperparameters.erase("k");
-
21 }
-
22 if (hyperparameters.contains("theta")) {
-
23 theta = hyperparameters["theta"];
-
24 hyperparameters.erase("theta");
-
25 }
-
26 Classifier::setHyperparameters(hyperparameters);
-
27 }
-
28 void KDB::buildModel(const torch::Tensor& weights)
-
29 {
-
30 /*
-
31 1. For each feature Xi, compute mutual information, I(X;C),
-
32 where C is the class.
-
33 2. Compute class conditional mutual information I(Xi;XjIC), f or each
-
34 pair of features Xi and Xj, where i#j.
-
35 3. Let the used variable list, S, be empty.
-
36 4. Let the DAG network being constructed, BN, begin with a single
-
37 class node, C.
-
38 5. Repeat until S includes all domain features
-
39 5.1. Select feature Xmax which is not in S and has the largest value
-
40 I(Xmax;C).
-
41 5.2. Add a node to BN representing Xmax.
-
42 5.3. Add an arc from C to Xmax in BN.
-
43 5.4. Add m = min(lSl,/c) arcs from m distinct features Xj in S with
-
44 the highest value for I(Xmax;X,jC).
-
45 5.5. Add Xmax to S.
-
46 Compute the conditional probabilility infered by the structure of BN by
-
47 using counts from DB, and output BN.
-
48 */
-
49 // 1. For each feature Xi, compute mutual information, I(X;C),
-
50 // where C is the class.
-
51 addNodes();
-
52 const torch::Tensor& y = dataset.index({ -1, "..." });
-
53 std::vector<double> mi;
-
54 for (auto i = 0; i < features.size(); i++) {
-
55 torch::Tensor firstFeature = dataset.index({ i, "..." });
-
56 mi.push_back(metrics.mutualInformation(firstFeature, y, weights));
-
57 }
-
58 // 2. Compute class conditional mutual information I(Xi;XjIC), f or each
-
59 auto conditionalEdgeWeights = metrics.conditionalEdge(weights);
-
60 // 3. Let the used variable list, S, be empty.
-
61 std::vector<int> S;
-
62 // 4. Let the DAG network being constructed, BN, begin with a single
-
63 // class node, C.
-
64 // 5. Repeat until S includes all domain features
-
65 // 5.1. Select feature Xmax which is not in S and has the largest value
-
66 // I(Xmax;C).
-
67 auto order = argsort(mi);
-
68 for (auto idx : order) {
-
69 // 5.2. Add a node to BN representing Xmax.
-
70 // 5.3. Add an arc from C to Xmax in BN.
-
71 model.addEdge(className, features[idx]);
-
72 // 5.4. Add m = min(lSl,/c) arcs from m distinct features Xj in S with
-
73 // the highest value for I(Xmax;X,jC).
-
74 add_m_edges(idx, S, conditionalEdgeWeights);
-
75 // 5.5. Add Xmax to S.
-
76 S.push_back(idx);
-
77 }
-
78 }
-
79 void KDB::add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights)
-
80 {
-
81 auto n_edges = std::min(k, static_cast<int>(S.size()));
-
82 auto cond_w = clone(weights);
-
83 bool exit_cond = k == 0;
-
84 int num = 0;
-
85 while (!exit_cond) {
-
86 auto max_minfo = argmax(cond_w.index({ idx, "..." })).item<int>();
-
87 auto belongs = find(S.begin(), S.end(), max_minfo) != S.end();
-
88 if (belongs && cond_w.index({ idx, max_minfo }).item<float>() > theta) {
-
89 try {
-
90 model.addEdge(features[max_minfo], features[idx]);
-
91 num++;
-
92 }
-
93 catch (const std::invalid_argument& e) {
-
94 // Loops are not allowed
-
95 }
-
96 }
-
97 cond_w.index_put_({ idx, max_minfo }, -1);
-
98 auto candidates_mask = cond_w.index({ idx, "..." }).gt(theta);
-
99 auto candidates = candidates_mask.nonzero();
-
100 exit_cond = num == n_edges || candidates.size(0) == 0;
-
101 }
-
102 }
-
103 std::vector<std::string> KDB::graph(const std::string& title) const
-
104 {
-
105 std::string header{ title };
-
106 if (title == "KDB") {
-
107 header += " (k=" + std::to_string(k) + ", theta=" + std::to_string(theta) + ")";
-
108 }
-
109 return model.graph(header);
-
110 }
-
111}
-
-
- - - - diff --git a/docs/manual/_k_d_b_8h_source.html b/docs/manual/_k_d_b_8h_source.html deleted file mode 100644 index 57a4623..0000000 --- a/docs/manual/_k_d_b_8h_source.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDB.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
KDB.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef KDB_H
-
8#define KDB_H
-
9#include <torch/torch.h>
-
10#include "bayesnet/utils/bayesnetUtils.h"
-
11#include "Classifier.h"
-
12namespace bayesnet {
-
-
13 class KDB : public Classifier {
-
14 private:
-
15 int k;
-
16 float theta;
-
17 void add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights);
-
18 protected:
-
19 void buildModel(const torch::Tensor& weights) override;
-
20 public:
-
21 explicit KDB(int k, float theta = 0.03);
-
22 virtual ~KDB() = default;
-
23 void setHyperparameters(const nlohmann::json& hyperparameters_) override;
-
24 std::vector<std::string> graph(const std::string& name = "KDB") const override;
-
25 };
-
-
26}
-
27#endif
- - -
-
- - - - diff --git a/docs/manual/_k_d_b_ld_8cc_source.html b/docs/manual/_k_d_b_ld_8cc_source.html deleted file mode 100644 index 4ee98ea..0000000 --- a/docs/manual/_k_d_b_ld_8cc_source.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDBLd.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
KDBLd.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "KDBLd.h"
-
8
-
9namespace bayesnet {
-
10 KDBLd::KDBLd(int k) : KDB(k), Proposal(dataset, features, className) {}
-
11 KDBLd& KDBLd::fit(torch::Tensor& X_, torch::Tensor& y_, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
12 {
-
13 checkInput(X_, y_);
-
14 features = features_;
-
15 className = className_;
-
16 Xf = X_;
-
17 y = y_;
-
18 // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-
19 states = fit_local_discretization(y);
-
20 // We have discretized the input data
-
21 // 1st we need to fit the model to build the normal KDB structure, KDB::fit initializes the base Bayesian network
-
22 KDB::fit(dataset, features, className, states);
-
23 states = localDiscretizationProposal(states, model);
-
24 return *this;
-
25 }
-
26 torch::Tensor KDBLd::predict(torch::Tensor& X)
-
27 {
-
28 auto Xt = prepareX(X);
-
29 return KDB::predict(Xt);
-
30 }
-
31 std::vector<std::string> KDBLd::graph(const std::string& name) const
-
32 {
-
33 return KDB::graph(name);
-
34 }
-
35}
-
-
- - - - diff --git a/docs/manual/_k_d_b_ld_8h_source.html b/docs/manual/_k_d_b_ld_8h_source.html deleted file mode 100644 index 3c26e26..0000000 --- a/docs/manual/_k_d_b_ld_8h_source.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDBLd.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
KDBLd.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef KDBLD_H
-
8#define KDBLD_H
-
9#include "Proposal.h"
-
10#include "KDB.h"
-
11
-
12namespace bayesnet {
-
-
13 class KDBLd : public KDB, public Proposal {
-
14 private:
-
15 public:
-
16 explicit KDBLd(int k);
-
17 virtual ~KDBLd() = default;
-
18 KDBLd& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;
-
19 std::vector<std::string> graph(const std::string& name = "KDB") const override;
-
20 torch::Tensor predict(torch::Tensor& X) override;
-
21 static inline std::string version() { return "0.0.1"; };
-
22 };
-
-
23}
-
24#endif // !KDBLD_H
- - - -
-
- - - - diff --git a/docs/manual/_network_8cc_source.html b/docs/manual/_network_8cc_source.html deleted file mode 100644 index 2f277c8..0000000 --- a/docs/manual/_network_8cc_source.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/network/Network.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Network.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include <thread>
-
8#include <mutex>
-
9#include <sstream>
-
10#include "Network.h"
-
11#include "bayesnet/utils/bayesnetUtils.h"
-
12namespace bayesnet {
-
13 Network::Network() : fitted{ false }, maxThreads{ 0.95 }, classNumStates{ 0 }, laplaceSmoothing{ 0 }
-
14 {
-
15 }
-
16 Network::Network(float maxT) : fitted{ false }, maxThreads{ maxT }, classNumStates{ 0 }, laplaceSmoothing{ 0 }
-
17 {
-
18
-
19 }
-
20 Network::Network(const Network& other) : laplaceSmoothing(other.laplaceSmoothing), features(other.features), className(other.className), classNumStates(other.getClassNumStates()),
-
21 maxThreads(other.getMaxThreads()), fitted(other.fitted), samples(other.samples)
-
22 {
-
23 if (samples.defined())
-
24 samples = samples.clone();
-
25 for (const auto& node : other.nodes) {
-
26 nodes[node.first] = std::make_unique<Node>(*node.second);
-
27 }
-
28 }
-
29 void Network::initialize()
-
30 {
-
31 features.clear();
-
32 className = "";
-
33 classNumStates = 0;
-
34 fitted = false;
-
35 nodes.clear();
-
36 samples = torch::Tensor();
-
37 }
-
38 float Network::getMaxThreads() const
-
39 {
-
40 return maxThreads;
-
41 }
-
42 torch::Tensor& Network::getSamples()
-
43 {
-
44 return samples;
-
45 }
-
46 void Network::addNode(const std::string& name)
-
47 {
-
48 if (name == "") {
-
49 throw std::invalid_argument("Node name cannot be empty");
-
50 }
-
51 if (nodes.find(name) != nodes.end()) {
-
52 return;
-
53 }
-
54 if (find(features.begin(), features.end(), name) == features.end()) {
-
55 features.push_back(name);
-
56 }
-
57 nodes[name] = std::make_unique<Node>(name);
-
58 }
-
59 std::vector<std::string> Network::getFeatures() const
-
60 {
-
61 return features;
-
62 }
-
63 int Network::getClassNumStates() const
-
64 {
-
65 return classNumStates;
-
66 }
-
67 int Network::getStates() const
-
68 {
-
69 int result = 0;
-
70 for (auto& node : nodes) {
-
71 result += node.second->getNumStates();
-
72 }
-
73 return result;
-
74 }
-
75 std::string Network::getClassName() const
-
76 {
-
77 return className;
-
78 }
-
79 bool Network::isCyclic(const std::string& nodeId, std::unordered_set<std::string>& visited, std::unordered_set<std::string>& recStack)
-
80 {
-
81 if (visited.find(nodeId) == visited.end()) // if node hasn't been visited yet
-
82 {
-
83 visited.insert(nodeId);
-
84 recStack.insert(nodeId);
-
85 for (Node* child : nodes[nodeId]->getChildren()) {
-
86 if (visited.find(child->getName()) == visited.end() && isCyclic(child->getName(), visited, recStack))
-
87 return true;
-
88 if (recStack.find(child->getName()) != recStack.end())
-
89 return true;
-
90 }
-
91 }
-
92 recStack.erase(nodeId); // remove node from recursion stack before function ends
-
93 return false;
-
94 }
-
95 void Network::addEdge(const std::string& parent, const std::string& child)
-
96 {
-
97 if (nodes.find(parent) == nodes.end()) {
-
98 throw std::invalid_argument("Parent node " + parent + " does not exist");
-
99 }
-
100 if (nodes.find(child) == nodes.end()) {
-
101 throw std::invalid_argument("Child node " + child + " does not exist");
-
102 }
-
103 // Temporarily add edge to check for cycles
-
104 nodes[parent]->addChild(nodes[child].get());
-
105 nodes[child]->addParent(nodes[parent].get());
-
106 std::unordered_set<std::string> visited;
-
107 std::unordered_set<std::string> recStack;
-
108 if (isCyclic(nodes[child]->getName(), visited, recStack)) // if adding this edge forms a cycle
-
109 {
-
110 // remove problematic edge
-
111 nodes[parent]->removeChild(nodes[child].get());
-
112 nodes[child]->removeParent(nodes[parent].get());
-
113 throw std::invalid_argument("Adding this edge forms a cycle in the graph.");
-
114 }
-
115 }
-
116 std::map<std::string, std::unique_ptr<Node>>& Network::getNodes()
-
117 {
-
118 return nodes;
-
119 }
-
120 void Network::checkFitData(int n_samples, int n_features, int n_samples_y, const std::vector<std::string>& featureNames, const std::string& className, const std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights)
-
121 {
-
122 if (weights.size(0) != n_samples) {
-
123 throw std::invalid_argument("Weights (" + std::to_string(weights.size(0)) + ") must have the same number of elements as samples (" + std::to_string(n_samples) + ") in Network::fit");
-
124 }
-
125 if (n_samples != n_samples_y) {
-
126 throw std::invalid_argument("X and y must have the same number of samples in Network::fit (" + std::to_string(n_samples) + " != " + std::to_string(n_samples_y) + ")");
-
127 }
-
128 if (n_features != featureNames.size()) {
-
129 throw std::invalid_argument("X and features must have the same number of features in Network::fit (" + std::to_string(n_features) + " != " + std::to_string(featureNames.size()) + ")");
-
130 }
-
131 if (features.size() == 0) {
-
132 throw std::invalid_argument("The network has not been initialized. You must call addNode() before calling fit()");
-
133 }
-
134 if (n_features != features.size() - 1) {
-
135 throw std::invalid_argument("X and local features must have the same number of features in Network::fit (" + std::to_string(n_features) + " != " + std::to_string(features.size() - 1) + ")");
-
136 }
-
137 if (find(features.begin(), features.end(), className) == features.end()) {
-
138 throw std::invalid_argument("Class Name not found in Network::features");
-
139 }
-
140 for (auto& feature : featureNames) {
-
141 if (find(features.begin(), features.end(), feature) == features.end()) {
-
142 throw std::invalid_argument("Feature " + feature + " not found in Network::features");
-
143 }
-
144 if (states.find(feature) == states.end()) {
-
145 throw std::invalid_argument("Feature " + feature + " not found in states");
-
146 }
-
147 }
-
148 }
-
149 void Network::setStates(const std::map<std::string, std::vector<int>>& states)
-
150 {
-
151 // Set states to every Node in the network
-
152 for_each(features.begin(), features.end(), [this, &states](const std::string& feature) {
-
153 nodes.at(feature)->setNumStates(states.at(feature).size());
-
154 });
-
155 classNumStates = nodes.at(className)->getNumStates();
-
156 }
-
157 // X comes in nxm, where n is the number of features and m the number of samples
-
158 void 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)
-
159 {
-
160 checkFitData(X.size(1), X.size(0), y.size(0), featureNames, className, states, weights);
-
161 this->className = className;
-
162 torch::Tensor ytmp = torch::transpose(y.view({ y.size(0), 1 }), 0, 1);
-
163 samples = torch::cat({ X , ytmp }, 0);
-
164 for (int i = 0; i < featureNames.size(); ++i) {
-
165 auto row_feature = X.index({ i, "..." });
-
166 }
-
167 completeFit(states, weights);
-
168 }
-
169 void 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)
-
170 {
-
171 checkFitData(samples.size(1), samples.size(0) - 1, samples.size(1), featureNames, className, states, weights);
-
172 this->className = className;
-
173 this->samples = samples;
-
174 completeFit(states, weights);
-
175 }
-
176 // input_data comes in nxm, where n is the number of features and m the number of samples
-
177 void 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)
-
178 {
-
179 const torch::Tensor weights = torch::tensor(weights_, torch::kFloat64);
-
180 checkFitData(input_data[0].size(), input_data.size(), labels.size(), featureNames, className, states, weights);
-
181 this->className = className;
-
182 // Build tensor of samples (nxm) (n+1 because of the class)
-
183 samples = torch::zeros({ static_cast<int>(input_data.size() + 1), static_cast<int>(input_data[0].size()) }, torch::kInt32);
-
184 for (int i = 0; i < featureNames.size(); ++i) {
-
185 samples.index_put_({ i, "..." }, torch::tensor(input_data[i], torch::kInt32));
-
186 }
-
187 samples.index_put_({ -1, "..." }, torch::tensor(labels, torch::kInt32));
-
188 completeFit(states, weights);
-
189 }
-
190 void Network::completeFit(const std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights)
-
191 {
-
192 setStates(states);
-
193 laplaceSmoothing = 1.0 / samples.size(1); // To use in CPT computation
-
194 std::vector<std::thread> threads;
-
195 for (auto& node : nodes) {
-
196 threads.emplace_back([this, &node, &weights]() {
-
197 node.second->computeCPT(samples, features, laplaceSmoothing, weights);
-
198 });
-
199 }
-
200 for (auto& thread : threads) {
-
201 thread.join();
-
202 }
-
203 fitted = true;
-
204 }
-
205 torch::Tensor Network::predict_tensor(const torch::Tensor& samples, const bool proba)
-
206 {
-
207 if (!fitted) {
-
208 throw std::logic_error("You must call fit() before calling predict()");
-
209 }
-
210 torch::Tensor result;
-
211 result = torch::zeros({ samples.size(1), classNumStates }, torch::kFloat64);
-
212 for (int i = 0; i < samples.size(1); ++i) {
-
213 const torch::Tensor sample = samples.index({ "...", i });
-
214 auto psample = predict_sample(sample);
-
215 auto temp = torch::tensor(psample, torch::kFloat64);
-
216 // result.index_put_({ i, "..." }, torch::tensor(predict_sample(sample), torch::kFloat64));
-
217 result.index_put_({ i, "..." }, temp);
-
218 }
-
219 if (proba)
-
220 return result;
-
221 return result.argmax(1);
-
222 }
-
223 // Return mxn tensor of probabilities
-
224 torch::Tensor Network::predict_proba(const torch::Tensor& samples)
-
225 {
-
226 return predict_tensor(samples, true);
-
227 }
-
228
-
229 // Return mxn tensor of probabilities
-
230 torch::Tensor Network::predict(const torch::Tensor& samples)
-
231 {
-
232 return predict_tensor(samples, false);
-
233 }
-
234
-
235 // Return mx1 std::vector of predictions
-
236 // tsamples is nxm std::vector of samples
-
237 std::vector<int> Network::predict(const std::vector<std::vector<int>>& tsamples)
-
238 {
-
239 if (!fitted) {
-
240 throw std::logic_error("You must call fit() before calling predict()");
-
241 }
-
242 std::vector<int> predictions;
-
243 std::vector<int> sample;
-
244 for (int row = 0; row < tsamples[0].size(); ++row) {
-
245 sample.clear();
-
246 for (int col = 0; col < tsamples.size(); ++col) {
-
247 sample.push_back(tsamples[col][row]);
-
248 }
-
249 std::vector<double> classProbabilities = predict_sample(sample);
-
250 // Find the class with the maximum posterior probability
-
251 auto maxElem = max_element(classProbabilities.begin(), classProbabilities.end());
-
252 int predictedClass = distance(classProbabilities.begin(), maxElem);
-
253 predictions.push_back(predictedClass);
-
254 }
-
255 return predictions;
-
256 }
-
257 // Return mxn std::vector of probabilities
-
258 // tsamples is nxm std::vector of samples
-
259 std::vector<std::vector<double>> Network::predict_proba(const std::vector<std::vector<int>>& tsamples)
-
260 {
-
261 if (!fitted) {
-
262 throw std::logic_error("You must call fit() before calling predict_proba()");
-
263 }
-
264 std::vector<std::vector<double>> predictions;
-
265 std::vector<int> sample;
-
266 for (int row = 0; row < tsamples[0].size(); ++row) {
-
267 sample.clear();
-
268 for (int col = 0; col < tsamples.size(); ++col) {
-
269 sample.push_back(tsamples[col][row]);
-
270 }
-
271 predictions.push_back(predict_sample(sample));
-
272 }
-
273 return predictions;
-
274 }
-
275 double Network::score(const std::vector<std::vector<int>>& tsamples, const std::vector<int>& labels)
-
276 {
-
277 std::vector<int> y_pred = predict(tsamples);
-
278 int correct = 0;
-
279 for (int i = 0; i < y_pred.size(); ++i) {
-
280 if (y_pred[i] == labels[i]) {
-
281 correct++;
-
282 }
-
283 }
-
284 return (double)correct / y_pred.size();
-
285 }
-
286 // Return 1xn std::vector of probabilities
-
287 std::vector<double> Network::predict_sample(const std::vector<int>& sample)
-
288 {
-
289 // Ensure the sample size is equal to the number of features
-
290 if (sample.size() != features.size() - 1) {
-
291 throw std::invalid_argument("Sample size (" + std::to_string(sample.size()) +
-
292 ") does not match the number of features (" + std::to_string(features.size() - 1) + ")");
-
293 }
-
294 std::map<std::string, int> evidence;
-
295 for (int i = 0; i < sample.size(); ++i) {
-
296 evidence[features[i]] = sample[i];
-
297 }
-
298 return exactInference(evidence);
-
299 }
-
300 // Return 1xn std::vector of probabilities
-
301 std::vector<double> Network::predict_sample(const torch::Tensor& sample)
-
302 {
-
303 // Ensure the sample size is equal to the number of features
-
304 if (sample.size(0) != features.size() - 1) {
-
305 throw std::invalid_argument("Sample size (" + std::to_string(sample.size(0)) +
-
306 ") does not match the number of features (" + std::to_string(features.size() - 1) + ")");
-
307 }
-
308 std::map<std::string, int> evidence;
-
309 for (int i = 0; i < sample.size(0); ++i) {
-
310 evidence[features[i]] = sample[i].item<int>();
-
311 }
-
312 return exactInference(evidence);
-
313 }
-
314 double Network::computeFactor(std::map<std::string, int>& completeEvidence)
-
315 {
-
316 double result = 1.0;
-
317 for (auto& node : getNodes()) {
-
318 result *= node.second->getFactorValue(completeEvidence);
-
319 }
-
320 return result;
-
321 }
-
322 std::vector<double> Network::exactInference(std::map<std::string, int>& evidence)
-
323 {
-
324 std::vector<double> result(classNumStates, 0.0);
-
325 std::vector<std::thread> threads;
-
326 std::mutex mtx;
-
327 for (int i = 0; i < classNumStates; ++i) {
-
328 threads.emplace_back([this, &result, &evidence, i, &mtx]() {
-
329 auto completeEvidence = std::map<std::string, int>(evidence);
-
330 completeEvidence[getClassName()] = i;
-
331 double factor = computeFactor(completeEvidence);
-
332 std::lock_guard<std::mutex> lock(mtx);
-
333 result[i] = factor;
-
334 });
-
335 }
-
336 for (auto& thread : threads) {
-
337 thread.join();
-
338 }
-
339 // Normalize result
-
340 double sum = accumulate(result.begin(), result.end(), 0.0);
-
341 transform(result.begin(), result.end(), result.begin(), [sum](const double& value) { return value / sum; });
-
342 return result;
-
343 }
-
344 std::vector<std::string> Network::show() const
-
345 {
-
346 std::vector<std::string> result;
-
347 // Draw the network
-
348 for (auto& node : nodes) {
-
349 std::string line = node.first + " -> ";
-
350 for (auto child : node.second->getChildren()) {
-
351 line += child->getName() + ", ";
-
352 }
-
353 result.push_back(line);
-
354 }
-
355 return result;
-
356 }
-
357 std::vector<std::string> Network::graph(const std::string& title) const
-
358 {
-
359 auto output = std::vector<std::string>();
-
360 auto prefix = "digraph BayesNet {\nlabel=<BayesNet ";
-
361 auto suffix = ">\nfontsize=30\nfontcolor=blue\nlabelloc=t\nlayout=circo\n";
-
362 std::string header = prefix + title + suffix;
-
363 output.push_back(header);
-
364 for (auto& node : nodes) {
-
365 auto result = node.second->graph(className);
-
366 output.insert(output.end(), result.begin(), result.end());
-
367 }
-
368 output.push_back("}\n");
-
369 return output;
-
370 }
-
371 std::vector<std::pair<std::string, std::string>> Network::getEdges() const
-
372 {
-
373 auto edges = std::vector<std::pair<std::string, std::string>>();
-
374 for (const auto& node : nodes) {
-
375 auto head = node.first;
-
376 for (const auto& child : node.second->getChildren()) {
-
377 auto tail = child->getName();
-
378 edges.push_back({ head, tail });
-
379 }
-
380 }
-
381 return edges;
-
382 }
-
383 int Network::getNumEdges() const
-
384 {
-
385 return getEdges().size();
-
386 }
-
387 std::vector<std::string> Network::topological_sort()
-
388 {
-
389 /* Check if al the fathers of every node are before the node */
-
390 auto result = features;
-
391 result.erase(remove(result.begin(), result.end(), className), result.end());
-
392 bool ending{ false };
-
393 while (!ending) {
-
394 ending = true;
-
395 for (auto feature : features) {
-
396 auto fathers = nodes[feature]->getParents();
-
397 for (const auto& father : fathers) {
-
398 auto fatherName = father->getName();
-
399 if (fatherName == className) {
-
400 continue;
-
401 }
-
402 // Check if father is placed before the actual feature
-
403 auto it = find(result.begin(), result.end(), fatherName);
-
404 if (it != result.end()) {
-
405 auto it2 = find(result.begin(), result.end(), feature);
-
406 if (it2 != result.end()) {
-
407 if (distance(it, it2) < 0) {
-
408 // if it is not, insert it before the feature
-
409 result.erase(remove(result.begin(), result.end(), fatherName), result.end());
-
410 result.insert(it2, fatherName);
-
411 ending = false;
-
412 }
-
413 }
-
414 }
-
415 }
-
416 }
-
417 }
-
418 return result;
-
419 }
-
420 std::string Network::dump_cpt() const
-
421 {
-
422 std::stringstream oss;
-
423 for (auto& node : nodes) {
-
424 oss << "* " << node.first << ": (" << node.second->getNumStates() << ") : " << node.second->getCPT().sizes() << std::endl;
-
425 oss << node.second->getCPT() << std::endl;
-
426 }
-
427 return oss.str();
-
428 }
-
429}
-
-
- - - - diff --git a/docs/manual/_network_8h_source.html b/docs/manual/_network_8h_source.html deleted file mode 100644 index 938087c..0000000 --- a/docs/manual/_network_8h_source.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/network/Network.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Network.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef NETWORK_H
-
8#define NETWORK_H
-
9#include <map>
-
10#include <vector>
-
11#include "bayesnet/config.h"
-
12#include "Node.h"
-
13
-
14namespace bayesnet {
-
-
15 class Network {
-
16 public:
-
17 Network();
-
18 explicit Network(float);
-
19 explicit Network(const Network&);
-
20 ~Network() = default;
-
21 torch::Tensor& getSamples();
-
22 float getMaxThreads() const;
-
23 void addNode(const std::string&);
-
24 void addEdge(const std::string&, const std::string&);
-
25 std::map<std::string, std::unique_ptr<Node>>& getNodes();
-
26 std::vector<std::string> getFeatures() const;
-
27 int getStates() const;
-
28 std::vector<std::pair<std::string, std::string>> getEdges() const;
-
29 int getNumEdges() const;
-
30 int getClassNumStates() const;
-
31 std::string getClassName() const;
-
32 /*
-
33 Notice: Nodes have to be inserted in the same order as they are in the dataset, i.e., first node is first column and so on.
-
34 */
-
35 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);
-
36 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);
-
37 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);
-
38 std::vector<int> predict(const std::vector<std::vector<int>>&); // Return mx1 std::vector of predictions
-
39 torch::Tensor predict(const torch::Tensor&); // Return mx1 tensor of predictions
-
40 torch::Tensor predict_tensor(const torch::Tensor& samples, const bool proba);
-
41 std::vector<std::vector<double>> predict_proba(const std::vector<std::vector<int>>&); // Return mxn std::vector of probabilities
-
42 torch::Tensor predict_proba(const torch::Tensor&); // Return mxn tensor of probabilities
-
43 double score(const std::vector<std::vector<int>>&, const std::vector<int>&);
-
44 std::vector<std::string> topological_sort();
-
45 std::vector<std::string> show() const;
-
46 std::vector<std::string> graph(const std::string& title) const; // Returns a std::vector of std::strings representing the graph in graphviz format
-
47 void initialize();
-
48 std::string dump_cpt() const;
-
49 inline std::string version() { return { project_version.begin(), project_version.end() }; }
-
50 private:
-
51 std::map<std::string, std::unique_ptr<Node>> nodes;
-
52 bool fitted;
-
53 float maxThreads = 0.95;
-
54 int classNumStates;
-
55 std::vector<std::string> features; // Including classname
-
56 std::string className;
-
57 double laplaceSmoothing;
-
58 torch::Tensor samples; // n+1xm tensor used to fit the model
-
59 bool isCyclic(const std::string&, std::unordered_set<std::string>&, std::unordered_set<std::string>&);
-
60 std::vector<double> predict_sample(const std::vector<int>&);
-
61 std::vector<double> predict_sample(const torch::Tensor&);
-
62 std::vector<double> exactInference(std::map<std::string, int>&);
-
63 double computeFactor(std::map<std::string, int>&);
-
64 void completeFit(const std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights);
-
65 void checkFitData(int n_features, int n_samples, int n_samples_y, const std::vector<std::string>& featureNames, const std::string& className, const std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights);
-
66 void setStates(const std::map<std::string, std::vector<int>>&);
-
67 };
-
-
68}
-
69#endif
- -
-
- - - - diff --git a/docs/manual/_node_8cc_source.html b/docs/manual/_node_8cc_source.html deleted file mode 100644 index 2046da7..0000000 --- a/docs/manual/_node_8cc_source.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/network/Node.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Node.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "Node.h"
-
8
-
9namespace bayesnet {
-
10
-
11 Node::Node(const std::string& name)
-
12 : name(name)
-
13 {
-
14 }
-
15 void Node::clear()
-
16 {
-
17 parents.clear();
-
18 children.clear();
-
19 cpTable = torch::Tensor();
-
20 dimensions.clear();
-
21 numStates = 0;
-
22 }
-
23 std::string Node::getName() const
-
24 {
-
25 return name;
-
26 }
-
27 void Node::addParent(Node* parent)
-
28 {
-
29 parents.push_back(parent);
-
30 }
-
31 void Node::removeParent(Node* parent)
-
32 {
-
33 parents.erase(std::remove(parents.begin(), parents.end(), parent), parents.end());
-
34 }
-
35 void Node::removeChild(Node* child)
-
36 {
-
37 children.erase(std::remove(children.begin(), children.end(), child), children.end());
-
38 }
-
39 void Node::addChild(Node* child)
-
40 {
-
41 children.push_back(child);
-
42 }
-
43 std::vector<Node*>& Node::getParents()
-
44 {
-
45 return parents;
-
46 }
-
47 std::vector<Node*>& Node::getChildren()
-
48 {
-
49 return children;
-
50 }
-
51 int Node::getNumStates() const
-
52 {
-
53 return numStates;
-
54 }
-
55 void Node::setNumStates(int numStates)
-
56 {
-
57 this->numStates = numStates;
-
58 }
-
59 torch::Tensor& Node::getCPT()
-
60 {
-
61 return cpTable;
-
62 }
-
63 /*
-
64 The MinFill criterion is a heuristic for variable elimination.
-
65 The variable that minimizes the number of edges that need to be added to the graph to make it triangulated.
-
66 This is done by counting the number of edges that need to be added to the graph if the variable is eliminated.
-
67 The variable with the minimum number of edges is chosen.
-
68 Here this is done computing the length of the combinations of the node neighbors taken 2 by 2.
-
69 */
-
70 unsigned Node::minFill()
-
71 {
-
72 std::unordered_set<std::string> neighbors;
-
73 for (auto child : children) {
-
74 neighbors.emplace(child->getName());
-
75 }
-
76 for (auto parent : parents) {
-
77 neighbors.emplace(parent->getName());
-
78 }
-
79 auto source = std::vector<std::string>(neighbors.begin(), neighbors.end());
-
80 return combinations(source).size();
-
81 }
-
82 std::vector<std::pair<std::string, std::string>> Node::combinations(const std::vector<std::string>& source)
-
83 {
-
84 std::vector<std::pair<std::string, std::string>> result;
-
85 for (int i = 0; i < source.size(); ++i) {
-
86 std::string temp = source[i];
-
87 for (int j = i + 1; j < source.size(); ++j) {
-
88 result.push_back({ temp, source[j] });
-
89 }
-
90 }
-
91 return result;
-
92 }
-
93 void Node::computeCPT(const torch::Tensor& dataset, const std::vector<std::string>& features, const double laplaceSmoothing, const torch::Tensor& weights)
-
94 {
-
95 dimensions.clear();
-
96 // Get dimensions of the CPT
-
97 dimensions.push_back(numStates);
-
98 transform(parents.begin(), parents.end(), back_inserter(dimensions), [](const auto& parent) { return parent->getNumStates(); });
-
99 // Create a tensor of zeros with the dimensions of the CPT
-
100 cpTable = torch::zeros(dimensions, torch::kFloat) + laplaceSmoothing;
-
101 // Fill table with counts
-
102 auto pos = find(features.begin(), features.end(), name);
-
103 if (pos == features.end()) {
-
104 throw std::logic_error("Feature " + name + " not found in dataset");
-
105 }
-
106 int name_index = pos - features.begin();
-
107 for (int n_sample = 0; n_sample < dataset.size(1); ++n_sample) {
-
108 c10::List<c10::optional<at::Tensor>> coordinates;
-
109 coordinates.push_back(dataset.index({ name_index, n_sample }));
-
110 for (auto parent : parents) {
-
111 pos = find(features.begin(), features.end(), parent->getName());
-
112 if (pos == features.end()) {
-
113 throw std::logic_error("Feature parent " + parent->getName() + " not found in dataset");
-
114 }
-
115 int parent_index = pos - features.begin();
-
116 coordinates.push_back(dataset.index({ parent_index, n_sample }));
-
117 }
-
118 // Increment the count of the corresponding coordinate
-
119 cpTable.index_put_({ coordinates }, cpTable.index({ coordinates }) + weights.index({ n_sample }).item<double>());
-
120 }
-
121 // Normalize the counts
-
122 cpTable = cpTable / cpTable.sum(0);
-
123 }
-
124 float Node::getFactorValue(std::map<std::string, int>& evidence)
-
125 {
-
126 c10::List<c10::optional<at::Tensor>> coordinates;
-
127 // following predetermined order of indices in the cpTable (see Node.h)
-
128 coordinates.push_back(at::tensor(evidence[name]));
-
129 transform(parents.begin(), parents.end(), std::back_inserter(coordinates), [&evidence](const auto& parent) { return at::tensor(evidence[parent->getName()]); });
-
130 return cpTable.index({ coordinates }).item<float>();
-
131 }
-
132 std::vector<std::string> Node::graph(const std::string& className)
-
133 {
-
134 auto output = std::vector<std::string>();
-
135 auto suffix = name == className ? ", fontcolor=red, fillcolor=lightblue, style=filled " : "";
-
136 output.push_back(name + " [shape=circle" + suffix + "] \n");
-
137 transform(children.begin(), children.end(), back_inserter(output), [this](const auto& child) { return name + " -> " + child->getName(); });
-
138 return output;
-
139 }
-
140}
-
-
- - - - diff --git a/docs/manual/_node_8h_source.html b/docs/manual/_node_8h_source.html deleted file mode 100644 index 5121b18..0000000 --- a/docs/manual/_node_8h_source.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/network/Node.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Node.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef NODE_H
-
8#define NODE_H
-
9#include <unordered_set>
-
10#include <vector>
-
11#include <string>
-
12#include <torch/torch.h>
-
13namespace bayesnet {
-
-
14 class Node {
-
15 public:
-
16 explicit Node(const std::string&);
-
17 void clear();
-
18 void addParent(Node*);
-
19 void addChild(Node*);
-
20 void removeParent(Node*);
-
21 void removeChild(Node*);
-
22 std::string getName() const;
-
23 std::vector<Node*>& getParents();
-
24 std::vector<Node*>& getChildren();
-
25 torch::Tensor& getCPT();
-
26 void computeCPT(const torch::Tensor& dataset, const std::vector<std::string>& features, const double laplaceSmoothing, const torch::Tensor& weights);
-
27 int getNumStates() const;
-
28 void setNumStates(int);
-
29 unsigned minFill();
-
30 std::vector<std::string> graph(const std::string& clasName); // Returns a std::vector of std::strings representing the graph in graphviz format
-
31 float getFactorValue(std::map<std::string, int>&);
-
32 private:
-
33 std::string name;
-
34 std::vector<Node*> parents;
-
35 std::vector<Node*> children;
-
36 int numStates = 0; // number of states of the variable
-
37 torch::Tensor cpTable; // Order of indices is 0-> node variable, 1-> 1st parent, 2-> 2nd parent, ...
-
38 std::vector<int64_t> dimensions; // dimensions of the cpTable
-
39 std::vector<std::pair<std::string, std::string>> combinations(const std::vector<std::string>&);
-
40 };
-
-
41}
-
42#endif
- -
-
- - - - diff --git a/docs/manual/_proposal_8cc_source.html b/docs/manual/_proposal_8cc_source.html deleted file mode 100644 index 89130d5..0000000 --- a/docs/manual/_proposal_8cc_source.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Proposal.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Proposal.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "Proposal.h"
-
8
-
9namespace bayesnet {
-
10 Proposal::Proposal(torch::Tensor& dataset_, std::vector<std::string>& features_, std::string& className_) : pDataset(dataset_), pFeatures(features_), pClassName(className_) {}
-
11 Proposal::~Proposal()
-
12 {
-
13 for (auto& [key, value] : discretizers) {
-
14 delete value;
-
15 }
-
16 }
-
17 void Proposal::checkInput(const torch::Tensor& X, const torch::Tensor& y)
-
18 {
-
19 if (!torch::is_floating_point(X)) {
-
20 throw std::invalid_argument("X must be a floating point tensor");
-
21 }
-
22 if (torch::is_floating_point(y)) {
-
23 throw std::invalid_argument("y must be an integer tensor");
-
24 }
-
25 }
-
26 map<std::string, std::vector<int>> Proposal::localDiscretizationProposal(const map<std::string, std::vector<int>>& oldStates, Network& model)
-
27 {
-
28 // order of local discretization is important. no good 0, 1, 2...
-
29 // although we rediscretize features after the local discretization of every feature
-
30 auto order = model.topological_sort();
-
31 auto& nodes = model.getNodes();
-
32 map<std::string, std::vector<int>> states = oldStates;
-
33 std::vector<int> indicesToReDiscretize;
-
34 bool upgrade = false; // Flag to check if we need to upgrade the model
-
35 for (auto feature : order) {
-
36 auto nodeParents = nodes[feature]->getParents();
-
37 if (nodeParents.size() < 2) continue; // Only has class as parent
-
38 upgrade = true;
-
39 int index = find(pFeatures.begin(), pFeatures.end(), feature) - pFeatures.begin();
-
40 indicesToReDiscretize.push_back(index); // We need to re-discretize this feature
-
41 std::vector<std::string> parents;
-
42 transform(nodeParents.begin(), nodeParents.end(), back_inserter(parents), [](const auto& p) { return p->getName(); });
-
43 // Remove class as parent as it will be added later
-
44 parents.erase(remove(parents.begin(), parents.end(), pClassName), parents.end());
-
45 // Get the indices of the parents
-
46 std::vector<int> indices;
-
47 indices.push_back(-1); // Add class index
-
48 transform(parents.begin(), parents.end(), back_inserter(indices), [&](const auto& p) {return find(pFeatures.begin(), pFeatures.end(), p) - pFeatures.begin(); });
-
49 // Now we fit the discretizer of the feature, conditioned on its parents and the class i.e. discretizer.fit(X[index], X[indices] + y)
-
50 std::vector<std::string> yJoinParents(Xf.size(1));
-
51 for (auto idx : indices) {
-
52 for (int i = 0; i < Xf.size(1); ++i) {
-
53 yJoinParents[i] += to_string(pDataset.index({ idx, i }).item<int>());
-
54 }
-
55 }
-
56 auto yxv = factorize(yJoinParents);
-
57 auto xvf_ptr = Xf.index({ index }).data_ptr<float>();
-
58 auto xvf = std::vector<mdlp::precision_t>(xvf_ptr, xvf_ptr + Xf.size(1));
-
59 discretizers[feature]->fit(xvf, yxv);
-
60 }
-
61 if (upgrade) {
-
62 // Discretize again X (only the affected indices) with the new fitted discretizers
-
63 for (auto index : indicesToReDiscretize) {
-
64 auto Xt_ptr = Xf.index({ index }).data_ptr<float>();
-
65 auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));
-
66 pDataset.index_put_({ index, "..." }, torch::tensor(discretizers[pFeatures[index]]->transform(Xt)));
-
67 auto xStates = std::vector<int>(discretizers[pFeatures[index]]->getCutPoints().size() + 1);
-
68 iota(xStates.begin(), xStates.end(), 0);
-
69 //Update new states of the feature/node
-
70 states[pFeatures[index]] = xStates;
-
71 }
-
72 const torch::Tensor weights = torch::full({ pDataset.size(1) }, 1.0 / pDataset.size(1), torch::kDouble);
-
73 model.fit(pDataset, weights, pFeatures, pClassName, states);
-
74 }
-
75 return states;
-
76 }
-
77 map<std::string, std::vector<int>> Proposal::fit_local_discretization(const torch::Tensor& y)
-
78 {
-
79 // Discretize the continuous input data and build pDataset (Classifier::dataset)
-
80 int m = Xf.size(1);
-
81 int n = Xf.size(0);
-
82 map<std::string, std::vector<int>> states;
-
83 pDataset = torch::zeros({ n + 1, m }, torch::kInt32);
-
84 auto yv = std::vector<int>(y.data_ptr<int>(), y.data_ptr<int>() + y.size(0));
-
85 // discretize input data by feature(row)
-
86 for (auto i = 0; i < pFeatures.size(); ++i) {
-
87 auto* discretizer = new mdlp::CPPFImdlp();
-
88 auto Xt_ptr = Xf.index({ i }).data_ptr<float>();
-
89 auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));
-
90 discretizer->fit(Xt, yv);
-
91 pDataset.index_put_({ i, "..." }, torch::tensor(discretizer->transform(Xt)));
-
92 auto xStates = std::vector<int>(discretizer->getCutPoints().size() + 1);
-
93 iota(xStates.begin(), xStates.end(), 0);
-
94 states[pFeatures[i]] = xStates;
-
95 discretizers[pFeatures[i]] = discretizer;
-
96 }
-
97 int n_classes = torch::max(y).item<int>() + 1;
-
98 auto yStates = std::vector<int>(n_classes);
-
99 iota(yStates.begin(), yStates.end(), 0);
-
100 states[pClassName] = yStates;
-
101 pDataset.index_put_({ n, "..." }, y);
-
102 return states;
-
103 }
-
104 torch::Tensor Proposal::prepareX(torch::Tensor& X)
-
105 {
-
106 auto Xtd = torch::zeros_like(X, torch::kInt32);
-
107 for (int i = 0; i < X.size(0); ++i) {
-
108 auto Xt = std::vector<float>(X[i].data_ptr<float>(), X[i].data_ptr<float>() + X.size(1));
-
109 auto Xd = discretizers[pFeatures[i]]->transform(Xt);
-
110 Xtd.index_put_({ i }, torch::tensor(Xd, torch::kInt32));
-
111 }
-
112 return Xtd;
-
113 }
-
114 std::vector<int> Proposal::factorize(const std::vector<std::string>& labels_t)
-
115 {
-
116 std::vector<int> yy;
-
117 yy.reserve(labels_t.size());
-
118 std::map<std::string, int> labelMap;
-
119 int i = 0;
-
120 for (const std::string& label : labels_t) {
-
121 if (labelMap.find(label) == labelMap.end()) {
-
122 labelMap[label] = i++;
-
123 bool allDigits = std::all_of(label.begin(), label.end(), ::isdigit);
-
124 }
-
125 yy.push_back(labelMap[label]);
-
126 }
-
127 return yy;
-
128 }
-
129}
-
-
- - - - diff --git a/docs/manual/_proposal_8h_source.html b/docs/manual/_proposal_8h_source.html deleted file mode 100644 index dcce17b..0000000 --- a/docs/manual/_proposal_8h_source.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Proposal.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Proposal.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef PROPOSAL_H
-
8#define PROPOSAL_H
-
9#include <string>
-
10#include <map>
-
11#include <torch/torch.h>
-
12#include <CPPFImdlp.h>
-
13#include "bayesnet/network/Network.h"
-
14#include "Classifier.h"
-
15
-
16namespace bayesnet {
-
-
17 class Proposal {
-
18 public:
-
19 Proposal(torch::Tensor& pDataset, std::vector<std::string>& features_, std::string& className_);
-
20 virtual ~Proposal();
-
21 protected:
-
22 void checkInput(const torch::Tensor& X, const torch::Tensor& y);
-
23 torch::Tensor prepareX(torch::Tensor& X);
-
24 map<std::string, std::vector<int>> localDiscretizationProposal(const map<std::string, std::vector<int>>& states, Network& model);
-
25 map<std::string, std::vector<int>> fit_local_discretization(const torch::Tensor& y);
-
26 torch::Tensor Xf; // X continuous nxm tensor
-
27 torch::Tensor y; // y discrete nx1 tensor
-
28 map<std::string, mdlp::CPPFImdlp*> discretizers;
-
29 private:
-
30 std::vector<int> factorize(const std::vector<std::string>& labels_t);
-
31 torch::Tensor& pDataset; // (n+1)xm tensor
-
32 std::vector<std::string>& pFeatures;
-
33 std::string& pClassName;
-
34 };
-
-
35}
-
36
-
37#endif
- - -
-
- - - - diff --git a/docs/manual/_s_p_o_d_e_8cc_source.html b/docs/manual/_s_p_o_d_e_8cc_source.html deleted file mode 100644 index 2e5c363..0000000 --- a/docs/manual/_s_p_o_d_e_8cc_source.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPODE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "SPODE.h"
-
8
-
9namespace bayesnet {
-
10
-
11 SPODE::SPODE(int root) : Classifier(Network()), root(root) {}
-
12
-
13 void SPODE::buildModel(const torch::Tensor& weights)
-
14 {
-
15 // 0. Add all nodes to the model
-
16 addNodes();
-
17 // 1. Add edges from the class node to all other nodes
-
18 // 2. Add edges from the root node to all other nodes
-
19 for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-
20 model.addEdge(className, features[i]);
-
21 if (i != root) {
-
22 model.addEdge(features[root], features[i]);
-
23 }
-
24 }
-
25 }
-
26 std::vector<std::string> SPODE::graph(const std::string& name) const
-
27 {
-
28 return model.graph(name);
-
29 }
-
30
-
31}
-
-
- - - - diff --git a/docs/manual/_s_p_o_d_e_8h_source.html b/docs/manual/_s_p_o_d_e_8h_source.html deleted file mode 100644 index 681595b..0000000 --- a/docs/manual/_s_p_o_d_e_8h_source.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPODE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef SPODE_H
-
8#define SPODE_H
-
9#include "Classifier.h"
-
10
-
11namespace bayesnet {
-
-
12 class SPODE : public Classifier {
-
13 private:
-
14 int root;
-
15 protected:
-
16 void buildModel(const torch::Tensor& weights) override;
-
17 public:
-
18 explicit SPODE(int root);
-
19 virtual ~SPODE() = default;
-
20 std::vector<std::string> graph(const std::string& name = "SPODE") const override;
-
21 };
-
-
22}
-
23#endif
- - -
-
- - - - diff --git a/docs/manual/_s_p_o_d_e_ld_8cc_source.html b/docs/manual/_s_p_o_d_e_ld_8cc_source.html deleted file mode 100644 index 1afe7a6..0000000 --- a/docs/manual/_s_p_o_d_e_ld_8cc_source.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODELd.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPODELd.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "SPODELd.h"
-
8
-
9namespace bayesnet {
-
10 SPODELd::SPODELd(int root) : SPODE(root), Proposal(dataset, features, className) {}
-
11 SPODELd& SPODELd::fit(torch::Tensor& X_, torch::Tensor& y_, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
12 {
-
13 checkInput(X_, y_);
-
14 Xf = X_;
-
15 y = y_;
-
16 return commonFit(features_, className_, states_);
-
17 }
-
18
-
19 SPODELd& SPODELd::fit(torch::Tensor& dataset, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
20 {
-
21 if (!torch::is_floating_point(dataset)) {
-
22 throw std::runtime_error("Dataset must be a floating point tensor");
-
23 }
-
24 Xf = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." }).clone();
-
25 y = dataset.index({ -1, "..." }).clone().to(torch::kInt32);
-
26 return commonFit(features_, className_, states_);
-
27 }
-
28
-
29 SPODELd& SPODELd::commonFit(const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
30 {
-
31 features = features_;
-
32 className = className_;
-
33 // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-
34 states = fit_local_discretization(y);
-
35 // We have discretized the input data
-
36 // 1st we need to fit the model to build the normal SPODE structure, SPODE::fit initializes the base Bayesian network
-
37 SPODE::fit(dataset, features, className, states);
-
38 states = localDiscretizationProposal(states, model);
-
39 return *this;
-
40 }
-
41 torch::Tensor SPODELd::predict(torch::Tensor& X)
-
42 {
-
43 auto Xt = prepareX(X);
-
44 return SPODE::predict(Xt);
-
45 }
-
46 std::vector<std::string> SPODELd::graph(const std::string& name) const
-
47 {
-
48 return SPODE::graph(name);
-
49 }
-
50}
-
-
- - - - diff --git a/docs/manual/_s_p_o_d_e_ld_8h_source.html b/docs/manual/_s_p_o_d_e_ld_8h_source.html deleted file mode 100644 index 489c096..0000000 --- a/docs/manual/_s_p_o_d_e_ld_8h_source.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODELd.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPODELd.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef SPODELD_H
-
8#define SPODELD_H
-
9#include "SPODE.h"
-
10#include "Proposal.h"
-
11
-
12namespace bayesnet {
-
-
13 class SPODELd : public SPODE, public Proposal {
-
14 public:
-
15 explicit SPODELd(int root);
-
16 virtual ~SPODELd() = default;
-
17 SPODELd& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;
-
18 SPODELd& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;
-
19 SPODELd& commonFit(const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states);
-
20 std::vector<std::string> graph(const std::string& name = "SPODE") const override;
-
21 torch::Tensor predict(torch::Tensor& X) override;
-
22 static inline std::string version() { return "0.0.1"; };
-
23 };
-
-
24}
-
25#endif // !SPODELD_H
- - - -
-
- - - - diff --git a/docs/manual/_s_pn_d_e_8cc_source.html b/docs/manual/_s_pn_d_e_8cc_source.html deleted file mode 100644 index c5b2eff..0000000 --- a/docs/manual/_s_pn_d_e_8cc_source.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPnDE.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPnDE.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "SPnDE.h"
-
8
-
9namespace bayesnet {
-
10
-
11 SPnDE::SPnDE(std::vector<int> parents) : Classifier(Network()), parents(parents) {}
-
12
-
13 void SPnDE::buildModel(const torch::Tensor& weights)
-
14 {
-
15 // 0. Add all nodes to the model
-
16 addNodes();
-
17 std::vector<int> attributes;
-
18 for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-
19 if (std::find(parents.begin(), parents.end(), i) == parents.end()) {
-
20 attributes.push_back(i);
-
21 }
-
22 }
-
23 // 1. Add edges from the class node to all other nodes
-
24 // 2. Add edges from the parents nodes to all other nodes
-
25 for (const auto& attribute : attributes) {
-
26 model.addEdge(className, features[attribute]);
-
27 for (const auto& root : parents) {
-
28
-
29 model.addEdge(features[root], features[attribute]);
-
30 }
-
31 }
-
32 }
-
33 std::vector<std::string> SPnDE::graph(const std::string& name) const
-
34 {
-
35 return model.graph(name);
-
36 }
-
37
-
38}
-
-
- - - - diff --git a/docs/manual/_s_pn_d_e_8h_source.html b/docs/manual/_s_pn_d_e_8h_source.html deleted file mode 100644 index d2cfecf..0000000 --- a/docs/manual/_s_pn_d_e_8h_source.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPnDE.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
SPnDE.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef SPnDE_H
-
8#define SPnDE_H
-
9#include <vector>
-
10#include "Classifier.h"
-
11
-
12namespace bayesnet {
-
-
13 class SPnDE : public Classifier {
-
14 public:
-
15 explicit SPnDE(std::vector<int> parents);
-
16 virtual ~SPnDE() = default;
-
17 std::vector<std::string> graph(const std::string& name = "SPnDE") const override;
-
18 protected:
-
19 void buildModel(const torch::Tensor& weights) override;
-
20 private:
-
21 std::vector<int> parents;
-
22
-
23
-
24 };
-
-
25}
-
26#endif
- - -
-
- - - - diff --git a/docs/manual/_t_a_n_8cc_source.html b/docs/manual/_t_a_n_8cc_source.html deleted file mode 100644 index 9a6f957..0000000 --- a/docs/manual/_t_a_n_8cc_source.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TAN.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
TAN.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "TAN.h"
-
8
-
9namespace bayesnet {
-
10 TAN::TAN() : Classifier(Network()) {}
-
11
-
12 void TAN::buildModel(const torch::Tensor& weights)
-
13 {
-
14 // 0. Add all nodes to the model
-
15 addNodes();
-
16 // 1. Compute mutual information between each feature and the class and set the root node
-
17 // as the highest mutual information with the class
-
18 auto mi = std::vector <std::pair<int, float >>();
-
19 torch::Tensor class_dataset = dataset.index({ -1, "..." });
-
20 for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-
21 torch::Tensor feature_dataset = dataset.index({ i, "..." });
-
22 auto mi_value = metrics.mutualInformation(class_dataset, feature_dataset, weights);
-
23 mi.push_back({ i, mi_value });
-
24 }
-
25 sort(mi.begin(), mi.end(), [](const auto& left, const auto& right) {return left.second < right.second;});
-
26 auto root = mi[mi.size() - 1].first;
-
27 // 2. Compute mutual information between each feature and the class
-
28 auto weights_matrix = metrics.conditionalEdge(weights);
-
29 // 3. Compute the maximum spanning tree
-
30 auto mst = metrics.maximumSpanningTree(features, weights_matrix, root);
-
31 // 4. Add edges from the maximum spanning tree to the model
-
32 for (auto i = 0; i < mst.size(); ++i) {
-
33 auto [from, to] = mst[i];
-
34 model.addEdge(features[from], features[to]);
-
35 }
-
36 // 5. Add edges from the class to all features
-
37 for (auto feature : features) {
-
38 model.addEdge(className, feature);
-
39 }
-
40 }
-
41 std::vector<std::string> TAN::graph(const std::string& title) const
-
42 {
-
43 return model.graph(title);
-
44 }
-
45}
-
-
- - - - diff --git a/docs/manual/_t_a_n_8h_source.html b/docs/manual/_t_a_n_8h_source.html deleted file mode 100644 index f8621f6..0000000 --- a/docs/manual/_t_a_n_8h_source.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TAN.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
TAN.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef TAN_H
-
8#define TAN_H
-
9#include "Classifier.h"
-
10namespace bayesnet {
-
-
11 class TAN : public Classifier {
-
12 private:
-
13 protected:
-
14 void buildModel(const torch::Tensor& weights) override;
-
15 public:
-
16 TAN();
-
17 virtual ~TAN() = default;
-
18 std::vector<std::string> graph(const std::string& name = "TAN") const override;
-
19 };
-
-
20}
-
21#endif
- - -
-
- - - - diff --git a/docs/manual/_t_a_n_ld_8cc_source.html b/docs/manual/_t_a_n_ld_8cc_source.html deleted file mode 100644 index 9c8daf3..0000000 --- a/docs/manual/_t_a_n_ld_8cc_source.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TANLd.cc Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
TANLd.cc
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#include "TANLd.h"
-
8
-
9namespace bayesnet {
-
10 TANLd::TANLd() : TAN(), Proposal(dataset, features, className) {}
-
11 TANLd& TANLd::fit(torch::Tensor& X_, torch::Tensor& y_, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-
12 {
-
13 checkInput(X_, y_);
-
14 features = features_;
-
15 className = className_;
-
16 Xf = X_;
-
17 y = y_;
-
18 // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-
19 states = fit_local_discretization(y);
-
20 // We have discretized the input data
-
21 // 1st we need to fit the model to build the normal TAN structure, TAN::fit initializes the base Bayesian network
-
22 TAN::fit(dataset, features, className, states);
-
23 states = localDiscretizationProposal(states, model);
-
24 return *this;
-
25
-
26 }
-
27 torch::Tensor TANLd::predict(torch::Tensor& X)
-
28 {
-
29 auto Xt = prepareX(X);
-
30 return TAN::predict(Xt);
-
31 }
-
32 std::vector<std::string> TANLd::graph(const std::string& name) const
-
33 {
-
34 return TAN::graph(name);
-
35 }
-
36}
-
-
- - - - diff --git a/docs/manual/_t_a_n_ld_8h_source.html b/docs/manual/_t_a_n_ld_8h_source.html deleted file mode 100644 index 59cbc7b..0000000 --- a/docs/manual/_t_a_n_ld_8h_source.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TANLd.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
TANLd.h
-
-
-
1// ***************************************************************
-
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-
3// SPDX-FileType: SOURCE
-
4// SPDX-License-Identifier: MIT
-
5// ***************************************************************
-
6
-
7#ifndef TANLD_H
-
8#define TANLD_H
-
9#include "TAN.h"
-
10#include "Proposal.h"
-
11
-
12namespace bayesnet {
-
-
13 class TANLd : public TAN, public Proposal {
-
14 private:
-
15 public:
-
16 TANLd();
-
17 virtual ~TANLd() = default;
-
18 TANLd& fit(torch::Tensor& X, torch::Tensor& y, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;
-
19 std::vector<std::string> graph(const std::string& name = "TAN") const override;
-
20 torch::Tensor predict(torch::Tensor& X) override;
-
21 static inline std::string version() { return "0.0.1"; };
-
22 };
-
-
23}
-
24#endif // !TANLD_H
- - - -
-
- - - - diff --git a/docs/manual/annotated.html b/docs/manual/annotated.html deleted file mode 100644 index 13be465..0000000 --- a/docs/manual/annotated.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - -BayesNet: Class List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 12]
- - - - - - - - - - - - - - - - - - - - -
 Nbayesnet
 CA2DE
 CAODE
 CAODELd
 CBaseClassifier
 CBoost
 CBoostA2DE
 CBoostAODE
 CClassifier
 CEnsemble
 CKDB
 CKDBLd
 CNetwork
 CNode
 CProposal
 CSPnDE
 CSPODE
 CSPODELd
 CTAN
 CTANLd
-
-
-
- - - - diff --git a/docs/manual/annotated_dup.js b/docs/manual/annotated_dup.js deleted file mode 100644 index 6c6009f..0000000 --- a/docs/manual/annotated_dup.js +++ /dev/null @@ -1,24 +0,0 @@ -var annotated_dup = -[ - [ "bayesnet", null, [ - [ "A2DE", "classbayesnet_1_1_a2_d_e.html", null ], - [ "AODE", "classbayesnet_1_1_a_o_d_e.html", null ], - [ "AODELd", "classbayesnet_1_1_a_o_d_e_ld.html", null ], - [ "BaseClassifier", "classbayesnet_1_1_base_classifier.html", null ], - [ "Boost", "classbayesnet_1_1_boost.html", null ], - [ "BoostA2DE", "classbayesnet_1_1_boost_a2_d_e.html", null ], - [ "BoostAODE", "classbayesnet_1_1_boost_a_o_d_e.html", null ], - [ "Classifier", "classbayesnet_1_1_classifier.html", null ], - [ "Ensemble", "classbayesnet_1_1_ensemble.html", null ], - [ "KDB", "classbayesnet_1_1_k_d_b.html", null ], - [ "KDBLd", "classbayesnet_1_1_k_d_b_ld.html", null ], - [ "Network", "classbayesnet_1_1_network.html", null ], - [ "Node", "classbayesnet_1_1_node.html", null ], - [ "Proposal", "classbayesnet_1_1_proposal.html", null ], - [ "SPnDE", "classbayesnet_1_1_s_pn_d_e.html", null ], - [ "SPODE", "classbayesnet_1_1_s_p_o_d_e.html", null ], - [ "SPODELd", "classbayesnet_1_1_s_p_o_d_e_ld.html", null ], - [ "TAN", "classbayesnet_1_1_t_a_n.html", null ], - [ "TANLd", "classbayesnet_1_1_t_a_n_ld.html", null ] - ] ] -]; \ No newline at end of file diff --git a/docs/manual/bc_s.png b/docs/manual/bc_s.png deleted file mode 100644 index 224b29a..0000000 Binary files a/docs/manual/bc_s.png and /dev/null differ diff --git a/docs/manual/bc_sd.png b/docs/manual/bc_sd.png deleted file mode 100644 index 31ca888..0000000 Binary files a/docs/manual/bc_sd.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a2_d_e-members.html b/docs/manual/classbayesnet_1_1_a2_d_e-members.html deleted file mode 100644 index 35b3392..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e-members.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::A2DE Member List
-
-
- -

This is the complete list of members for bayesnet::A2DE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A2DE(bool predict_voting=false) (defined in bayesnet::A2DE)bayesnet::A2DE
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::A2DE)bayesnet::A2DEprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title="A2DE") const override (defined in bayesnet::A2DE)bayesnet::A2DEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::A2DE)bayesnet::A2DEvirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Ensemble)bayesnet::Ensembleprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
~A2DE() (defined in bayesnet::A2DE)bayesnet::A2DEinlinevirtual
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a2_d_e.html b/docs/manual/classbayesnet_1_1_a2_d_e.html deleted file mode 100644 index d883239..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - -BayesNet: bayesnet::A2DE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::A2DE Class Reference
-
-
-
-Inheritance diagram for bayesnet::A2DE:
-
-
Inheritance graph
- - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::A2DE:
-
-
Collaboration graph
- - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 A2DE (bool predict_voting=false)
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
std::vector< std::string > graph (const std::string &title="A2DE") const override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 12 of file A2DE.h.

-

Constructor & Destructor Documentation

- -

◆ A2DE()

- -
-
- - - - - - - -
bayesnet::A2DE::A2DE (bool predict_voting = false)
-
- -

Definition at line 10 of file A2DE.cc.

- -
-
- -

◆ ~A2DE()

- -
-
- - - - - -
- - - - - - - -
virtual bayesnet::A2DE::~A2DE ()
-
-inlinevirtual
-
- -

Definition at line 15 of file A2DE.h.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::A2DE::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 23 of file A2DE.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::A2DE::graph (const std::string & title = "A2DE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 36 of file A2DE.cc.

- -
-
- -

◆ setHyperparameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::A2DE::setHyperparameters (const nlohmann::json & hyperparameters)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 14 of file A2DE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/A2DE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/A2DE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.map deleted file mode 100644 index 2ed4963..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.md5 deleted file mode 100644 index e47884e..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1a9d8b8ca8faca87b7939271324f2f54 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.png deleted file mode 100644 index 306367d..0000000 Binary files a/docs/manual/classbayesnet_1_1_a2_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.map deleted file mode 100644 index 3933e10..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.md5 deleted file mode 100644 index 2430de2..0000000 --- a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -2a4c640dc60ff5b335609cbf09ecb998 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.png deleted file mode 100644 index 71e485d..0000000 Binary files a/docs/manual/classbayesnet_1_1_a2_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e-members.html b/docs/manual/classbayesnet_1_1_a_o_d_e-members.html deleted file mode 100644 index 910d05f..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e-members.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::AODE Member List
-
-
- -

This is the complete list of members for bayesnet::AODE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
AODE(bool predict_voting=false) (defined in bayesnet::AODE)bayesnet::AODE
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::AODE)bayesnet::AODEprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title="AODE") const override (defined in bayesnet::AODE)bayesnet::AODEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::AODE)bayesnet::AODEvirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Ensemble)bayesnet::Ensembleprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
~AODE() (defined in bayesnet::AODE)bayesnet::AODEinlinevirtual
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e.html b/docs/manual/classbayesnet_1_1_a_o_d_e.html deleted file mode 100644 index 1c6cc5a..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - -BayesNet: bayesnet::AODE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::AODE Class Reference
-
-
-
-Inheritance diagram for bayesnet::AODE:
-
-
Inheritance graph
- - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::AODE:
-
-
Collaboration graph
- - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 AODE (bool predict_voting=false)
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
std::vector< std::string > graph (const std::string &title="AODE") const override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 12 of file AODE.h.

-

Constructor & Destructor Documentation

- -

◆ AODE()

- -
-
- - - - - - - -
bayesnet::AODE::AODE (bool predict_voting = false)
-
- -

Definition at line 10 of file AODE.cc.

- -
-
- -

◆ ~AODE()

- -
-
- - - - - -
- - - - - - - -
virtual bayesnet::AODE::~AODE ()
-
-inlinevirtual
-
- -

Definition at line 15 of file AODE.h.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::AODE::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 24 of file AODE.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::AODE::graph (const std::string & title = "AODE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 34 of file AODE.cc.

- -
-
- -

◆ setHyperparameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::AODE::setHyperparameters (const nlohmann::json & hyperparameters)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 15 of file AODE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.map deleted file mode 100644 index 12e0d18..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.md5 deleted file mode 100644 index e6b0ce6..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -a8ecb4b4827a401aa13582922068e79f \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.png deleted file mode 100644 index 76cba84..0000000 Binary files a/docs/manual/classbayesnet_1_1_a_o_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.map deleted file mode 100644 index b9bbc8e..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.md5 deleted file mode 100644 index 349ca86..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -6e36b83aa01980726c9835edea89fb3f \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.png deleted file mode 100644 index 84bdbab..0000000 Binary files a/docs/manual/classbayesnet_1_1_a_o_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld-members.html b/docs/manual/classbayesnet_1_1_a_o_d_e_ld-members.html deleted file mode 100644 index 761d28d..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld-members.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::AODELd Member List
-
-
- -

This is the complete list of members for bayesnet::AODELd, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
AODELd(bool predict_voting=true) (defined in bayesnet::AODELd)bayesnet::AODELd
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::AODELd)bayesnet::AODELdprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
checkInput(const torch::Tensor &X, const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
discretizers (defined in bayesnet::Proposal)bayesnet::Proposalprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(torch::Tensor &X_, torch::Tensor &y_, const std::vector< std::string > &features_, const std::string &className_, map< std::string, std::vector< int > > &states_) override (defined in bayesnet::AODELd)bayesnet::AODELd
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit_local_discretization(const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="AODELd") const override (defined in bayesnet::AODELd)bayesnet::AODELdvirtual
localDiscretizationProposal(const map< std::string, std::vector< int > > &states, Network &model) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
prepareX(torch::Tensor &X) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Proposal(torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_) (defined in bayesnet::Proposal)bayesnet::Proposal
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::AODELd)bayesnet::AODELdprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
Xf (defined in bayesnet::Proposal)bayesnet::Proposalprotected
y (defined in bayesnet::Proposal)bayesnet::Proposalprotected
~AODELd()=default (defined in bayesnet::AODELd)bayesnet::AODELdvirtual
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
~Proposal() (defined in bayesnet::Proposal)bayesnet::Proposalvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld.html b/docs/manual/classbayesnet_1_1_a_o_d_e_ld.html deleted file mode 100644 index 8598fec..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - -BayesNet: bayesnet::AODELd Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::AODELd Class Reference
-
-
-
-Inheritance diagram for bayesnet::AODELd:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::AODELd:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 AODELd (bool predict_voting=true)
 
AODELdfit (torch::Tensor &X_, torch::Tensor &y_, const std::vector< std::string > &features_, const std::string &className_, map< std::string, std::vector< int > > &states_) override
 
std::vector< std::string > graph (const std::string &name="AODELd") const override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- Public Member Functions inherited from bayesnet::Proposal
 Proposal (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

void trainModel (const torch::Tensor &weights) override
 
void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- Protected Member Functions inherited from bayesnet::Proposal
void checkInput (const torch::Tensor &X, const torch::Tensor &y)
 
torch::Tensor prepareX (torch::Tensor &X)
 
map< std::string, std::vector< int > > localDiscretizationProposal (const map< std::string, std::vector< int > > &states, Network &model)
 
map< std::string, std::vector< int > > fit_local_discretization (const torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
- Protected Attributes inherited from bayesnet::Proposal
torch::Tensor Xf
 
torch::Tensor y
 
map< std::string, mdlp::CPPFImdlp * > discretizers
 
-

Detailed Description

-
-

Definition at line 14 of file AODELd.h.

-

Constructor & Destructor Documentation

- -

◆ AODELd()

- -
-
- - - - - - - -
bayesnet::AODELd::AODELd (bool predict_voting = true)
-
- -

Definition at line 10 of file AODELd.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::AODELd::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 28 of file AODELd.cc.

- -
-
- -

◆ fit()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
AODELd & bayesnet::AODELd::fit (torch::Tensor & X_,
torch::Tensor & y_,
const std::vector< std::string > & features_,
const std::string & className_,
map< std::string, std::vector< int > > & states_ )
-
-override
-
- -

Definition at line 13 of file AODELd.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::AODELd::graph (const std::string & name = "AODELd") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 43 of file AODELd.cc.

- -
-
- -

◆ trainModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::AODELd::trainModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 37 of file AODELd.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODELd.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/AODELd.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.map b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.map deleted file mode 100644 index 4da9f75..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.md5 b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.md5 deleted file mode 100644 index 7e928dd..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f651d150c08db011384ec50dda3d8bd9 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.png b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.png deleted file mode 100644 index 3bab28d..0000000 Binary files a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.map b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.map deleted file mode 100644 index 98066fc..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.md5 deleted file mode 100644 index 2b66607..0000000 --- a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -cb0c139611e4782226f297a1cfe9fbfd \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.png b/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.png deleted file mode 100644 index fa6fe72..0000000 Binary files a/docs/manual/classbayesnet_1_1_a_o_d_e_ld__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_base_classifier-members.html b/docs/manual/classbayesnet_1_1_base_classifier-members.html deleted file mode 100644 index 2d6144a..0000000 --- a/docs/manual/classbayesnet_1_1_base_classifier-members.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::BaseClassifier Member List
-
-
- -

This is the complete list of members for bayesnet::BaseClassifier, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
dump_cpt() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getClassNumStates() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getNotes() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getNumberOfEdges() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getNumberOfNodes() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getNumberOfStates() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getStatus() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion()=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
graph(const std::string &title="") const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
predict(torch::Tensor &X)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
predict(std::vector< std::vector< int > > &X)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
predict_proba(torch::Tensor &X)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
predict_proba(std::vector< std::vector< int > > &X)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
score(torch::Tensor &X, torch::Tensor &y)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
setHyperparameters(const nlohmann::json &hyperparameters)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
show() const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
topological_order()=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
trainModel(const torch::Tensor &weights)=0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotectedpure virtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_base_classifier.html b/docs/manual/classbayesnet_1_1_base_classifier.html deleted file mode 100644 index c423364..0000000 --- a/docs/manual/classbayesnet_1_1_base_classifier.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - -BayesNet: bayesnet::BaseClassifier Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::BaseClassifier Class Referenceabstract
-
-
-
-Inheritance diagram for bayesnet::BaseClassifier:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-virtual BaseClassifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0
 
-virtual BaseClassifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0
 
-virtual BaseClassifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states)=0
 
-virtual BaseClassifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights)=0
 
-virtual torch::Tensor predict (torch::Tensor &X)=0
 
-virtual std::vector< int > predict (std::vector< std::vector< int > > &X)=0
 
-virtual torch::Tensor predict_proba (torch::Tensor &X)=0
 
-virtual std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X)=0
 
-virtual status_t getStatus () const =0
 
-virtual float score (std::vector< std::vector< int > > &X, std::vector< int > &y)=0
 
-virtual float score (torch::Tensor &X, torch::Tensor &y)=0
 
-virtual int getNumberOfNodes () const =0
 
-virtual int getNumberOfEdges () const =0
 
-virtual int getNumberOfStates () const =0
 
-virtual int getClassNumStates () const =0
 
-virtual std::vector< std::string > show () const =0
 
-virtual std::vector< std::string > graph (const std::string &title="") const =0
 
-virtual std::string getVersion ()=0
 
-virtual std::vector< std::string > topological_order ()=0
 
-virtual std::vector< std::string > getNotes () const =0
 
-virtual std::string dump_cpt () const =0
 
-virtual void setHyperparameters (const nlohmann::json &hyperparameters)=0
 
std::vector< std::string > & getValidHyperparameters ()
 
- - - -

-Protected Member Functions

-virtual void trainModel (const torch::Tensor &weights)=0
 
- - - -

-Protected Attributes

std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 13 of file BaseClassifier.h.

-

Member Function Documentation

- -

◆ getValidHyperparameters()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > & bayesnet::BaseClassifier::getValidHyperparameters ()
-
-inline
-
- -

Definition at line 40 of file BaseClassifier.h.

- -
-
-

Member Data Documentation

- -

◆ validHyperparameters

- -
-
- - - - - -
- - - - -
std::vector<std::string> bayesnet::BaseClassifier::validHyperparameters
-
-protected
-
- -

Definition at line 43 of file BaseClassifier.h.

- -
-
-
The documentation for this class was generated from the following file: -
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.map b/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.map deleted file mode 100644 index 4ee5c66..0000000 --- a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.map +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.md5 deleted file mode 100644 index 0904b24..0000000 --- a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -db5ef66c6a031328c592dde37edf565d \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.png b/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.png deleted file mode 100644 index 06c4ed8..0000000 Binary files a/docs/manual/classbayesnet_1_1_base_classifier__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost-members.html b/docs/manual/classbayesnet_1_1_boost-members.html deleted file mode 100644 index 838f630..0000000 --- a/docs/manual/classbayesnet_1_1_boost-members.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Boost Member List
-
-
- -

This is the complete list of members for bayesnet::Boost, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
bisection (defined in bayesnet::Boost)bayesnet::Boostprotected
block_update (defined in bayesnet::Boost)bayesnet::Boostprotected
Boost(bool predict_voting=false) (defined in bayesnet::Boost)bayesnet::Boostexplicit
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::Boost)bayesnet::Boostprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
convergence (defined in bayesnet::Boost)bayesnet::Boostprotected
convergence_best (defined in bayesnet::Boost)bayesnet::Boostprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
featureSelection(torch::Tensor &weights_) (defined in bayesnet::Boost)bayesnet::Boostprotected
featureSelector (defined in bayesnet::Boost)bayesnet::Boostprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title) const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
maxTolerance (defined in bayesnet::Boost)bayesnet::Boostprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
order_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
select_features_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
selectFeatures (defined in bayesnet::Boost)bayesnet::Boostprotected
setHyperparameters(const nlohmann::json &hyperparameters_) override (defined in bayesnet::Boost)bayesnet::Boostvirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
threshold (defined in bayesnet::Boost)bayesnet::Boostprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Ensemble)bayesnet::Ensembleprotectedvirtual
update_weights(torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
update_weights_block(int k, torch::Tensor &ytrain, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
X_test (defined in bayesnet::Boost)bayesnet::Boostprotected
X_train (defined in bayesnet::Boost)bayesnet::Boostprotected
y_test (defined in bayesnet::Boost)bayesnet::Boostprotected
y_train (defined in bayesnet::Boost)bayesnet::Boostprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Boost()=default (defined in bayesnet::Boost)bayesnet::Boostvirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost.html b/docs/manual/classbayesnet_1_1_boost.html deleted file mode 100644 index e0db539..0000000 --- a/docs/manual/classbayesnet_1_1_boost.html +++ /dev/null @@ -1,845 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Boost Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-Inheritance diagram for bayesnet::Boost:
-
-
Inheritance graph
- - - - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::Boost:
-
-
Collaboration graph
- - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Boost (bool predict_voting=false)
 
void setHyperparameters (const nlohmann::json &hyperparameters_) override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

std::vector< int > featureSelection (torch::Tensor &weights_)
 
void buildModel (const torch::Tensor &weights) override
 
std::tuple< torch::Tensor &, double, bool > update_weights (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)
 
std::tuple< torch::Tensor &, double, bool > update_weights_block (int k, torch::Tensor &ytrain, torch::Tensor &weights)
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

torch::Tensor X_train
 
torch::Tensor y_train
 
torch::Tensor X_test
 
torch::Tensor y_test
 
bool bisection = true
 
int maxTolerance = 3
 
std::string order_algorithm
 
bool convergence = true
 
bool convergence_best = false
 
bool selectFeatures = false
 
std::string select_features_algorithm = Orders.DESC
 
FeatureSelect * featureSelector = nullptr
 
double threshold = -1
 
bool block_update = false
 
- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 27 of file Boost.h.

-

Constructor & Destructor Documentation

- -

◆ Boost()

- -
-
- - - - - -
- - - - - - - -
bayesnet::Boost::Boost (bool predict_voting = false)
-
-explicit
-
- -

Definition at line 13 of file Boost.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Boost::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 71 of file Boost.cc.

- -
-
- -

◆ featureSelection()

- -
-
- - - - - -
- - - - - - - -
std::vector< int > bayesnet::Boost::featureSelection (torch::Tensor & weights_)
-
-protected
-
- -

Definition at line 102 of file Boost.cc.

- -
-
- -

◆ setHyperparameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Boost::setHyperparameters (const nlohmann::json & hyperparameters_)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 18 of file Boost.cc.

- -
-
- -

◆ update_weights()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::tuple< torch::Tensor &, double, bool > bayesnet::Boost::update_weights (torch::Tensor & ytrain,
torch::Tensor & ypred,
torch::Tensor & weights )
-
-protected
-
- -

Definition at line 123 of file Boost.cc.

- -
-
- -

◆ update_weights_block()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::tuple< torch::Tensor &, double, bool > bayesnet::Boost::update_weights_block (int k,
torch::Tensor & ytrain,
torch::Tensor & weights )
-
-protected
-
- -

Definition at line 150 of file Boost.cc.

- -
-
-

Member Data Documentation

- -

◆ bisection

- -
-
- - - - - -
- - - - -
bool bayesnet::Boost::bisection = true
-
-protected
-
- -

Definition at line 39 of file Boost.h.

- -
-
- -

◆ block_update

- -
-
- - - - - -
- - - - -
bool bayesnet::Boost::block_update = false
-
-protected
-
- -

Definition at line 48 of file Boost.h.

- -
-
- -

◆ convergence

- -
-
- - - - - -
- - - - -
bool bayesnet::Boost::convergence = true
-
-protected
-
- -

Definition at line 42 of file Boost.h.

- -
-
- -

◆ convergence_best

- -
-
- - - - - -
- - - - -
bool bayesnet::Boost::convergence_best = false
-
-protected
-
- -

Definition at line 43 of file Boost.h.

- -
-
- -

◆ featureSelector

- -
-
- - - - - -
- - - - -
FeatureSelect* bayesnet::Boost::featureSelector = nullptr
-
-protected
-
- -

Definition at line 46 of file Boost.h.

- -
-
- -

◆ maxTolerance

- -
-
- - - - - -
- - - - -
int bayesnet::Boost::maxTolerance = 3
-
-protected
-
- -

Definition at line 40 of file Boost.h.

- -
-
- -

◆ order_algorithm

- -
-
- - - - - -
- - - - -
std::string bayesnet::Boost::order_algorithm
-
-protected
-
- -

Definition at line 41 of file Boost.h.

- -
-
- -

◆ select_features_algorithm

- -
-
- - - - - -
- - - - -
std::string bayesnet::Boost::select_features_algorithm = Orders.DESC
-
-protected
-
- -

Definition at line 45 of file Boost.h.

- -
-
- -

◆ selectFeatures

- -
-
- - - - - -
- - - - -
bool bayesnet::Boost::selectFeatures = false
-
-protected
-
- -

Definition at line 44 of file Boost.h.

- -
-
- -

◆ threshold

- -
-
- - - - - -
- - - - -
double bayesnet::Boost::threshold = -1
-
-protected
-
- -

Definition at line 47 of file Boost.h.

- -
-
- -

◆ X_test

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Boost::X_test
-
-protected
-
- -

Definition at line 37 of file Boost.h.

- -
-
- -

◆ X_train

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Boost::X_train
-
-protected
-
- -

Definition at line 37 of file Boost.h.

- -
-
- -

◆ y_test

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Boost::y_test
-
-protected
-
- -

Definition at line 37 of file Boost.h.

- -
-
- -

◆ y_train

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Boost::y_train
-
-protected
-
- -

Definition at line 37 of file Boost.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Boost.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Boost.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost__coll__graph.map b/docs/manual/classbayesnet_1_1_boost__coll__graph.map deleted file mode 100644 index 4321386..0000000 --- a/docs/manual/classbayesnet_1_1_boost__coll__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost__coll__graph.md5 b/docs/manual/classbayesnet_1_1_boost__coll__graph.md5 deleted file mode 100644 index 94b6c47..0000000 --- a/docs/manual/classbayesnet_1_1_boost__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -33c55f91c7a5aad7b7e8fe161de0b44b \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost__coll__graph.png b/docs/manual/classbayesnet_1_1_boost__coll__graph.png deleted file mode 100644 index 1be9b7e..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost__inherit__graph.map b/docs/manual/classbayesnet_1_1_boost__inherit__graph.map deleted file mode 100644 index 6e4f09e..0000000 --- a/docs/manual/classbayesnet_1_1_boost__inherit__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_boost__inherit__graph.md5 deleted file mode 100644 index 0f9adf1..0000000 --- a/docs/manual/classbayesnet_1_1_boost__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e24f4aa87c4b3d0cdd0c5eb01ce7479b \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost__inherit__graph.png b/docs/manual/classbayesnet_1_1_boost__inherit__graph.png deleted file mode 100644 index afd6d52..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e-members.html b/docs/manual/classbayesnet_1_1_boost_a2_d_e-members.html deleted file mode 100644 index dd7e95e..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e-members.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::BoostA2DE Member List
-
-
- -

This is the complete list of members for bayesnet::BoostA2DE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
bisection (defined in bayesnet::Boost)bayesnet::Boostprotected
block_update (defined in bayesnet::Boost)bayesnet::Boostprotected
Boost(bool predict_voting=false) (defined in bayesnet::Boost)bayesnet::Boostexplicit
BoostA2DE(bool predict_voting=false) (defined in bayesnet::BoostA2DE)bayesnet::BoostA2DEexplicit
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::Boost)bayesnet::Boostprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
convergence (defined in bayesnet::Boost)bayesnet::Boostprotected
convergence_best (defined in bayesnet::Boost)bayesnet::Boostprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
featureSelection(torch::Tensor &weights_) (defined in bayesnet::Boost)bayesnet::Boostprotected
featureSelector (defined in bayesnet::Boost)bayesnet::Boostprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title="BoostA2DE") const override (defined in bayesnet::BoostA2DE)bayesnet::BoostA2DEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
maxTolerance (defined in bayesnet::Boost)bayesnet::Boostprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
order_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
select_features_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
selectFeatures (defined in bayesnet::Boost)bayesnet::Boostprotected
setHyperparameters(const nlohmann::json &hyperparameters_) override (defined in bayesnet::Boost)bayesnet::Boostvirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
threshold (defined in bayesnet::Boost)bayesnet::Boostprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::BoostA2DE)bayesnet::BoostA2DEprotectedvirtual
update_weights(torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
update_weights_block(int k, torch::Tensor &ytrain, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
X_test (defined in bayesnet::Boost)bayesnet::Boostprotected
X_train (defined in bayesnet::Boost)bayesnet::Boostprotected
y_test (defined in bayesnet::Boost)bayesnet::Boostprotected
y_train (defined in bayesnet::Boost)bayesnet::Boostprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Boost()=default (defined in bayesnet::Boost)bayesnet::Boostvirtual
~BoostA2DE()=default (defined in bayesnet::BoostA2DE)bayesnet::BoostA2DEvirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e.html b/docs/manual/classbayesnet_1_1_boost_a2_d_e.html deleted file mode 100644 index 3a95eaa..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - -BayesNet: bayesnet::BoostA2DE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::BoostA2DE Class Reference
-
-
-
-Inheritance diagram for bayesnet::BoostA2DE:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::BoostA2DE:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BoostA2DE (bool predict_voting=false)
 
std::vector< std::string > graph (const std::string &title="BoostA2DE") const override
 
- Public Member Functions inherited from bayesnet::Boost
 Boost (bool predict_voting=false)
 
void setHyperparameters (const nlohmann::json &hyperparameters_) override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Boost
std::vector< int > featureSelection (torch::Tensor &weights_)
 
void buildModel (const torch::Tensor &weights) override
 
std::tuple< torch::Tensor &, double, bool > update_weights (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)
 
std::tuple< torch::Tensor &, double, bool > update_weights_block (int k, torch::Tensor &ytrain, torch::Tensor &weights)
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Boost
torch::Tensor X_train
 
torch::Tensor y_train
 
torch::Tensor X_test
 
torch::Tensor y_test
 
bool bisection = true
 
int maxTolerance = 3
 
std::string order_algorithm
 
bool convergence = true
 
bool convergence_best = false
 
bool selectFeatures = false
 
std::string select_features_algorithm = Orders.DESC
 
FeatureSelect * featureSelector = nullptr
 
double threshold = -1
 
bool block_update = false
 
- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 14 of file BoostA2DE.h.

-

Constructor & Destructor Documentation

- -

◆ BoostA2DE()

- -
-
- - - - - -
- - - - - - - -
bayesnet::BoostA2DE::BoostA2DE (bool predict_voting = false)
-
-explicit
-
- -

Definition at line 19 of file BoostA2DE.cc.

- -
-
-

Member Function Documentation

- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::BoostA2DE::graph (const std::string & title = "BoostA2DE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 163 of file BoostA2DE.cc.

- -
-
- -

◆ trainModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::BoostA2DE::trainModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 44 of file BoostA2DE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostA2DE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostA2DE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.map deleted file mode 100644 index 5cbcf45..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.md5 deleted file mode 100644 index 83241f0..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -98594f5a9055dcb8b341181bb66be4d2 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.png deleted file mode 100644 index 67b6796..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost_a2_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.map deleted file mode 100644 index 2f39440..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.md5 deleted file mode 100644 index ce8b996..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -aa422c1101da842a8232eacd485de14f \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.png deleted file mode 100644 index 7e032fd..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost_a2_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e-members.html b/docs/manual/classbayesnet_1_1_boost_a_o_d_e-members.html deleted file mode 100644 index 2bebe69..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e-members.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::BoostAODE Member List
-
-
- -

This is the complete list of members for bayesnet::BoostAODE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
bisection (defined in bayesnet::Boost)bayesnet::Boostprotected
block_update (defined in bayesnet::Boost)bayesnet::Boostprotected
Boost(bool predict_voting=false) (defined in bayesnet::Boost)bayesnet::Boostexplicit
BoostAODE(bool predict_voting=false) (defined in bayesnet::BoostAODE)bayesnet::BoostAODEexplicit
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::Boost)bayesnet::Boostprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
convergence (defined in bayesnet::Boost)bayesnet::Boostprotected
convergence_best (defined in bayesnet::Boost)bayesnet::Boostprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
featureSelection(torch::Tensor &weights_) (defined in bayesnet::Boost)bayesnet::Boostprotected
featureSelector (defined in bayesnet::Boost)bayesnet::Boostprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title="BoostAODE") const override (defined in bayesnet::BoostAODE)bayesnet::BoostAODEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
maxTolerance (defined in bayesnet::Boost)bayesnet::Boostprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
order_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
select_features_algorithm (defined in bayesnet::Boost)bayesnet::Boostprotected
selectFeatures (defined in bayesnet::Boost)bayesnet::Boostprotected
setHyperparameters(const nlohmann::json &hyperparameters_) override (defined in bayesnet::Boost)bayesnet::Boostvirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
threshold (defined in bayesnet::Boost)bayesnet::Boostprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::BoostAODE)bayesnet::BoostAODEprotectedvirtual
update_weights(torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
update_weights_block(int k, torch::Tensor &ytrain, torch::Tensor &weights) (defined in bayesnet::Boost)bayesnet::Boostprotected
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
X_test (defined in bayesnet::Boost)bayesnet::Boostprotected
X_train (defined in bayesnet::Boost)bayesnet::Boostprotected
y_test (defined in bayesnet::Boost)bayesnet::Boostprotected
y_train (defined in bayesnet::Boost)bayesnet::Boostprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Boost()=default (defined in bayesnet::Boost)bayesnet::Boostvirtual
~BoostAODE()=default (defined in bayesnet::BoostAODE)bayesnet::BoostAODEvirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e.html b/docs/manual/classbayesnet_1_1_boost_a_o_d_e.html deleted file mode 100644 index ba60471..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - -BayesNet: bayesnet::BoostAODE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::BoostAODE Class Reference
-
-
-
-Inheritance diagram for bayesnet::BoostAODE:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::BoostAODE:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BoostAODE (bool predict_voting=false)
 
std::vector< std::string > graph (const std::string &title="BoostAODE") const override
 
- Public Member Functions inherited from bayesnet::Boost
 Boost (bool predict_voting=false)
 
void setHyperparameters (const nlohmann::json &hyperparameters_) override
 
- Public Member Functions inherited from bayesnet::Ensemble
 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Boost
std::vector< int > featureSelection (torch::Tensor &weights_)
 
void buildModel (const torch::Tensor &weights) override
 
std::tuple< torch::Tensor &, double, bool > update_weights (torch::Tensor &ytrain, torch::Tensor &ypred, torch::Tensor &weights)
 
std::tuple< torch::Tensor &, double, bool > update_weights_block (int k, torch::Tensor &ytrain, torch::Tensor &weights)
 
- Protected Member Functions inherited from bayesnet::Ensemble
torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Boost
torch::Tensor X_train
 
torch::Tensor y_train
 
torch::Tensor X_test
 
torch::Tensor y_test
 
bool bisection = true
 
int maxTolerance = 3
 
std::string order_algorithm
 
bool convergence = true
 
bool convergence_best = false
 
bool selectFeatures = false
 
std::string select_features_algorithm = Orders.DESC
 
FeatureSelect * featureSelector = nullptr
 
double threshold = -1
 
bool block_update = false
 
- Protected Attributes inherited from bayesnet::Ensemble
unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 15 of file BoostAODE.h.

-

Constructor & Destructor Documentation

- -

◆ BoostAODE()

- -
-
- - - - - -
- - - - - - - -
bayesnet::BoostAODE::BoostAODE (bool predict_voting = false)
-
-explicit
-
- -

Definition at line 16 of file BoostAODE.cc.

- -
-
-

Member Function Documentation

- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::BoostAODE::graph (const std::string & title = "BoostAODE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 157 of file BoostAODE.cc.

- -
-
- -

◆ trainModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::BoostAODE::trainModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 33 of file BoostAODE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostAODE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/BoostAODE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.map deleted file mode 100644 index 9a88f80..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.md5 deleted file mode 100644 index f160e80..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3c89fcabfaf26457db505ef70b62833d \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.png deleted file mode 100644 index 32135be..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.map deleted file mode 100644 index 2d6d7a7..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.md5 deleted file mode 100644 index 48ae7fb..0000000 --- a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1349874a295fe4607bce4f148d38cc42 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.png deleted file mode 100644 index 3952219..0000000 Binary files a/docs/manual/classbayesnet_1_1_boost_a_o_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_classifier-members.html b/docs/manual/classbayesnet_1_1_classifier-members.html deleted file mode 100644 index 1e44557..0000000 --- a/docs/manual/classbayesnet_1_1_classifier-members.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Classifier Member List
-
-
- -

This is the complete list of members for bayesnet::Classifier, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights)=0 (defined in bayesnet::Classifier)bayesnet::Classifierprotectedpure virtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title="") const =0 (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierpure virtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_classifier.html b/docs/manual/classbayesnet_1_1_classifier.html deleted file mode 100644 index ef57099..0000000 --- a/docs/manual/classbayesnet_1_1_classifier.html +++ /dev/null @@ -1,1348 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Classifier Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::Classifier Class Referenceabstract
-
-
-
-Inheritance diagram for bayesnet::Classifier:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::Classifier:
-
-
Collaboration graph
- - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
-virtual std::vector< std::string > graph (const std::string &title="") const =0
 
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - -

-Protected Member Functions

void checkFitParameters ()
 
-virtual void buildModel (const torch::Tensor &weights)=0
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 15 of file Classifier.h.

-

Constructor & Destructor Documentation

- -

◆ Classifier()

- -
-
- - - - - - - -
bayesnet::Classifier::Classifier (Network model)
-
- -

Definition at line 12 of file Classifier.cc.

- -
-
-

Member Function Documentation

- -

◆ addNodes()

- -
-
- - - - - - - -
void bayesnet::Classifier::addNodes ()
-
- -

Definition at line 155 of file Classifier.cc.

- -
-
- -

◆ buildDataset()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Classifier::buildDataset (torch::Tensor & y)
-
-protected
-
- -

Definition at line 30 of file Classifier.cc.

- -
-
- -

◆ checkFitParameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Classifier::checkFitParameters ()
-
-protected
-
- -

Definition at line 79 of file Classifier.cc.

- -
-
- -

◆ dump_cpt()

- -
-
- - - - - -
- - - - - - - -
std::string bayesnet::Classifier::dump_cpt () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 184 of file Classifier.cc.

- -
-
- -

◆ fit() [1/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Classifier & bayesnet::Classifier::fit (std::vector< std::vector< int > > & X,
std::vector< int > & y,
const std::vector< std::string > & features,
const std::string & className,
std::map< std::string, std::vector< int > > & states )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 57 of file Classifier.cc.

- -
-
- -

◆ fit() [2/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
Classifier & bayesnet::Classifier::fit (torch::Tensor & dataset,
const std::vector< std::string > & features,
const std::string & className,
std::map< std::string, std::vector< int > > & states )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 68 of file Classifier.cc.

- -
-
- -

◆ fit() [3/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Classifier & bayesnet::Classifier::fit (torch::Tensor & dataset,
const std::vector< std::string > & features,
const std::string & className,
std::map< std::string, std::vector< int > > & states,
const torch::Tensor & weights )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 74 of file Classifier.cc.

- -
-
- -

◆ fit() [4/4]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Classifier & bayesnet::Classifier::fit (torch::Tensor & X,
torch::Tensor & y,
const std::vector< std::string > & features,
const std::string & className,
std::map< std::string, std::vector< int > > & states )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 49 of file Classifier.cc.

- -
-
- -

◆ getClassNumStates()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Classifier::getClassNumStates () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 176 of file Classifier.cc.

- -
-
- -

◆ getNotes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Classifier::getNotes () const
-
-inlineoverridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 38 of file Classifier.h.

- -
-
- -

◆ getNumberOfEdges()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Classifier::getNumberOfEdges () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 168 of file Classifier.cc.

- -
-
- -

◆ getNumberOfNodes()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Classifier::getNumberOfNodes () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 163 of file Classifier.cc.

- -
-
- -

◆ getNumberOfStates()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Classifier::getNumberOfStates () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 172 of file Classifier.cc.

- -
-
- -

◆ getStatus()

- -
-
- - - - - -
- - - - - - - -
status_t bayesnet::Classifier::getStatus () const
-
-inlineoverridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 32 of file Classifier.h.

- -
-
- -

◆ getVersion()

- -
-
- - - - - -
- - - - - - - -
std::string bayesnet::Classifier::getVersion ()
-
-inlineoverridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 33 of file Classifier.h.

- -
-
- -

◆ predict() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< int > bayesnet::Classifier::predict (std::vector< std::vector< int > > & X)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 103 of file Classifier.cc.

- -
-
- -

◆ predict() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Classifier::predict (torch::Tensor & X)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 96 of file Classifier.cc.

- -
-
- -

◆ predict_proba() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< double > > bayesnet::Classifier::predict_proba (std::vector< std::vector< int > > & X)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 124 of file Classifier.cc.

- -
-
- -

◆ predict_proba() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Classifier::predict_proba (torch::Tensor & X)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 117 of file Classifier.cc.

- -
-
- -

◆ score() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
float bayesnet::Classifier::score (std::vector< std::vector< int > > & X,
std::vector< int > & y )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 144 of file Classifier.cc.

- -
-
- -

◆ score() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - -
float bayesnet::Classifier::score (torch::Tensor & X,
torch::Tensor & y )
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 139 of file Classifier.cc.

- -
-
- -

◆ setHyperparameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Classifier::setHyperparameters (const nlohmann::json & hyperparameters)
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 188 of file Classifier.cc.

- -
-
- -

◆ show()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Classifier::show () const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 151 of file Classifier.cc.

- -
-
- -

◆ topological_order()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Classifier::topological_order ()
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 180 of file Classifier.cc.

- -
-
- -

◆ trainModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Classifier::trainModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 44 of file Classifier.cc.

- -
-
-

Member Data Documentation

- -

◆ className

- -
-
- - - - - -
- - - - -
std::string bayesnet::Classifier::className
-
-protected
-
- -

Definition at line 47 of file Classifier.h.

- -
-
- -

◆ dataset

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Classifier::dataset
-
-protected
-
- -

Definition at line 49 of file Classifier.h.

- -
-
- -

◆ features

- -
-
- - - - - -
- - - - -
std::vector<std::string> bayesnet::Classifier::features
-
-protected
-
- -

Definition at line 46 of file Classifier.h.

- -
-
- -

◆ fitted

- -
-
- - - - - -
- - - - -
bool bayesnet::Classifier::fitted
-
-protected
-
- -

Definition at line 42 of file Classifier.h.

- -
-
- -

◆ m

- -
-
- - - - - -
- - - - -
unsigned int bayesnet::Classifier::m
-
-protected
-
- -

Definition at line 43 of file Classifier.h.

- -
-
- -

◆ metrics

- -
-
- - - - - -
- - - - -
Metrics bayesnet::Classifier::metrics
-
-protected
-
- -

Definition at line 45 of file Classifier.h.

- -
-
- -

◆ model

- -
-
- - - - - -
- - - - -
Network bayesnet::Classifier::model
-
-protected
-
- -

Definition at line 44 of file Classifier.h.

- -
-
- -

◆ n

- -
-
- - - - - -
- - - - -
unsigned int bayesnet::Classifier::n
-
-protected
-
- -

Definition at line 43 of file Classifier.h.

- -
-
- -

◆ notes

- -
-
- - - - - -
- - - - -
std::vector<std::string> bayesnet::Classifier::notes
-
-protected
-
- -

Definition at line 51 of file Classifier.h.

- -
-
- -

◆ states

- -
-
- - - - - -
- - - - -
std::map<std::string, std::vector<int> > bayesnet::Classifier::states
-
-protected
-
- -

Definition at line 48 of file Classifier.h.

- -
-
- -

◆ status

- -
-
- - - - - -
- - - - -
status_t bayesnet::Classifier::status = NORMAL
-
-protected
-
- -

Definition at line 50 of file Classifier.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Classifier.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Classifier.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_classifier__coll__graph.map b/docs/manual/classbayesnet_1_1_classifier__coll__graph.map deleted file mode 100644 index faddef8..0000000 --- a/docs/manual/classbayesnet_1_1_classifier__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_classifier__coll__graph.md5 b/docs/manual/classbayesnet_1_1_classifier__coll__graph.md5 deleted file mode 100644 index fe2a7df..0000000 --- a/docs/manual/classbayesnet_1_1_classifier__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -11b68cf05c82a53d413b124afb143844 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_classifier__coll__graph.png b/docs/manual/classbayesnet_1_1_classifier__coll__graph.png deleted file mode 100644 index ff1955a..0000000 Binary files a/docs/manual/classbayesnet_1_1_classifier__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.map b/docs/manual/classbayesnet_1_1_classifier__inherit__graph.map deleted file mode 100644 index 7c975a0..0000000 --- a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.map +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_classifier__inherit__graph.md5 deleted file mode 100644 index ffe3469..0000000 --- a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e8eb745ffa2d265244d915fc0e5f0ee0 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.png b/docs/manual/classbayesnet_1_1_classifier__inherit__graph.png deleted file mode 100644 index 410aacc..0000000 Binary files a/docs/manual/classbayesnet_1_1_classifier__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_ensemble-members.html b/docs/manual/classbayesnet_1_1_ensemble-members.html deleted file mode 100644 index b30b233..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble-members.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Ensemble Member List
-
-
- -

This is the complete list of members for bayesnet::Ensemble, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights)=0 (defined in bayesnet::Classifier)bayesnet::Classifierprotectedpure virtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
compute_arg_max(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
compute_arg_max(std::vector< std::vector< double > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
Ensemble(bool predict_voting=true) (defined in bayesnet::Ensemble)bayesnet::Ensemble
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfNodes() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getNumberOfStates() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &title) const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n_models (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_average_proba(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_proba(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(torch::Tensor &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_average_voting(std::vector< std::vector< int > > &X) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
predict_proba(torch::Tensor &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
predict_voting (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
significanceModels (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Ensemble)bayesnet::Ensembleinlinevirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Ensemble)bayesnet::Ensembleprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
voting(torch::Tensor &votes) (defined in bayesnet::Ensemble)bayesnet::Ensembleprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Ensemble()=default (defined in bayesnet::Ensemble)bayesnet::Ensemblevirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_ensemble.html b/docs/manual/classbayesnet_1_1_ensemble.html deleted file mode 100644 index 0658cfc..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble.html +++ /dev/null @@ -1,1007 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Ensemble Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-Inheritance diagram for bayesnet::Ensemble:
-
-
Inheritance graph
- - - - - - - - - - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::Ensemble:
-
-
Collaboration graph
- - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Ensemble (bool predict_voting=true)
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
std::vector< std::string > show () const override
 
std::vector< std::string > graph (const std::string &title) const override
 
std::vector< std::string > topological_order () override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getClassNumStates () const override
 
status_t getStatus () const override
 
std::string getVersion () override
 
std::vector< std::string > getNotes () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

torch::Tensor predict_average_voting (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_voting (std::vector< std::vector< int > > &X)
 
torch::Tensor predict_average_proba (torch::Tensor &X)
 
std::vector< std::vector< double > > predict_average_proba (std::vector< std::vector< int > > &X)
 
torch::Tensor compute_arg_max (torch::Tensor &X)
 
std::vector< int > compute_arg_max (std::vector< std::vector< double > > &X)
 
torch::Tensor voting (torch::Tensor &votes)
 
void trainModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
-virtual void buildModel (const torch::Tensor &weights)=0
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

unsigned n_models
 
std::vector< std::unique_ptr< Classifier > > models
 
std::vector< double > significanceModels
 
bool predict_voting
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 15 of file Ensemble.h.

-

Constructor & Destructor Documentation

- -

◆ Ensemble()

- -
-
- - - - - - - -
bayesnet::Ensemble::Ensemble (bool predict_voting = true)
-
- -

Definition at line 11 of file Ensemble.cc.

- -
-
-

Member Function Documentation

- -

◆ compute_arg_max() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< int > bayesnet::Ensemble::compute_arg_max (std::vector< std::vector< double > > & X)
-
-protected
-
- -

Definition at line 24 of file Ensemble.cc.

- -
-
- -

◆ compute_arg_max() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::compute_arg_max (torch::Tensor & X)
-
-protected
-
- -

Definition at line 33 of file Ensemble.cc.

- -
-
- -

◆ dump_cpt()

- -
-
- - - - - -
- - - - - - - -
std::string bayesnet::Ensemble::dump_cpt () const
-
-inlineoverridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 34 of file Ensemble.h.

- -
-
- -

◆ getNumberOfEdges()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Ensemble::getNumberOfEdges () const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 206 of file Ensemble.cc.

- -
-
- -

◆ getNumberOfNodes()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Ensemble::getNumberOfNodes () const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 198 of file Ensemble.cc.

- -
-
- -

◆ getNumberOfStates()

- -
-
- - - - - -
- - - - - - - -
int bayesnet::Ensemble::getNumberOfStates () const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 214 of file Ensemble.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Ensemble::graph (const std::string & title) const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 189 of file Ensemble.cc.

- -
-
- -

◆ predict() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< int > bayesnet::Ensemble::predict (std::vector< std::vector< int > > & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 74 of file Ensemble.cc.

- -
-
- -

◆ predict() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::predict (torch::Tensor & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 79 of file Ensemble.cc.

- -
-
- -

◆ predict_average_proba() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< double > > bayesnet::Ensemble::predict_average_proba (std::vector< std::vector< int > > & X)
-
-protected
-
- -

Definition at line 104 of file Ensemble.cc.

- -
-
- -

◆ predict_average_proba() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::predict_average_proba (torch::Tensor & X)
-
-protected
-
- -

Definition at line 84 of file Ensemble.cc.

- -
-
- -

◆ predict_average_voting() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< double > > bayesnet::Ensemble::predict_average_voting (std::vector< std::vector< int > > & X)
-
-protected
-
- -

Definition at line 133 of file Ensemble.cc.

- -
-
- -

◆ predict_average_voting() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::predict_average_voting (torch::Tensor & X)
-
-protected
-
- -

Definition at line 140 of file Ensemble.cc.

- -
-
- -

◆ predict_proba() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< double > > bayesnet::Ensemble::predict_proba (std::vector< std::vector< int > > & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 60 of file Ensemble.cc.

- -
-
- -

◆ predict_proba() [2/2]

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::predict_proba (torch::Tensor & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 67 of file Ensemble.cc.

- -
-
- -

◆ score() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
float bayesnet::Ensemble::score (std::vector< std::vector< int > > & X,
std::vector< int > & y )
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 169 of file Ensemble.cc.

- -
-
- -

◆ score() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - -
float bayesnet::Ensemble::score (torch::Tensor & X,
torch::Tensor & y )
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 158 of file Ensemble.cc.

- -
-
- -

◆ show()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Ensemble::show () const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 180 of file Ensemble.cc.

- -
-
- -

◆ topological_order()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::Ensemble::topological_order ()
-
-inlineoverridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 30 of file Ensemble.h.

- -
-
- -

◆ trainModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::Ensemble::trainModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 16 of file Ensemble.cc.

- -
-
- -

◆ voting()

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Ensemble::voting (torch::Tensor & votes)
-
-protected
-
- -

Definition at line 38 of file Ensemble.cc.

- -
-
-

Member Data Documentation

- -

◆ models

- -
-
- - - - - -
- - - - -
std::vector<std::unique_ptr<Classifier> > bayesnet::Ensemble::models
-
-protected
-
- -

Definition at line 47 of file Ensemble.h.

- -
-
- -

◆ n_models

- -
-
- - - - - -
- - - - -
unsigned bayesnet::Ensemble::n_models
-
-protected
-
- -

Definition at line 46 of file Ensemble.h.

- -
-
- -

◆ predict_voting

- -
-
- - - - - -
- - - - -
bool bayesnet::Ensemble::predict_voting
-
-protected
-
- -

Definition at line 50 of file Ensemble.h.

- -
-
- -

◆ significanceModels

- -
-
- - - - - -
- - - - -
std::vector<double> bayesnet::Ensemble::significanceModels
-
-protected
-
- -

Definition at line 48 of file Ensemble.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Ensemble.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/ensembles/Ensemble.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.map b/docs/manual/classbayesnet_1_1_ensemble__coll__graph.map deleted file mode 100644 index 03173b1..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.md5 b/docs/manual/classbayesnet_1_1_ensemble__coll__graph.md5 deleted file mode 100644 index b723997..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b86ef25f6b5cae66beecc3e9ed01dc2c \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.png b/docs/manual/classbayesnet_1_1_ensemble__coll__graph.png deleted file mode 100644 index 33f6e04..0000000 Binary files a/docs/manual/classbayesnet_1_1_ensemble__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.map b/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.map deleted file mode 100644 index 27da9cd..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.map +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.md5 deleted file mode 100644 index 664bcbd..0000000 --- a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d57ab6e4c37c557ee959ea8c8835847b \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.png b/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.png deleted file mode 100644 index dc895de..0000000 Binary files a/docs/manual/classbayesnet_1_1_ensemble__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_k_d_b-members.html b/docs/manual/classbayesnet_1_1_k_d_b-members.html deleted file mode 100644 index dacbb68..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b-members.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::KDB Member List
-
-
- -

This is the complete list of members for bayesnet::KDB, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::KDB)bayesnet::KDBprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="KDB") const override (defined in bayesnet::KDB)bayesnet::KDBvirtual
KDB(int k, float theta=0.03) (defined in bayesnet::KDB)bayesnet::KDBexplicit
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters_) override (defined in bayesnet::KDB)bayesnet::KDBvirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~KDB()=default (defined in bayesnet::KDB)bayesnet::KDBvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b.html b/docs/manual/classbayesnet_1_1_k_d_b.html deleted file mode 100644 index 2c77b6d..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - -BayesNet: bayesnet::KDB Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::KDB Class Reference
-
-
-
-Inheritance diagram for bayesnet::KDB:
-
-
Inheritance graph
- - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::KDB:
-
-
Collaboration graph
- - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 KDB (int k, float theta=0.03)
 
void setHyperparameters (const nlohmann::json &hyperparameters_) override
 
std::vector< std::string > graph (const std::string &name="KDB") const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 13 of file KDB.h.

-

Constructor & Destructor Documentation

- -

◆ KDB()

- -
-
- - - - - -
- - - - - - - - - - - -
bayesnet::KDB::KDB (int k,
float theta = 0.03 )
-
-explicit
-
- -

Definition at line 10 of file KDB.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::KDB::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 28 of file KDB.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::KDB::graph (const std::string & name = "KDB") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 103 of file KDB.cc.

- -
-
- -

◆ setHyperparameters()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::KDB::setHyperparameters (const nlohmann::json & hyperparameters_)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 15 of file KDB.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDB.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDB.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.map b/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.map deleted file mode 100644 index d3088ec..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.md5 b/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.md5 deleted file mode 100644 index 69194a0..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -da61a083859449e9d8d630b70d27b858 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.png b/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.png deleted file mode 100644 index d6d858c..0000000 Binary files a/docs/manual/classbayesnet_1_1_k_d_b__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.map b/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.map deleted file mode 100644 index bd698e3..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.md5 deleted file mode 100644 index 138d696..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -f7a2fcb142d7e60993bfdd827f6f96d9 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.png b/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.png deleted file mode 100644 index c151753..0000000 Binary files a/docs/manual/classbayesnet_1_1_k_d_b__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld-members.html b/docs/manual/classbayesnet_1_1_k_d_b_ld-members.html deleted file mode 100644 index 8fe1817..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld-members.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::KDBLd Member List
-
-
- -

This is the complete list of members for bayesnet::KDBLd, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::KDB)bayesnet::KDBprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
checkInput(const torch::Tensor &X, const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
discretizers (defined in bayesnet::Proposal)bayesnet::Proposalprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override (defined in bayesnet::KDBLd)bayesnet::KDBLd
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit_local_discretization(const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="KDB") const override (defined in bayesnet::KDBLd)bayesnet::KDBLdvirtual
KDB(int k, float theta=0.03) (defined in bayesnet::KDB)bayesnet::KDBexplicit
KDBLd(int k) (defined in bayesnet::KDBLd)bayesnet::KDBLdexplicit
localDiscretizationProposal(const map< std::string, std::vector< int > > &states, Network &model) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::KDBLd)bayesnet::KDBLdvirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
prepareX(torch::Tensor &X) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Proposal(torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_) (defined in bayesnet::Proposal)bayesnet::Proposal
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters_) override (defined in bayesnet::KDB)bayesnet::KDBvirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
version() (defined in bayesnet::KDBLd)bayesnet::KDBLdinlinestatic
Xf (defined in bayesnet::Proposal)bayesnet::Proposalprotected
y (defined in bayesnet::Proposal)bayesnet::Proposalprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~KDB()=default (defined in bayesnet::KDB)bayesnet::KDBvirtual
~KDBLd()=default (defined in bayesnet::KDBLd)bayesnet::KDBLdvirtual
~Proposal() (defined in bayesnet::Proposal)bayesnet::Proposalvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld.html b/docs/manual/classbayesnet_1_1_k_d_b_ld.html deleted file mode 100644 index 46b2470..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld.html +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - -BayesNet: bayesnet::KDBLd Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::KDBLd Class Reference
-
-
-
-Inheritance diagram for bayesnet::KDBLd:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::KDBLd:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 KDBLd (int k)
 
KDBLdfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override
 
std::vector< std::string > graph (const std::string &name="KDB") const override
 
torch::Tensor predict (torch::Tensor &X) override
 
- Public Member Functions inherited from bayesnet::KDB
 KDB (int k, float theta=0.03)
 
void setHyperparameters (const nlohmann::json &hyperparameters_) override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- Public Member Functions inherited from bayesnet::Proposal
 Proposal (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)
 
- - - -

-Static Public Member Functions

static std::string version ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Member Functions inherited from bayesnet::KDB
void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- Protected Member Functions inherited from bayesnet::Proposal
void checkInput (const torch::Tensor &X, const torch::Tensor &y)
 
torch::Tensor prepareX (torch::Tensor &X)
 
map< std::string, std::vector< int > > localDiscretizationProposal (const map< std::string, std::vector< int > > &states, Network &model)
 
map< std::string, std::vector< int > > fit_local_discretization (const torch::Tensor &y)
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
- Protected Attributes inherited from bayesnet::Proposal
torch::Tensor Xf
 
torch::Tensor y
 
map< std::string, mdlp::CPPFImdlp * > discretizers
 
-

Detailed Description

-
-

Definition at line 13 of file KDBLd.h.

-

Constructor & Destructor Documentation

- -

◆ KDBLd()

- -
-
- - - - - -
- - - - - - - -
bayesnet::KDBLd::KDBLd (int k)
-
-explicit
-
- -

Definition at line 10 of file KDBLd.cc.

- -
-
-

Member Function Documentation

- -

◆ fit()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
KDBLd & bayesnet::KDBLd::fit (torch::Tensor & X,
torch::Tensor & y,
const std::vector< std::string > & features,
const std::string & className,
map< std::string, std::vector< int > > & states )
-
-override
-
- -

Definition at line 11 of file KDBLd.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::KDBLd::graph (const std::string & name = "KDB") const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::KDB.

- -

Definition at line 31 of file KDBLd.cc.

- -
-
- -

◆ predict()

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::KDBLd::predict (torch::Tensor & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 26 of file KDBLd.cc.

- -
-
- -

◆ version()

- -
-
- - - - - -
- - - - - - - -
static std::string bayesnet::KDBLd::version ()
-
-inlinestatic
-
- -

Definition at line 21 of file KDBLd.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDBLd.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/KDBLd.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.map b/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.map deleted file mode 100644 index 0bc95ec..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.md5 b/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.md5 deleted file mode 100644 index 5a460c8..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -c341d14e86ad0c1b8e028db9c194d855 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.png b/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.png deleted file mode 100644 index b39b8d9..0000000 Binary files a/docs/manual/classbayesnet_1_1_k_d_b_ld__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.map b/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.map deleted file mode 100644 index fd4e399..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.md5 deleted file mode 100644 index 8da87ae..0000000 --- a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -464954a9aef0437aadb100e747a29b93 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.png b/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.png deleted file mode 100644 index 4240afd..0000000 Binary files a/docs/manual/classbayesnet_1_1_k_d_b_ld__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_network-members.html b/docs/manual/classbayesnet_1_1_network-members.html deleted file mode 100644 index 7f66917..0000000 --- a/docs/manual/classbayesnet_1_1_network-members.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Network Member List
-
-
- -

This is the complete list of members for bayesnet::Network, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEdge(const std::string &, const std::string &) (defined in bayesnet::Network)bayesnet::Network
addNode(const std::string &) (defined in bayesnet::Network)bayesnet::Network
dump_cpt() const (defined in bayesnet::Network)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) (defined in bayesnet::Network)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) (defined in bayesnet::Network)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) (defined in bayesnet::Network)bayesnet::Network
getClassName() const (defined in bayesnet::Network)bayesnet::Network
getClassNumStates() const (defined in bayesnet::Network)bayesnet::Network
getEdges() const (defined in bayesnet::Network)bayesnet::Network
getFeatures() const (defined in bayesnet::Network)bayesnet::Network
getMaxThreads() const (defined in bayesnet::Network)bayesnet::Network
getNodes() (defined in bayesnet::Network)bayesnet::Network
getNumEdges() const (defined in bayesnet::Network)bayesnet::Network
getSamples() (defined in bayesnet::Network)bayesnet::Network
getStates() const (defined in bayesnet::Network)bayesnet::Network
graph(const std::string &title) const (defined in bayesnet::Network)bayesnet::Network
initialize() (defined in bayesnet::Network)bayesnet::Network
Network() (defined in bayesnet::Network)bayesnet::Network
Network(float) (defined in bayesnet::Network)bayesnet::Networkexplicit
Network(const Network &) (defined in bayesnet::Network)bayesnet::Networkexplicit
predict(const std::vector< std::vector< int > > &) (defined in bayesnet::Network)bayesnet::Network
predict(const torch::Tensor &) (defined in bayesnet::Network)bayesnet::Network
predict_proba(const std::vector< std::vector< int > > &) (defined in bayesnet::Network)bayesnet::Network
predict_proba(const torch::Tensor &) (defined in bayesnet::Network)bayesnet::Network
predict_tensor(const torch::Tensor &samples, const bool proba) (defined in bayesnet::Network)bayesnet::Network
score(const std::vector< std::vector< int > > &, const std::vector< int > &) (defined in bayesnet::Network)bayesnet::Network
show() const (defined in bayesnet::Network)bayesnet::Network
topological_sort() (defined in bayesnet::Network)bayesnet::Network
version() (defined in bayesnet::Network)bayesnet::Networkinline
~Network()=default (defined in bayesnet::Network)bayesnet::Network
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_network.html b/docs/manual/classbayesnet_1_1_network.html deleted file mode 100644 index 252deae..0000000 --- a/docs/manual/classbayesnet_1_1_network.html +++ /dev/null @@ -1,840 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Network Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::Network Class Reference
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Network (float)
 
 Network (const Network &)
 
torch::Tensor & getSamples ()
 
float getMaxThreads () const
 
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)
 
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)
 
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)
 
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 ()
 
-

Detailed Description

-
-

Definition at line 15 of file Network.h.

-

Constructor & Destructor Documentation

- -

◆ Network() [1/3]

- -
-
- - - - - - - -
bayesnet::Network::Network ()
-
- -

Definition at line 13 of file Network.cc.

- -
-
- -

◆ Network() [2/3]

- -
-
- - - - - -
- - - - - - - -
bayesnet::Network::Network (float maxT)
-
-explicit
-
- -

Definition at line 16 of file Network.cc.

- -
-
- -

◆ Network() [3/3]

- -
-
- - - - - -
- - - - - - - -
bayesnet::Network::Network (const Network & other)
-
-explicit
-
- -

Definition at line 20 of file Network.cc.

- -
-
-

Member Function Documentation

- -

◆ addEdge()

- -
-
- - - - - - - - - - - -
void bayesnet::Network::addEdge (const std::string & parent,
const std::string & child )
-
- -

Definition at line 95 of file Network.cc.

- -
-
- -

◆ addNode()

- -
-
- - - - - - - -
void bayesnet::Network::addNode (const std::string & name)
-
- -

Definition at line 46 of file Network.cc.

- -
-
- -

◆ dump_cpt()

- -
-
- - - - - - - -
std::string bayesnet::Network::dump_cpt () const
-
- -

Definition at line 420 of file Network.cc.

- -
-
- -

◆ fit() [1/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 )
-
- -

Definition at line 177 of file Network.cc.

- -
-
- -

◆ fit() [2/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
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 )
-
- -

Definition at line 169 of file Network.cc.

- -
-
- -

◆ fit() [3/3]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 )
-
- -

Definition at line 158 of file Network.cc.

- -
-
- -

◆ getClassName()

- -
-
- - - - - - - -
std::string bayesnet::Network::getClassName () const
-
- -

Definition at line 75 of file Network.cc.

- -
-
- -

◆ getClassNumStates()

- -
-
- - - - - - - -
int bayesnet::Network::getClassNumStates () const
-
- -

Definition at line 63 of file Network.cc.

- -
-
- -

◆ getEdges()

- -
-
- - - - - - - -
std::vector< std::pair< std::string, std::string > > bayesnet::Network::getEdges () const
-
- -

Definition at line 371 of file Network.cc.

- -
-
- -

◆ getFeatures()

- -
-
- - - - - - - -
std::vector< std::string > bayesnet::Network::getFeatures () const
-
- -

Definition at line 59 of file Network.cc.

- -
-
- -

◆ getMaxThreads()

- -
-
- - - - - - - -
float bayesnet::Network::getMaxThreads () const
-
- -

Definition at line 38 of file Network.cc.

- -
-
- -

◆ getNodes()

- -
-
- - - - - - - -
std::map< std::string, std::unique_ptr< Node > > & bayesnet::Network::getNodes ()
-
- -

Definition at line 116 of file Network.cc.

- -
-
- -

◆ getNumEdges()

- -
-
- - - - - - - -
int bayesnet::Network::getNumEdges () const
-
- -

Definition at line 383 of file Network.cc.

- -
-
- -

◆ getSamples()

- -
-
- - - - - - - -
torch::Tensor & bayesnet::Network::getSamples ()
-
- -

Definition at line 42 of file Network.cc.

- -
-
- -

◆ getStates()

- -
-
- - - - - - - -
int bayesnet::Network::getStates () const
-
- -

Definition at line 67 of file Network.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - - - -
std::vector< std::string > bayesnet::Network::graph (const std::string & title) const
-
- -

Definition at line 357 of file Network.cc.

- -
-
- -

◆ initialize()

- -
-
- - - - - - - -
void bayesnet::Network::initialize ()
-
- -

Definition at line 29 of file Network.cc.

- -
-
- -

◆ predict() [1/2]

- -
-
- - - - - - - -
std::vector< int > bayesnet::Network::predict (const std::vector< std::vector< int > > & tsamples)
-
- -

Definition at line 237 of file Network.cc.

- -
-
- -

◆ predict() [2/2]

- -
-
- - - - - - - -
torch::Tensor bayesnet::Network::predict (const torch::Tensor & samples)
-
- -

Definition at line 230 of file Network.cc.

- -
-
- -

◆ predict_proba() [1/2]

- -
-
- - - - - - - -
std::vector< std::vector< double > > bayesnet::Network::predict_proba (const std::vector< std::vector< int > > & tsamples)
-
- -

Definition at line 259 of file Network.cc.

- -
-
- -

◆ predict_proba() [2/2]

- -
-
- - - - - - - -
torch::Tensor bayesnet::Network::predict_proba (const torch::Tensor & samples)
-
- -

Definition at line 224 of file Network.cc.

- -
-
- -

◆ predict_tensor()

- -
-
- - - - - - - - - - - -
torch::Tensor bayesnet::Network::predict_tensor (const torch::Tensor & samples,
const bool proba )
-
- -

Definition at line 205 of file Network.cc.

- -
-
- -

◆ score()

- -
-
- - - - - - - - - - - -
double bayesnet::Network::score (const std::vector< std::vector< int > > & tsamples,
const std::vector< int > & labels )
-
- -

Definition at line 275 of file Network.cc.

- -
-
- -

◆ show()

- -
-
- - - - - - - -
std::vector< std::string > bayesnet::Network::show () const
-
- -

Definition at line 344 of file Network.cc.

- -
-
- -

◆ topological_sort()

- -
-
- - - - - - - -
std::vector< std::string > bayesnet::Network::topological_sort ()
-
- -

Definition at line 387 of file Network.cc.

- -
-
- -

◆ version()

- -
-
- - - - - -
- - - - - - - -
std::string bayesnet::Network::version ()
-
-inline
-
- -

Definition at line 49 of file Network.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/network/Network.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/network/Network.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_node-members.html b/docs/manual/classbayesnet_1_1_node-members.html deleted file mode 100644 index e8f9f24..0000000 --- a/docs/manual/classbayesnet_1_1_node-members.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Node Member List
-
-
- -

This is the complete list of members for bayesnet::Node, including all inherited members.

- - - - - - - - - - - - - - - - - -
addChild(Node *) (defined in bayesnet::Node)bayesnet::Node
addParent(Node *) (defined in bayesnet::Node)bayesnet::Node
clear() (defined in bayesnet::Node)bayesnet::Node
computeCPT(const torch::Tensor &dataset, const std::vector< std::string > &features, const double laplaceSmoothing, const torch::Tensor &weights) (defined in bayesnet::Node)bayesnet::Node
getChildren() (defined in bayesnet::Node)bayesnet::Node
getCPT() (defined in bayesnet::Node)bayesnet::Node
getFactorValue(std::map< std::string, int > &) (defined in bayesnet::Node)bayesnet::Node
getName() const (defined in bayesnet::Node)bayesnet::Node
getNumStates() const (defined in bayesnet::Node)bayesnet::Node
getParents() (defined in bayesnet::Node)bayesnet::Node
graph(const std::string &clasName) (defined in bayesnet::Node)bayesnet::Node
minFill() (defined in bayesnet::Node)bayesnet::Node
Node(const std::string &) (defined in bayesnet::Node)bayesnet::Nodeexplicit
removeChild(Node *) (defined in bayesnet::Node)bayesnet::Node
removeParent(Node *) (defined in bayesnet::Node)bayesnet::Node
setNumStates(int) (defined in bayesnet::Node)bayesnet::Node
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_node.html b/docs/manual/classbayesnet_1_1_node.html deleted file mode 100644 index 2b9c143..0000000 --- a/docs/manual/classbayesnet_1_1_node.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Node Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
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
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_proposal-members.html b/docs/manual/classbayesnet_1_1_proposal-members.html deleted file mode 100644 index 57aca7a..0000000 --- a/docs/manual/classbayesnet_1_1_proposal-members.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::Proposal Member List
-
-
- -

This is the complete list of members for bayesnet::Proposal, including all inherited members.

- - - - - - - - - - -
checkInput(const torch::Tensor &X, const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
discretizers (defined in bayesnet::Proposal)bayesnet::Proposalprotected
fit_local_discretization(const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
localDiscretizationProposal(const map< std::string, std::vector< int > > &states, Network &model) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
prepareX(torch::Tensor &X) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Proposal(torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_) (defined in bayesnet::Proposal)bayesnet::Proposal
Xf (defined in bayesnet::Proposal)bayesnet::Proposalprotected
y (defined in bayesnet::Proposal)bayesnet::Proposalprotected
~Proposal() (defined in bayesnet::Proposal)bayesnet::Proposalvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_proposal.html b/docs/manual/classbayesnet_1_1_proposal.html deleted file mode 100644 index 0003bbe..0000000 --- a/docs/manual/classbayesnet_1_1_proposal.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - -BayesNet: bayesnet::Proposal Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-Inheritance diagram for bayesnet::Proposal:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
- - - - -

-Public Member Functions

 Proposal (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)
 
- - - - - - - - - -

-Protected Member Functions

void checkInput (const torch::Tensor &X, const torch::Tensor &y)
 
torch::Tensor prepareX (torch::Tensor &X)
 
map< std::string, std::vector< int > > localDiscretizationProposal (const map< std::string, std::vector< int > > &states, Network &model)
 
map< std::string, std::vector< int > > fit_local_discretization (const torch::Tensor &y)
 
- - - - - - - -

-Protected Attributes

torch::Tensor Xf
 
torch::Tensor y
 
map< std::string, mdlp::CPPFImdlp * > discretizers
 
-

Detailed Description

-
-

Definition at line 17 of file Proposal.h.

-

Constructor & Destructor Documentation

- -

◆ Proposal()

- -
-
- - - - - - - - - - - - - - - - -
bayesnet::Proposal::Proposal (torch::Tensor & pDataset,
std::vector< std::string > & features_,
std::string & className_ )
-
- -

Definition at line 10 of file Proposal.cc.

- -
-
- -

◆ ~Proposal()

- -
-
- - - - - -
- - - - - - - -
bayesnet::Proposal::~Proposal ()
-
-virtual
-
- -

Definition at line 11 of file Proposal.cc.

- -
-
-

Member Function Documentation

- -

◆ checkInput()

- -
-
- - - - - -
- - - - - - - - - - - -
void bayesnet::Proposal::checkInput (const torch::Tensor & X,
const torch::Tensor & y )
-
-protected
-
- -

Definition at line 17 of file Proposal.cc.

- -
-
- -

◆ fit_local_discretization()

- -
-
- - - - - -
- - - - - - - -
map< std::string, std::vector< int > > bayesnet::Proposal::fit_local_discretization (const torch::Tensor & y)
-
-protected
-
- -

Definition at line 77 of file Proposal.cc.

- -
-
- -

◆ localDiscretizationProposal()

- -
-
- - - - - -
- - - - - - - - - - - -
map< std::string, std::vector< int > > bayesnet::Proposal::localDiscretizationProposal (const map< std::string, std::vector< int > > & states,
Network & model )
-
-protected
-
- -

Definition at line 26 of file Proposal.cc.

- -
-
- -

◆ prepareX()

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::Proposal::prepareX (torch::Tensor & X)
-
-protected
-
- -

Definition at line 104 of file Proposal.cc.

- -
-
-

Member Data Documentation

- -

◆ discretizers

- -
-
- - - - - -
- - - - -
map<std::string, mdlp::CPPFImdlp*> bayesnet::Proposal::discretizers
-
-protected
-
- -

Definition at line 28 of file Proposal.h.

- -
-
- -

◆ Xf

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Proposal::Xf
-
-protected
-
- -

Definition at line 26 of file Proposal.h.

- -
-
- -

◆ y

- -
-
- - - - - -
- - - - -
torch::Tensor bayesnet::Proposal::y
-
-protected
-
- -

Definition at line 27 of file Proposal.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Proposal.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/Proposal.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.map b/docs/manual/classbayesnet_1_1_proposal__inherit__graph.map deleted file mode 100644 index 36e081a..0000000 --- a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_proposal__inherit__graph.md5 deleted file mode 100644 index 5104bf9..0000000 --- a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -ebc49cb39da6e0edf6f34e086690a717 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.png b/docs/manual/classbayesnet_1_1_proposal__inherit__graph.png deleted file mode 100644 index 58d8a63..0000000 Binary files a/docs/manual/classbayesnet_1_1_proposal__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e-members.html b/docs/manual/classbayesnet_1_1_s_p_o_d_e-members.html deleted file mode 100644 index a37fb96..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e-members.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::SPODE Member List
-
-
- -

This is the complete list of members for bayesnet::SPODE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::SPODE)bayesnet::SPODEprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="SPODE") const override (defined in bayesnet::SPODE)bayesnet::SPODEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
SPODE(int root) (defined in bayesnet::SPODE)bayesnet::SPODEexplicit
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~SPODE()=default (defined in bayesnet::SPODE)bayesnet::SPODEvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e.html b/docs/manual/classbayesnet_1_1_s_p_o_d_e.html deleted file mode 100644 index aa7f1e4..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - -BayesNet: bayesnet::SPODE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::SPODE Class Reference
-
-
-
-Inheritance diagram for bayesnet::SPODE:
-
-
Inheritance graph
- - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::SPODE:
-
-
Collaboration graph
- - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SPODE (int root)
 
std::vector< std::string > graph (const std::string &name="SPODE") const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 12 of file SPODE.h.

-

Constructor & Destructor Documentation

- -

◆ SPODE()

- -
-
- - - - - -
- - - - - - - -
bayesnet::SPODE::SPODE (int root)
-
-explicit
-
- -

Definition at line 11 of file SPODE.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::SPODE::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 13 of file SPODE.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::SPODE::graph (const std::string & name = "SPODE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 26 of file SPODE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.map deleted file mode 100644 index 136e08b..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.md5 deleted file mode 100644 index 3e45214..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -a7ba010489f508859de8b2a34852703b \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.png deleted file mode 100644 index 72bb157..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_p_o_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.map deleted file mode 100644 index 94db074..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.md5 deleted file mode 100644 index 7d139bf..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -660b58c59a98cc1f67bff80bae3c1de8 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.png deleted file mode 100644 index 16e3eb5..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_p_o_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld-members.html b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld-members.html deleted file mode 100644 index 6e68e07..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld-members.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::SPODELd Member List
-
-
- -

This is the complete list of members for bayesnet::SPODELd, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::SPODE)bayesnet::SPODEprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
checkInput(const torch::Tensor &X, const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
commonFit(const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) (defined in bayesnet::SPODELd)bayesnet::SPODELd
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
discretizers (defined in bayesnet::Proposal)bayesnet::Proposalprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override (defined in bayesnet::SPODELd)bayesnet::SPODELd
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override (defined in bayesnet::SPODELd)bayesnet::SPODELd
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit_local_discretization(const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="SPODE") const override (defined in bayesnet::SPODELd)bayesnet::SPODELdvirtual
localDiscretizationProposal(const map< std::string, std::vector< int > > &states, Network &model) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::SPODELd)bayesnet::SPODELdvirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
prepareX(torch::Tensor &X) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Proposal(torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_) (defined in bayesnet::Proposal)bayesnet::Proposal
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
SPODE(int root) (defined in bayesnet::SPODE)bayesnet::SPODEexplicit
SPODELd(int root) (defined in bayesnet::SPODELd)bayesnet::SPODELdexplicit
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
version() (defined in bayesnet::SPODELd)bayesnet::SPODELdinlinestatic
Xf (defined in bayesnet::Proposal)bayesnet::Proposalprotected
y (defined in bayesnet::Proposal)bayesnet::Proposalprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Proposal() (defined in bayesnet::Proposal)bayesnet::Proposalvirtual
~SPODE()=default (defined in bayesnet::SPODE)bayesnet::SPODEvirtual
~SPODELd()=default (defined in bayesnet::SPODELd)bayesnet::SPODELdvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld.html b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld.html deleted file mode 100644 index a087449..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - -BayesNet: bayesnet::SPODELd Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::SPODELd Class Reference
-
-
-
-Inheritance diagram for bayesnet::SPODELd:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::SPODELd:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SPODELd (int root)
 
SPODELdfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override
 
SPODELdfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override
 
SPODELdcommonFit (const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states)
 
std::vector< std::string > graph (const std::string &name="SPODE") const override
 
torch::Tensor predict (torch::Tensor &X) override
 
- Public Member Functions inherited from bayesnet::SPODE
 SPODE (int root)
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- Public Member Functions inherited from bayesnet::Proposal
 Proposal (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)
 
- - - -

-Static Public Member Functions

static std::string version ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Member Functions inherited from bayesnet::SPODE
void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- Protected Member Functions inherited from bayesnet::Proposal
void checkInput (const torch::Tensor &X, const torch::Tensor &y)
 
torch::Tensor prepareX (torch::Tensor &X)
 
map< std::string, std::vector< int > > localDiscretizationProposal (const map< std::string, std::vector< int > > &states, Network &model)
 
map< std::string, std::vector< int > > fit_local_discretization (const torch::Tensor &y)
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
- Protected Attributes inherited from bayesnet::Proposal
torch::Tensor Xf
 
torch::Tensor y
 
map< std::string, mdlp::CPPFImdlp * > discretizers
 
-

Detailed Description

-
-

Definition at line 13 of file SPODELd.h.

-

Constructor & Destructor Documentation

- -

◆ SPODELd()

- -
-
- - - - - -
- - - - - - - -
bayesnet::SPODELd::SPODELd (int root)
-
-explicit
-
- -

Definition at line 10 of file SPODELd.cc.

- -
-
-

Member Function Documentation

- -

◆ commonFit()

- -
-
- - - - - - - - - - - - - - - - -
SPODELd & bayesnet::SPODELd::commonFit (const std::vector< std::string > & features,
const std::string & className,
map< std::string, std::vector< int > > & states )
-
- -

Definition at line 29 of file SPODELd.cc.

- -
-
- -

◆ fit() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
SPODELd & bayesnet::SPODELd::fit (torch::Tensor & dataset,
const std::vector< std::string > & features,
const std::string & className,
map< std::string, std::vector< int > > & states )
-
-override
-
- -

Definition at line 19 of file SPODELd.cc.

- -
-
- -

◆ fit() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
SPODELd & bayesnet::SPODELd::fit (torch::Tensor & X,
torch::Tensor & y,
const std::vector< std::string > & features,
const std::string & className,
map< std::string, std::vector< int > > & states )
-
-override
-
- -

Definition at line 11 of file SPODELd.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::SPODELd::graph (const std::string & name = "SPODE") const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::SPODE.

- -

Definition at line 46 of file SPODELd.cc.

- -
-
- -

◆ predict()

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::SPODELd::predict (torch::Tensor & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 41 of file SPODELd.cc.

- -
-
- -

◆ version()

- -
-
- - - - - -
- - - - - - - -
static std::string bayesnet::SPODELd::version ()
-
-inlinestatic
-
- -

Definition at line 22 of file SPODELd.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODELd.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPODELd.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.map b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.map deleted file mode 100644 index 9ca9e5f..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.md5 b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.md5 deleted file mode 100644 index a37512c..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -53a8a1ce38ea1de9807975652116ea2e \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.png b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.png deleted file mode 100644 index 4de1b0f..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.map b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.map deleted file mode 100644 index cdd3362..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.md5 deleted file mode 100644 index a8f9b26..0000000 --- a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -c2a8d41159422d470d0010f0fdadea9c \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.png b/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.png deleted file mode 100644 index 4949d44..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_p_o_d_e_ld__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e-members.html b/docs/manual/classbayesnet_1_1_s_pn_d_e-members.html deleted file mode 100644 index a44a2c8..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e-members.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::SPnDE Member List
-
-
- -

This is the complete list of members for bayesnet::SPnDE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::SPnDE)bayesnet::SPnDEprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="SPnDE") const override (defined in bayesnet::SPnDE)bayesnet::SPnDEvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
SPnDE(std::vector< int > parents) (defined in bayesnet::SPnDE)bayesnet::SPnDEexplicit
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~SPnDE()=default (defined in bayesnet::SPnDE)bayesnet::SPnDEvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e.html b/docs/manual/classbayesnet_1_1_s_pn_d_e.html deleted file mode 100644 index a6f9ef0..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - -BayesNet: bayesnet::SPnDE Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::SPnDE Class Reference
-
-
-
-Inheritance diagram for bayesnet::SPnDE:
-
-
Inheritance graph
- - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::SPnDE:
-
-
Collaboration graph
- - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SPnDE (std::vector< int > parents)
 
std::vector< std::string > graph (const std::string &name="SPnDE") const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 13 of file SPnDE.h.

-

Constructor & Destructor Documentation

- -

◆ SPnDE()

- -
-
- - - - - -
- - - - - - - -
bayesnet::SPnDE::SPnDE (std::vector< int > parents)
-
-explicit
-
- -

Definition at line 11 of file SPnDE.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::SPnDE::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 13 of file SPnDE.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::SPnDE::graph (const std::string & name = "SPnDE") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 33 of file SPnDE.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPnDE.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/SPnDE.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.map b/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.map deleted file mode 100644 index b7ecb8a..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.md5 b/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.md5 deleted file mode 100644 index f1c4d74..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -7823db61a54dfd03f5143e755580cf6b \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.png b/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.png deleted file mode 100644 index dd12c33..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_pn_d_e__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.map b/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.map deleted file mode 100644 index dbf5b3a..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.md5 deleted file mode 100644 index fa18236..0000000 --- a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e4818c342999832413f96ae3dcaa8265 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.png b/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.png deleted file mode 100644 index 3c32bb1..0000000 Binary files a/docs/manual/classbayesnet_1_1_s_pn_d_e__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_t_a_n-members.html b/docs/manual/classbayesnet_1_1_t_a_n-members.html deleted file mode 100644 index 62e924e..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n-members.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::TAN Member List
-
-
- -

This is the complete list of members for bayesnet::TAN, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::TAN)bayesnet::TANprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="TAN") const override (defined in bayesnet::TAN)bayesnet::TANvirtual
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
TAN() (defined in bayesnet::TAN)bayesnet::TAN
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~TAN()=default (defined in bayesnet::TAN)bayesnet::TANvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n.html b/docs/manual/classbayesnet_1_1_t_a_n.html deleted file mode 100644 index 3fc7816..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - -BayesNet: bayesnet::TAN Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::TAN Class Reference
-
-
-
-Inheritance diagram for bayesnet::TAN:
-
-
Inheritance graph
- - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::TAN:
-
-
Collaboration graph
- - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

std::vector< std::string > graph (const std::string &name="TAN") const override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
torch::Tensor predict (torch::Tensor &X) override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- - - - - - - - - - -

-Protected Member Functions

void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
-

Detailed Description

-
-

Definition at line 11 of file TAN.h.

-

Constructor & Destructor Documentation

- -

◆ TAN()

- -
-
- - - - - - - -
bayesnet::TAN::TAN ()
-
- -

Definition at line 10 of file TAN.cc.

- -
-
-

Member Function Documentation

- -

◆ buildModel()

- -
-
- - - - - -
- - - - - - - -
void bayesnet::TAN::buildModel (const torch::Tensor & weights)
-
-overrideprotectedvirtual
-
- -

Implements bayesnet::Classifier.

- -

Definition at line 12 of file TAN.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::TAN::graph (const std::string & name = "TAN") const
-
-overridevirtual
-
- -

Implements bayesnet::BaseClassifier.

- -

Definition at line 41 of file TAN.cc.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TAN.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TAN.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.map b/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.map deleted file mode 100644 index 0684efa..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.md5 b/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.md5 deleted file mode 100644 index 4c81c1b..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -c02f97b240585f440b3a51e1b4f83e2c \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.png b/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.png deleted file mode 100644 index da93f4c..0000000 Binary files a/docs/manual/classbayesnet_1_1_t_a_n__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.map b/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.map deleted file mode 100644 index 93ace0b..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.map +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.md5 deleted file mode 100644 index 05ec32e..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -056d4ba29c060a1c0448fe1ba10ac890 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.png b/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.png deleted file mode 100644 index bced2e0..0000000 Binary files a/docs/manual/classbayesnet_1_1_t_a_n__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld-members.html b/docs/manual/classbayesnet_1_1_t_a_n_ld-members.html deleted file mode 100644 index 6b481dc..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld-members.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -BayesNet: Member List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet::TANLd Member List
-
-
- -

This is the complete list of members for bayesnet::TANLd, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addNodes() (defined in bayesnet::Classifier)bayesnet::Classifier
buildDataset(torch::Tensor &y) (defined in bayesnet::Classifier)bayesnet::Classifierprotected
buildModel(const torch::Tensor &weights) override (defined in bayesnet::TAN)bayesnet::TANprotectedvirtual
checkFitParameters() (defined in bayesnet::Classifier)bayesnet::Classifierprotected
checkInput(const torch::Tensor &X, const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Classifier(Network model) (defined in bayesnet::Classifier)bayesnet::Classifier
className (defined in bayesnet::Classifier)bayesnet::Classifierprotected
dataset (defined in bayesnet::Classifier)bayesnet::Classifierprotected
discretizers (defined in bayesnet::Proposal)bayesnet::Proposalprotected
dump_cpt() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
features (defined in bayesnet::Classifier)bayesnet::Classifierprotected
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override (defined in bayesnet::TANLd)bayesnet::TANLd
fit(std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit(torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
fit_local_discretization(const torch::Tensor &y) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
fitted (defined in bayesnet::Classifier)bayesnet::Classifierprotected
getClassNumStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNotes() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getNumberOfEdges() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfNodes() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getNumberOfStates() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
getStatus() const override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
getValidHyperparameters() (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierinline
getVersion() override (defined in bayesnet::Classifier)bayesnet::Classifierinlinevirtual
graph(const std::string &name="TAN") const override (defined in bayesnet::TANLd)bayesnet::TANLdvirtual
localDiscretizationProposal(const map< std::string, std::vector< int > > &states, Network &model) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
m (defined in bayesnet::Classifier)bayesnet::Classifierprotected
metrics (defined in bayesnet::Classifier)bayesnet::Classifierprotected
model (defined in bayesnet::Classifier)bayesnet::Classifierprotected
n (defined in bayesnet::Classifier)bayesnet::Classifierprotected
notes (defined in bayesnet::Classifier)bayesnet::Classifierprotected
predict(torch::Tensor &X) override (defined in bayesnet::TANLd)bayesnet::TANLdvirtual
predict(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(torch::Tensor &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
predict_proba(std::vector< std::vector< int > > &X) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
prepareX(torch::Tensor &X) (defined in bayesnet::Proposal)bayesnet::Proposalprotected
Proposal(torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_) (defined in bayesnet::Proposal)bayesnet::Proposal
score(torch::Tensor &X, torch::Tensor &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
score(std::vector< std::vector< int > > &X, std::vector< int > &y) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
setHyperparameters(const nlohmann::json &hyperparameters) override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
show() const override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
states (defined in bayesnet::Classifier)bayesnet::Classifierprotected
status (defined in bayesnet::Classifier)bayesnet::Classifierprotected
TAN() (defined in bayesnet::TAN)bayesnet::TAN
TANLd() (defined in bayesnet::TANLd)bayesnet::TANLd
topological_order() override (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
trainModel(const torch::Tensor &weights) override (defined in bayesnet::Classifier)bayesnet::Classifierprotectedvirtual
validHyperparameters (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifierprotected
version() (defined in bayesnet::TANLd)bayesnet::TANLdinlinestatic
Xf (defined in bayesnet::Proposal)bayesnet::Proposalprotected
y (defined in bayesnet::Proposal)bayesnet::Proposalprotected
~BaseClassifier()=default (defined in bayesnet::BaseClassifier)bayesnet::BaseClassifiervirtual
~Classifier()=default (defined in bayesnet::Classifier)bayesnet::Classifiervirtual
~Proposal() (defined in bayesnet::Proposal)bayesnet::Proposalvirtual
~TAN()=default (defined in bayesnet::TAN)bayesnet::TANvirtual
~TANLd()=default (defined in bayesnet::TANLd)bayesnet::TANLdvirtual
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld.html b/docs/manual/classbayesnet_1_1_t_a_n_ld.html deleted file mode 100644 index 2cbe980..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - - -BayesNet: bayesnet::TANLd Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
bayesnet::TANLd Class Reference
-
-
-
-Inheritance diagram for bayesnet::TANLd:
-
-
Inheritance graph
- - - - - - - - - - - -
[legend]
-
-Collaboration diagram for bayesnet::TANLd:
-
-
Collaboration graph
- - - - - - - - - - - - - -
[legend]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

TANLdfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, map< std::string, std::vector< int > > &states) override
 
std::vector< std::string > graph (const std::string &name="TAN") const override
 
torch::Tensor predict (torch::Tensor &X) override
 
- Public Member Functions inherited from bayesnet::Classifier
 Classifier (Network model)
 
Classifierfit (std::vector< std::vector< int > > &X, std::vector< int > &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &X, torch::Tensor &y, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states) override
 
Classifierfit (torch::Tensor &dataset, const std::vector< std::string > &features, const std::string &className, std::map< std::string, std::vector< int > > &states, const torch::Tensor &weights) override
 
void addNodes ()
 
int getNumberOfNodes () const override
 
int getNumberOfEdges () const override
 
int getNumberOfStates () const override
 
int getClassNumStates () const override
 
std::vector< int > predict (std::vector< std::vector< int > > &X) override
 
torch::Tensor predict_proba (torch::Tensor &X) override
 
std::vector< std::vector< double > > predict_proba (std::vector< std::vector< int > > &X) override
 
status_t getStatus () const override
 
std::string getVersion () override
 
float score (torch::Tensor &X, torch::Tensor &y) override
 
float score (std::vector< std::vector< int > > &X, std::vector< int > &y) override
 
std::vector< std::string > show () const override
 
std::vector< std::string > topological_order () override
 
std::vector< std::string > getNotes () const override
 
std::string dump_cpt () const override
 
void setHyperparameters (const nlohmann::json &hyperparameters) override
 
- Public Member Functions inherited from bayesnet::BaseClassifier
std::vector< std::string > & getValidHyperparameters ()
 
- Public Member Functions inherited from bayesnet::Proposal
 Proposal (torch::Tensor &pDataset, std::vector< std::string > &features_, std::string &className_)
 
- - - -

-Static Public Member Functions

static std::string version ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Member Functions inherited from bayesnet::TAN
void buildModel (const torch::Tensor &weights) override
 
- Protected Member Functions inherited from bayesnet::Classifier
void checkFitParameters ()
 
void trainModel (const torch::Tensor &weights) override
 
void buildDataset (torch::Tensor &y)
 
- Protected Member Functions inherited from bayesnet::Proposal
void checkInput (const torch::Tensor &X, const torch::Tensor &y)
 
torch::Tensor prepareX (torch::Tensor &X)
 
map< std::string, std::vector< int > > localDiscretizationProposal (const map< std::string, std::vector< int > > &states, Network &model)
 
map< std::string, std::vector< int > > fit_local_discretization (const torch::Tensor &y)
 
- Protected Attributes inherited from bayesnet::Classifier
bool fitted
 
unsigned int m
 
unsigned int n
 
Network model
 
Metrics metrics
 
std::vector< std::string > features
 
std::string className
 
std::map< std::string, std::vector< int > > states
 
torch::Tensor dataset
 
status_t status = NORMAL
 
std::vector< std::string > notes
 
- Protected Attributes inherited from bayesnet::BaseClassifier
std::vector< std::string > validHyperparameters
 
- Protected Attributes inherited from bayesnet::Proposal
torch::Tensor Xf
 
torch::Tensor y
 
map< std::string, mdlp::CPPFImdlp * > discretizers
 
-

Detailed Description

-
-

Definition at line 13 of file TANLd.h.

-

Constructor & Destructor Documentation

- -

◆ TANLd()

- -
-
- - - - - - - -
bayesnet::TANLd::TANLd ()
-
- -

Definition at line 10 of file TANLd.cc.

- -
-
-

Member Function Documentation

- -

◆ fit()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
TANLd & bayesnet::TANLd::fit (torch::Tensor & X,
torch::Tensor & y,
const std::vector< std::string > & features,
const std::string & className,
map< std::string, std::vector< int > > & states )
-
-override
-
- -

Definition at line 11 of file TANLd.cc.

- -
-
- -

◆ graph()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::string > bayesnet::TANLd::graph (const std::string & name = "TAN") const
-
-overridevirtual
-
- -

Reimplemented from bayesnet::TAN.

- -

Definition at line 32 of file TANLd.cc.

- -
-
- -

◆ predict()

- -
-
- - - - - -
- - - - - - - -
torch::Tensor bayesnet::TANLd::predict (torch::Tensor & X)
-
-overridevirtual
-
- -

Reimplemented from bayesnet::Classifier.

- -

Definition at line 27 of file TANLd.cc.

- -
-
- -

◆ version()

- -
-
- - - - - -
- - - - - - - -
static std::string bayesnet::TANLd::version ()
-
-inlinestatic
-
- -

Definition at line 21 of file TANLd.h.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TANLd.h
  • -
  • /Users/rmontanana/Code/BayesNet/bayesnet/classifiers/TANLd.cc
  • -
-
-
- - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.map b/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.map deleted file mode 100644 index 4d2ffb3..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.map +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.md5 b/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.md5 deleted file mode 100644 index 3e810b3..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -52efa3ac9345f1a4c851d818a575585f \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.png b/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.png deleted file mode 100644 index 86f2375..0000000 Binary files a/docs/manual/classbayesnet_1_1_t_a_n_ld__coll__graph.png and /dev/null differ diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.map b/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.map deleted file mode 100644 index d6dbfac..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.map +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.md5 b/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.md5 deleted file mode 100644 index f98e719..0000000 --- a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -acb57f33de9f26c8371c599af6ced955 \ No newline at end of file diff --git a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.png b/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.png deleted file mode 100644 index 6a30308..0000000 Binary files a/docs/manual/classbayesnet_1_1_t_a_n_ld__inherit__graph.png and /dev/null differ diff --git a/docs/manual/classes.html b/docs/manual/classes.html deleted file mode 100644 index 10facbc..0000000 --- a/docs/manual/classes.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -BayesNet: Class Index - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class Index
-
-
-
A | B | C | E | K | N | P | S | T
-
-
-
A
-
A2DE (bayesnet)
AODE (bayesnet)
AODELd (bayesnet)
-
-
B
-
BaseClassifier (bayesnet)
Boost (bayesnet)
BoostA2DE (bayesnet)
BoostAODE (bayesnet)
-
-
C
-
Classifier (bayesnet)
-
-
E
-
Ensemble (bayesnet)
-
-
K
-
KDB (bayesnet)
KDBLd (bayesnet)
-
-
N
-
Network (bayesnet)
Node (bayesnet)
-
-
P
-
Proposal (bayesnet)
-
-
S
-
SPnDE (bayesnet)
SPODE (bayesnet)
SPODELd (bayesnet)
-
-
T
-
TAN (bayesnet)
TANLd (bayesnet)
-
-
-
- - - - diff --git a/docs/manual/clipboard.js b/docs/manual/clipboard.js deleted file mode 100644 index 42c1fb0..0000000 --- a/docs/manual/clipboard.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - -The code below is based on the Doxygen Awesome project, see -https://github.com/jothepro/doxygen-awesome-css - -MIT License - -Copyright (c) 2021 - 2022 jothepro - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -*/ - -let clipboard_title = "Copy to clipboard" -let clipboard_icon = `` -let clipboard_successIcon = `` -let clipboard_successDuration = 1000 - -$(function() { - if(navigator.clipboard) { - const fragments = document.getElementsByClassName("fragment") - for(const fragment of fragments) { - const clipboard_div = document.createElement("div") - clipboard_div.classList.add("clipboard") - clipboard_div.innerHTML = clipboard_icon - clipboard_div.title = clipboard_title - $(clipboard_div).click(function() { - const content = this.parentNode.cloneNode(true) - // filter out line number and folded fragments from file listings - content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) - let text = content.textContent - // remove trailing newlines and trailing spaces from empty lines - text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') - navigator.clipboard.writeText(text); - this.classList.add("success") - this.innerHTML = clipboard_successIcon - window.setTimeout(() => { // switch back to normal icon after timeout - this.classList.remove("success") - this.innerHTML = clipboard_icon - }, clipboard_successDuration); - }) - fragment.insertBefore(clipboard_div, fragment.firstChild) - } - } -}) diff --git a/docs/manual/closed.png b/docs/manual/closed.png deleted file mode 100644 index 98cc2c9..0000000 Binary files a/docs/manual/closed.png and /dev/null differ diff --git a/docs/manual/cookie.js b/docs/manual/cookie.js deleted file mode 100644 index 53ad21d..0000000 --- a/docs/manual/cookie.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - Cookie helper functions - Copyright (c) 2023 Dimitri van Heesch - Released under MIT license. -*/ -let Cookie = { - cookie_namespace: 'doxygen_', - - readSetting(cookie,defVal) { - if (window.chrome) { - const val = localStorage.getItem(this.cookie_namespace+cookie) || - sessionStorage.getItem(this.cookie_namespace+cookie); - if (val) return val; - } else { - let myCookie = this.cookie_namespace+cookie+"="; - if (document.cookie) { - const index = document.cookie.indexOf(myCookie); - if (index != -1) { - const valStart = index + myCookie.length; - let valEnd = document.cookie.indexOf(";", valStart); - if (valEnd == -1) { - valEnd = document.cookie.length; - } - return document.cookie.substring(valStart, valEnd); - } - } - } - return defVal; - }, - - writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete - if (window.chrome) { - if (days==0) { - sessionStorage.setItem(this.cookie_namespace+cookie,val); - } else { - localStorage.setItem(this.cookie_namespace+cookie,val); - } - } else { - let date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; - document.cookie = this.cookie_namespace + cookie + "=" + - val + "; SameSite=Lax;" + expiration + "path=/"; - } - }, - - eraseSetting(cookie) { - if (window.chrome) { - if (localStorage.getItem(this.cookie_namespace+cookie)) { - localStorage.removeItem(this.cookie_namespace+cookie); - } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { - sessionStorage.removeItem(this.cookie_namespace+cookie); - } - } else { - this.writeSetting(cookie,'',-1); - } - }, -} diff --git a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.html b/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.html deleted file mode 100644 index 9824342..0000000 --- a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/ensembles Directory Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
ensembles Directory Reference
-
-
-
-Directory dependency graph for ensembles:
-
-
/Users/rmontanana/Code/BayesNet/bayesnet/ensembles
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Files

 A2DE.cc
 
 A2DE.h
 
 AODE.cc
 
 AODE.h
 
 AODELd.cc
 
 AODELd.h
 
 Boost.cc
 
 Boost.h
 
 BoostA2DE.cc
 
 BoostA2DE.h
 
 BoostAODE.cc
 
 BoostAODE.h
 
 Ensemble.cc
 
 Ensemble.h
 
-
-
- - - - diff --git a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.js b/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.js deleted file mode 100644 index d44bdc7..0000000 --- a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741.js +++ /dev/null @@ -1,17 +0,0 @@ -var dir_2f68445c4ac4316280c650d0a13b2741 = -[ - [ "A2DE.cc", "_a2_d_e_8cc_source.html", null ], - [ "A2DE.h", "_a2_d_e_8h_source.html", null ], - [ "AODE.cc", "_a_o_d_e_8cc_source.html", null ], - [ "AODE.h", "_a_o_d_e_8h_source.html", null ], - [ "AODELd.cc", "_a_o_d_e_ld_8cc_source.html", null ], - [ "AODELd.h", "_a_o_d_e_ld_8h_source.html", null ], - [ "Boost.cc", "_boost_8cc_source.html", null ], - [ "Boost.h", "_boost_8h_source.html", null ], - [ "BoostA2DE.cc", "_boost_a2_d_e_8cc_source.html", null ], - [ "BoostA2DE.h", "_boost_a2_d_e_8h_source.html", null ], - [ "BoostAODE.cc", "_boost_a_o_d_e_8cc_source.html", null ], - [ "BoostAODE.h", "_boost_a_o_d_e_8h_source.html", null ], - [ "Ensemble.cc", "_ensemble_8cc_source.html", null ], - [ "Ensemble.h", "_ensemble_8h_source.html", null ] -]; \ No newline at end of file diff --git a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.map b/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.map deleted file mode 100644 index b78928c..0000000 --- a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.md5 b/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.md5 deleted file mode 100644 index 8dd543c..0000000 --- a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.md5 +++ /dev/null @@ -1 +0,0 @@ -6cc09d9126554d4a21b3538ccfb3d762 \ No newline at end of file diff --git a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.png b/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.png deleted file mode 100644 index 8f3e643..0000000 Binary files a/docs/manual/dir_2f68445c4ac4316280c650d0a13b2741_dep.png and /dev/null differ diff --git a/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.html b/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.html deleted file mode 100644 index be6d54d..0000000 --- a/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet Directory Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
bayesnet Directory Reference
-
-
- - - - - - - - -

-Directories

 classifiers
 
 ensembles
 
 network
 
- - - -

-Files

 BaseClassifier.h
 
-
-
- - - - diff --git a/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.js b/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.js deleted file mode 100644 index 4a6e185..0000000 --- a/docs/manual/dir_40070fdff85d618b4d1d3ab4ac4f79bb.js +++ /dev/null @@ -1,7 +0,0 @@ -var dir_40070fdff85d618b4d1d3ab4ac4f79bb = -[ - [ "classifiers", "dir_520a649ed2b1c3b658a695aeefe46a5a.html", "dir_520a649ed2b1c3b658a695aeefe46a5a" ], - [ "ensembles", "dir_2f68445c4ac4316280c650d0a13b2741.html", "dir_2f68445c4ac4316280c650d0a13b2741" ], - [ "network", "dir_efcd97b18bba957e8e278307db4f845a.html", "dir_efcd97b18bba957e8e278307db4f845a" ], - [ "BaseClassifier.h", "_base_classifier_8h_source.html", null ] -]; \ No newline at end of file diff --git a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.html b/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.html deleted file mode 100644 index 65dc0cf..0000000 --- a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/classifiers Directory Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
classifiers Directory Reference
-
-
-
-Directory dependency graph for classifiers:
-
-
/Users/rmontanana/Code/BayesNet/bayesnet/classifiers
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Files

 Classifier.cc
 
 Classifier.h
 
 KDB.cc
 
 KDB.h
 
 KDBLd.cc
 
 KDBLd.h
 
 Proposal.cc
 
 Proposal.h
 
 SPnDE.cc
 
 SPnDE.h
 
 SPODE.cc
 
 SPODE.h
 
 SPODELd.cc
 
 SPODELd.h
 
 TAN.cc
 
 TAN.h
 
 TANLd.cc
 
 TANLd.h
 
-
-
- - - - diff --git a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.js b/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.js deleted file mode 100644 index 9cdb471..0000000 --- a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a.js +++ /dev/null @@ -1,21 +0,0 @@ -var dir_520a649ed2b1c3b658a695aeefe46a5a = -[ - [ "Classifier.cc", "_classifier_8cc_source.html", null ], - [ "Classifier.h", "_classifier_8h_source.html", null ], - [ "KDB.cc", "_k_d_b_8cc_source.html", null ], - [ "KDB.h", "_k_d_b_8h_source.html", null ], - [ "KDBLd.cc", "_k_d_b_ld_8cc_source.html", null ], - [ "KDBLd.h", "_k_d_b_ld_8h_source.html", null ], - [ "Proposal.cc", "_proposal_8cc_source.html", null ], - [ "Proposal.h", "_proposal_8h_source.html", null ], - [ "SPnDE.cc", "_s_pn_d_e_8cc_source.html", null ], - [ "SPnDE.h", "_s_pn_d_e_8h_source.html", null ], - [ "SPODE.cc", "_s_p_o_d_e_8cc_source.html", null ], - [ "SPODE.h", "_s_p_o_d_e_8h_source.html", null ], - [ "SPODELd.cc", "_s_p_o_d_e_ld_8cc_source.html", null ], - [ "SPODELd.h", "_s_p_o_d_e_ld_8h_source.html", null ], - [ "TAN.cc", "_t_a_n_8cc_source.html", null ], - [ "TAN.h", "_t_a_n_8h_source.html", null ], - [ "TANLd.cc", "_t_a_n_ld_8cc_source.html", null ], - [ "TANLd.h", "_t_a_n_ld_8h_source.html", null ] -]; \ No newline at end of file diff --git a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.map b/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.map deleted file mode 100644 index 1ebf8c8..0000000 --- a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.md5 b/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.md5 deleted file mode 100644 index 0c97c91..0000000 --- a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.md5 +++ /dev/null @@ -1 +0,0 @@ -ddf4d873601a2bc95e40d58d84328f38 \ No newline at end of file diff --git a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.png b/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.png deleted file mode 100644 index b3bde0e..0000000 Binary files a/docs/manual/dir_520a649ed2b1c3b658a695aeefe46a5a_dep.png and /dev/null differ diff --git a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.html b/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.html deleted file mode 100644 index 78d5ffc..0000000 --- a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - -BayesNet: /Users/rmontanana/Code/BayesNet/bayesnet/network Directory Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
network Directory Reference
-
-
-
-Directory dependency graph for network:
-
-
/Users/rmontanana/Code/BayesNet/bayesnet/network
- - - - -
- - - - - - - - - - -

-Files

 Network.cc
 
 Network.h
 
 Node.cc
 
 Node.h
 
-
-
- - - - diff --git a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.js b/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.js deleted file mode 100644 index 6c973b6..0000000 --- a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a.js +++ /dev/null @@ -1,7 +0,0 @@ -var dir_efcd97b18bba957e8e278307db4f845a = -[ - [ "Network.cc", "_network_8cc_source.html", null ], - [ "Network.h", "_network_8h_source.html", null ], - [ "Node.cc", "_node_8cc_source.html", null ], - [ "Node.h", "_node_8h_source.html", null ] -]; \ No newline at end of file diff --git a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.map b/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.map deleted file mode 100644 index 203b233..0000000 --- a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.map +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.md5 b/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.md5 deleted file mode 100644 index 25c4a94..0000000 --- a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.md5 +++ /dev/null @@ -1 +0,0 @@ -12407aa49bded8b8b8761369fc40201b \ No newline at end of file diff --git a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.png b/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.png deleted file mode 100644 index c421b29..0000000 Binary files a/docs/manual/dir_efcd97b18bba957e8e278307db4f845a_dep.png and /dev/null differ diff --git a/docs/manual/doc.svg b/docs/manual/doc.svg deleted file mode 100644 index 0b928a5..0000000 --- a/docs/manual/doc.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/docd.svg b/docs/manual/docd.svg deleted file mode 100644 index ac18b27..0000000 --- a/docs/manual/docd.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/doxygen.css b/docs/manual/doxygen.css deleted file mode 100644 index 209912c..0000000 --- a/docs/manual/doxygen.css +++ /dev/null @@ -1,2244 +0,0 @@ -/* The standard CSS for doxygen 1.11.0*/ - -html { -/* page base colors */ ---page-background-color: white; ---page-foreground-color: black; ---page-link-color: #3D578C; ---page-visited-link-color: #4665A2; - -/* index */ ---index-odd-item-bg-color: #F8F9FC; ---index-even-item-bg-color: white; ---index-header-color: black; ---index-separator-color: #A0A0A0; - -/* header */ ---header-background-color: #F9FAFC; ---header-separator-color: #C4CFE5; ---header-gradient-image: url('nav_h.png'); ---group-header-separator-color: #879ECB; ---group-header-color: #354C7B; ---inherit-header-color: gray; - ---footer-foreground-color: #2A3D61; ---footer-logo-width: 104px; ---citation-label-color: #334975; ---glow-color: cyan; - ---title-background-color: white; ---title-separator-color: #5373B4; ---directory-separator-color: #9CAFD4; ---separator-color: #4A6AAA; - ---blockquote-background-color: #F7F8FB; ---blockquote-border-color: #9CAFD4; - ---scrollbar-thumb-color: #9CAFD4; ---scrollbar-background-color: #F9FAFC; - ---icon-background-color: #728DC1; ---icon-foreground-color: white; ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #F9FAFC; ---memdecl-separator-color: #DEE4F0; ---memdecl-foreground-color: #555; ---memdecl-template-color: #4665A2; - -/* detailed member list */ ---memdef-border-color: #A8B8D9; ---memdef-title-background-color: #E2E8F2; ---memdef-title-gradient-image: url('nav_f.png'); ---memdef-proto-background-color: #DFE5F1; ---memdef-proto-text-color: #253555; ---memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---memdef-doc-background-color: white; ---memdef-param-name-color: #602020; ---memdef-template-color: #4665A2; - -/* tables */ ---table-cell-border-color: #2D4068; ---table-header-background-color: #374F7F; ---table-header-foreground-color: #FFFFFF; - -/* labels */ ---label-background-color: #728DC1; ---label-left-top-border-color: #5373B4; ---label-right-bottom-border-color: #C4CFE5; ---label-foreground-color: white; - -/** navigation bar/tree/menu */ ---nav-background-color: #F9FAFC; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_b.png'); ---nav-gradient-hover-image: url('tab_h.png'); ---nav-gradient-active-image: url('tab_a.png'); ---nav-gradient-active-image-parent: url("../tab_a.png"); ---nav-separator-image: url('tab_s.png'); ---nav-breadcrumb-image: url('bc_s.png'); ---nav-breadcrumb-border-color: #C2CDE4; ---nav-splitbar-image: url('splitbar.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #283A5D; ---nav-text-hover-color: white; ---nav-text-active-color: white; ---nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #364D7C; ---nav-menu-background-color: white; ---nav-menu-foreground-color: #555555; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.5); ---nav-arrow-color: #9CAFD4; ---nav-arrow-selected-color: #9CAFD4; - -/* table of contents */ ---toc-background-color: #F4F6FA; ---toc-border-color: #D8DFEE; ---toc-header-color: #4665A2; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: white; ---search-foreground-color: #909090; ---search-magnification-image: url('mag.svg'); ---search-magnification-select-image: url('mag_sel.svg'); ---search-active-color: black; ---search-filter-background-color: #F9FAFC; ---search-filter-foreground-color: black; ---search-filter-border-color: #90A5CE; ---search-filter-highlight-text-color: white; ---search-filter-highlight-bg-color: #3D578C; ---search-results-foreground-color: #425E97; ---search-results-background-color: #EEF1F7; ---search-results-border-color: black; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #555; - -/** code fragments */ ---code-keyword-color: #008000; ---code-type-keyword-color: #604020; ---code-flow-keyword-color: #E08000; ---code-comment-color: #800000; ---code-preprocessor-color: #806020; ---code-string-literal-color: #002080; ---code-char-literal-color: #008080; ---code-xml-cdata-color: black; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #4665A2; ---code-external-link-color: #4665A2; ---fragment-foreground-color: black; ---fragment-background-color: #FBFCFD; ---fragment-border-color: #C4CFE5; ---fragment-lineno-border-color: #00FF00; ---fragment-lineno-background-color: #E8E8E8; ---fragment-lineno-foreground-color: black; ---fragment-lineno-link-fg-color: #4665A2; ---fragment-lineno-link-bg-color: #D8D8D8; ---fragment-lineno-link-hover-fg-color: #4665A2; ---fragment-lineno-link-hover-bg-color: #C8C8C8; ---fragment-copy-ok-color: #2EC82E; ---tooltip-foreground-color: black; ---tooltip-background-color: white; ---tooltip-border-color: gray; ---tooltip-doc-color: grey; ---tooltip-declaration-color: #006318; ---tooltip-link-color: #4665A2; ---tooltip-shadow: 1px 1px 7px gray; ---fold-line-color: #808080; ---fold-minus-image: url('minus.svg'); ---fold-plus-image: url('plus.svg'); ---fold-minus-image-relpath: url('../../minus.svg'); ---fold-plus-image-relpath: url('../../plus.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #f8d1cc; ---warning-color-hl: #b61825; ---warning-color-text: #75070f; ---note-color-bg: #faf3d8; ---note-color-hl: #f3a600; ---note-color-text: #5f4204; ---todo-color-bg: #e4f3ff; ---todo-color-hl: #1879C4; ---todo-color-text: #274a5c; ---test-color-bg: #e8e8ff; ---test-color-hl: #3939C4; ---test-color-text: #1a1a5c; ---deprecated-color-bg: #ecf0f3; ---deprecated-color-hl: #5b6269; ---deprecated-color-text: #43454a; ---bug-color-bg: #e4dafd; ---bug-color-hl: #5b2bdd; ---bug-color-text: #2a0d72; ---invariant-color-bg: #d8f1e3; ---invariant-color-hl: #44b86f; ---invariant-color-text: #265532; -} - -@media (prefers-color-scheme: dark) { - html:not(.dark-mode) { - color-scheme: dark; - -/* page base colors */ ---page-background-color: black; ---page-foreground-color: #C9D1D9; ---page-link-color: #90A5CE; ---page-visited-link-color: #A3B4D7; - -/* index */ ---index-odd-item-bg-color: #0B101A; ---index-even-item-bg-color: black; ---index-header-color: #C4CFE5; ---index-separator-color: #334975; - -/* header */ ---header-background-color: #070B11; ---header-separator-color: #141C2E; ---header-gradient-image: url('nav_hd.png'); ---group-header-separator-color: #283A5D; ---group-header-color: #90A5CE; ---inherit-header-color: #A0A0A0; - ---footer-foreground-color: #5B7AB7; ---footer-logo-width: 60px; ---citation-label-color: #90A5CE; ---glow-color: cyan; - ---title-background-color: #090D16; ---title-separator-color: #354C79; ---directory-separator-color: #283A5D; ---separator-color: #283A5D; - ---blockquote-background-color: #101826; ---blockquote-border-color: #283A5D; - ---scrollbar-thumb-color: #283A5D; ---scrollbar-background-color: #070B11; - ---icon-background-color: #334975; ---icon-foreground-color: #C4CFE5; ---icon-doc-image: url('docd.svg'); ---icon-folder-open-image: url('folderopend.svg'); ---icon-folder-closed-image: url('folderclosedd.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #0B101A; ---memdecl-separator-color: #2C3F65; ---memdecl-foreground-color: #BBB; ---memdecl-template-color: #7C95C6; - -/* detailed member list */ ---memdef-border-color: #233250; ---memdef-title-background-color: #1B2840; ---memdef-title-gradient-image: url('nav_fd.png'); ---memdef-proto-background-color: #19243A; ---memdef-proto-text-color: #9DB0D4; ---memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); ---memdef-doc-background-color: black; ---memdef-param-name-color: #D28757; ---memdef-template-color: #7C95C6; - -/* tables */ ---table-cell-border-color: #283A5D; ---table-header-background-color: #283A5D; ---table-header-foreground-color: #C4CFE5; - -/* labels */ ---label-background-color: #354C7B; ---label-left-top-border-color: #4665A2; ---label-right-bottom-border-color: #283A5D; ---label-foreground-color: #CCCCCC; - -/** navigation bar/tree/menu */ ---nav-background-color: #101826; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_bd.png'); ---nav-gradient-hover-image: url('tab_hd.png'); ---nav-gradient-active-image: url('tab_ad.png'); ---nav-gradient-active-image-parent: url("../tab_ad.png"); ---nav-separator-image: url('tab_sd.png'); ---nav-breadcrumb-image: url('bc_sd.png'); ---nav-breadcrumb-border-color: #2A3D61; ---nav-splitbar-image: url('splitbard.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #B6C4DF; ---nav-text-hover-color: #DCE2EF; ---nav-text-active-color: #DCE2EF; ---nav-text-normal-shadow: 0px 1px 1px black; ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #B6C4DF; ---nav-menu-background-color: #05070C; ---nav-menu-foreground-color: #BBBBBB; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.2); ---nav-arrow-color: #334975; ---nav-arrow-selected-color: #90A5CE; - -/* table of contents */ ---toc-background-color: #151E30; ---toc-border-color: #202E4A; ---toc-header-color: #A3B4D7; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: black; ---search-foreground-color: #C5C5C5; ---search-magnification-image: url('mag_d.svg'); ---search-magnification-select-image: url('mag_seld.svg'); ---search-active-color: #C5C5C5; ---search-filter-background-color: #101826; ---search-filter-foreground-color: #90A5CE; ---search-filter-border-color: #7C95C6; ---search-filter-highlight-text-color: #BCC9E2; ---search-filter-highlight-bg-color: #283A5D; ---search-results-background-color: #101826; ---search-results-foreground-color: #90A5CE; ---search-results-border-color: #7C95C6; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; - -/** code fragments */ ---code-keyword-color: #CC99CD; ---code-type-keyword-color: #AB99CD; ---code-flow-keyword-color: #E08000; ---code-comment-color: #717790; ---code-preprocessor-color: #65CABE; ---code-string-literal-color: #7EC699; ---code-char-literal-color: #00E0F0; ---code-xml-cdata-color: #C9D1D9; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #C0C0C0; ---code-vhdl-keyword-color: #CF53C9; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #79C0FF; ---code-external-link-color: #79C0FF; ---fragment-foreground-color: #C9D1D9; ---fragment-background-color: #090D16; ---fragment-border-color: #30363D; ---fragment-lineno-border-color: #30363D; ---fragment-lineno-background-color: black; ---fragment-lineno-foreground-color: #6E7681; ---fragment-lineno-link-fg-color: #6E7681; ---fragment-lineno-link-bg-color: #303030; ---fragment-lineno-link-hover-fg-color: #8E96A1; ---fragment-lineno-link-hover-bg-color: #505050; ---fragment-copy-ok-color: #0EA80E; ---tooltip-foreground-color: #C9D1D9; ---tooltip-background-color: #202020; ---tooltip-border-color: #C9D1D9; ---tooltip-doc-color: #D9E1E9; ---tooltip-declaration-color: #20C348; ---tooltip-link-color: #79C0FF; ---tooltip-shadow: none; ---fold-line-color: #808080; ---fold-minus-image: url('minusd.svg'); ---fold-plus-image: url('plusd.svg'); ---fold-minus-image-relpath: url('../../minusd.svg'); ---fold-plus-image-relpath: url('../../plusd.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #2e1917; ---warning-color-hl: #ad2617; ---warning-color-text: #f5b1aa; ---note-color-bg: #3b2e04; ---note-color-hl: #f1b602; ---note-color-text: #ceb670; ---todo-color-bg: #163750; ---todo-color-hl: #1982D2; ---todo-color-text: #dcf0fa; ---test-color-bg: #121258; ---test-color-hl: #4242cf; ---test-color-text: #c0c0da; ---deprecated-color-bg: #2e323b; ---deprecated-color-hl: #738396; ---deprecated-color-text: #abb0bd; ---bug-color-bg: #2a2536; ---bug-color-hl: #7661b3; ---bug-color-text: #ae9ed6; ---invariant-color-bg: #303a35; ---invariant-color-hl: #76ce96; ---invariant-color-text: #cceed5; -}} -body { - background-color: var(--page-background-color); - color: var(--page-foreground-color); -} - -body, table, div, p, dl { - font-weight: 400; - font-size: 14px; - font-family: var(--font-family-normal); - line-height: 22px; -} - -/* @group Heading Levels */ - -.title { - font-family: var(--font-family-normal); - line-height: 28px; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h1.groupheader { - font-size: 150%; -} - -h2.groupheader { - border-bottom: 1px solid var(--group-header-separator-color); - color: var(--group-header-color); - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px var(--glow-color); -} - -dt { - font-weight: bold; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -th p.starttd, th p.intertd, th p.endtd { - font-size: 100%; - font-weight: 700; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -p.interli { -} - -p.interdd { -} - -p.intertd { -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.navtab { - padding-right: 15px; - text-align: right; - line-height: 110%; -} - -div.navtab table { - border-spacing: 0; -} - -td.navtab { - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL { - background-image: var(--nav-gradient-active-image); - background-repeat:repeat-x; - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL a, td.navtabHL a:visited { - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -a.navtab { - font-weight: bold; -} - -div.qindex{ - text-align: center; - width: 100%; - line-height: 140%; - font-size: 130%; - color: var(--index-separator-color); -} - -#main-menu a:focus { - outline: auto; - z-index: 10; - position: relative; -} - -dt.alphachar{ - font-size: 180%; - font-weight: bold; -} - -.alphachar a{ - color: var(--index-header-color); -} - -.alphachar a:hover, .alphachar a:visited{ - text-decoration: none; -} - -.classindex dl { - padding: 25px; - column-count:1 -} - -.classindex dd { - display:inline-block; - margin-left: 50px; - width: 90%; - line-height: 1.15em; -} - -.classindex dl.even { - background-color: var(--index-even-item-bg-color); -} - -.classindex dl.odd { - background-color: var(--index-odd-item-bg-color); -} - -@media(min-width: 1120px) { - .classindex dl { - column-count:2 - } -} - -@media(min-width: 1320px) { - .classindex dl { - column-count:3 - } -} - - -/* @group Link Styling */ - -a { - color: var(--page-link-color); - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: var(--page-visited-link-color); -} - -a:hover { - text-decoration: none; - background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); -} - -a:hover > span.arrow { - text-decoration: none; - background : var(--nav-background-color); -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: var(--code-link-color); -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: var(--code-external-link-color); -} - -a.code.hl_class { /* style for links to class names in code snippets */ } -a.code.hl_struct { /* style for links to struct names in code snippets */ } -a.code.hl_union { /* style for links to union names in code snippets */ } -a.code.hl_interface { /* style for links to interface names in code snippets */ } -a.code.hl_protocol { /* style for links to protocol names in code snippets */ } -a.code.hl_category { /* style for links to category names in code snippets */ } -a.code.hl_exception { /* style for links to exception names in code snippets */ } -a.code.hl_service { /* style for links to service names in code snippets */ } -a.code.hl_singleton { /* style for links to singleton names in code snippets */ } -a.code.hl_concept { /* style for links to concept names in code snippets */ } -a.code.hl_namespace { /* style for links to namespace names in code snippets */ } -a.code.hl_package { /* style for links to package names in code snippets */ } -a.code.hl_define { /* style for links to macro names in code snippets */ } -a.code.hl_function { /* style for links to function names in code snippets */ } -a.code.hl_variable { /* style for links to variable names in code snippets */ } -a.code.hl_typedef { /* style for links to typedef names in code snippets */ } -a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } -a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } -a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } -a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } -a.code.hl_friend { /* style for links to friend names in code snippets */ } -a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } -a.code.hl_property { /* style for links to property names in code snippets */ } -a.code.hl_event { /* style for links to event names in code snippets */ } -a.code.hl_sequence { /* style for links to sequence names in code snippets */ } -a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -ul.check { - list-style:none; - text-indent: -16px; - padding-left: 38px; -} -li.unchecked:before { - content: "\2610\A0"; -} -li.checked:before { - content: "\2611\A0"; -} - -ol { - text-indent: 0px; -} - -ul { - text-indent: 0px; - overflow: visible; -} - -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; - list-style-type: none; -} - -#side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ -} - -#main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ -} - -.fragment { - text-align: left; - direction: ltr; - overflow-x: auto; - overflow-y: hidden; - position: relative; - min-height: 12px; - margin: 10px 0px; - padding: 10px 10px; - border: 1px solid var(--fragment-border-color); - border-radius: 4px; - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); -} - -pre.fragment { - word-wrap: break-word; - font-size: 10pt; - line-height: 125%; - font-family: var(--font-family-monospace); -} - -.clipboard { - width: 24px; - height: 24px; - right: 5px; - top: 5px; - opacity: 0; - position: absolute; - display: inline; - overflow: auto; - fill: var(--fragment-foreground-color); - justify-content: center; - align-items: center; - cursor: pointer; -} - -.clipboard.success { - border: 1px solid var(--fragment-foreground-color); - border-radius: 4px; -} - -.fragment:hover .clipboard, .clipboard.success { - opacity: .28; -} - -.clipboard:hover, .clipboard.success { - opacity: 1 !important; -} - -.clipboard:active:not([class~=success]) svg { - transform: scale(.91); -} - -.clipboard.success svg { - fill: var(--fragment-copy-ok-color); -} - -.clipboard.success { - border-color: var(--fragment-copy-ok-color); -} - -div.line { - font-family: var(--font-family-monospace); - font-size: 13px; - min-height: 13px; - line-height: 1.2; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: var(--glow-color); - box-shadow: 0 0 10px var(--glow-color); -} - -span.fold { - margin-left: 5px; - margin-right: 1px; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; - display: inline-block; - width: 12px; - height: 12px; - background-repeat:no-repeat; - background-position:center; -} - -span.lineno { - padding-right: 4px; - margin-right: 9px; - text-align: right; - border-right: 2px solid var(--fragment-lineno-border-color); - color: var(--fragment-lineno-foreground-color); - background-color: var(--fragment-lineno-background-color); - white-space: pre; -} -span.lineno a, span.lineno a:visited { - color: var(--fragment-lineno-link-fg-color); - background-color: var(--fragment-lineno-link-bg-color); -} - -span.lineno a:hover { - color: var(--fragment-lineno-link-hover-fg-color); - background-color: var(--fragment-lineno-link-hover-bg-color); -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - color: var(--page-foreground-color); - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -p.formulaDsp { - text-align: center; -} - -img.dark-mode-visible { - display: none; -} -img.light-mode-visible { - display: none; -} - -img.formulaInl, img.inline { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; - width: var(--footer-logo-width); -} - -.compoundTemplParams { - color: var(--memdecl-template-color); - font-size: 80%; - line-height: 120%; -} - -/* @group Code Colorization */ - -span.keyword { - color: var(--code-keyword-color); -} - -span.keywordtype { - color: var(--code-type-keyword-color); -} - -span.keywordflow { - color: var(--code-flow-keyword-color); -} - -span.comment { - color: var(--code-comment-color); -} - -span.preprocessor { - color: var(--code-preprocessor-color); -} - -span.stringliteral { - color: var(--code-string-literal-color); -} - -span.charliteral { - color: var(--code-char-literal-color); -} - -span.xmlcdata { - color: var(--code-xml-cdata-color); -} - -span.vhdldigit { - color: var(--code-vhdl-digit-color); -} - -span.vhdlchar { - color: var(--code-vhdl-char-color); -} - -span.vhdlkeyword { - color: var(--code-vhdl-keyword-color); -} - -span.vhdllogic { - color: var(--code-vhdl-logic-color); -} - -blockquote { - background-color: var(--blockquote-background-color); - border-left: 2px solid var(--blockquote-border-color); - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid var(--table-cell-border-color); -} - -th.dirtab { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid var(--separator-color); -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: var(--glow-color); - box-shadow: 0 0 15px var(--glow-color); -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: var(--memdecl-background-color); - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: var(--memdecl-foreground-color); -} - -.memSeparator { - border-bottom: 1px solid var(--memdecl-separator-color); - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight, .memTemplItemRight { - width: 100%; -} - -.memTemplParams { - color: var(--memdecl-template-color); - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: var(--memdef-title-gradient-image); - background-repeat: repeat-x; - background-color: var(--memdef-title-background-color); - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: var(--memdef-template-color); - font-weight: normal; - margin-left: 9px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px var(--glow-color); -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 0px 6px 0px; - color: var(--memdef-proto-text-color); - font-weight: bold; - text-shadow: var(--memdef-proto-text-shadow); - background-color: var(--memdef-proto-background-color); - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; -} - -.overload { - font-family: var(--font-family-monospace); - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 10px 2px 10px; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: var(--memdef-doc-background-color); - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; - padding: 0px; - padding-bottom: 1px; -} - -.paramname { - white-space: nowrap; - padding: 0px; - padding-bottom: 1px; - margin-left: 2px; -} - -.paramname em { - color: var(--memdef-param-name-color); - font-style: normal; - margin-right: 1px; -} - -.paramname .paramdefval { - font-family: var(--font-family-monospace); -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir, .tparams .paramdir { - font-family: var(--font-family-monospace); - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: var(--label-background-color); - border-top:1px solid var(--label-left-top-border-color); - border-left:1px solid var(--label-left-top-border-color); - border-right:1px solid var(--label-right-bottom-border-color); - border-bottom:1px solid var(--label-right-bottom-border-color); - text-shadow: none; - color: var(--label-foreground-color); - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid var(--directory-separator-color); - border-bottom: 1px solid var(--directory-separator-color); - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.odd { - padding-left: 6px; - background-color: var(--index-odd-item-bg-color); -} - -.directory tr.even { - padding-left: 6px; - background-color: var(--index-even-item-bg-color); -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: var(--page-link-color); -} - -.arrow { - color: var(--nav-arrow-color); - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: var(--font-family-icon); - line-height: normal; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: var(--icon-background-color); - color: var(--icon-foreground-color); - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-open-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-closed-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-doc-image); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: var(--footer-foreground-color); -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - margin-bottom: 10px; - border: 1px solid var(--memdef-border-color); - border-spacing: 0px; - border-radius: 4px; - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid var(--memdef-border-color); - border-bottom: 1px solid var(--memdef-border-color); - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid var(--memdef-border-color); -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image: var(--memdef-title-gradient-image); - background-repeat:repeat-x; - background-color: var(--memdef-title-background-color); - font-size: 90%; - color: var(--memdef-proto-text-color); - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid var(--memdef-border-color); -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: var(--nav-gradient-image); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image: var(--nav-gradient-image); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:var(--nav-text-normal-color); - border:solid 1px var(--nav-breadcrumb-border-color); - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:var(--nav-breadcrumb-image); - background-repeat:no-repeat; - background-position:right; - color: var(--nav-foreground-color); -} - -.navpath li.navelem a -{ - height:32px; - display:block; - outline: none; - color: var(--nav-text-normal-color); - font-family: var(--font-family-nav); - text-shadow: var(--nav-text-normal-shadow); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color: var(--footer-foreground-color); - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image: var(--header-gradient-image); - background-repeat:repeat-x; - background-color: var(--header-background-color); - margin: 0px; - border-bottom: 1px solid var(--header-separator-color); -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - -dl { - padding: 0 0 0 0; -} - -/* - -dl.section { - margin-left: 0px; - padding-left: 0px; -} - -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention, dl.important { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; -} - -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; -} - -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; -} - -dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; -} - -dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; -} - -*/ - -dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { - font-weight: bold !important; -} - -dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, -dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { - padding: 10px; - margin: 10px 0px; - overflow: hidden; - margin-left: 0; - border-radius: 4px; -} - -dl.section dd { - margin-bottom: 2px; -} - -dl.warning, dl.attention, dl.important { - background: var(--warning-color-bg); - border-left: 8px solid var(--warning-color-hl); - color: var(--warning-color-text); -} - -dl.warning dt, dl.attention dt, dl.important dt { - color: var(--warning-color-hl); -} - -dl.note, dl.remark { - background: var(--note-color-bg); - border-left: 8px solid var(--note-color-hl); - color: var(--note-color-text); -} - -dl.note dt, dl.remark dt { - color: var(--note-color-hl); -} - -dl.todo { - background: var(--todo-color-bg); - border-left: 8px solid var(--todo-color-hl); - color: var(--todo-color-text); -} - -dl.todo dt { - color: var(--todo-color-hl); -} - -dl.test { - background: var(--test-color-bg); - border-left: 8px solid var(--test-color-hl); - color: var(--test-color-text); -} - -dl.test dt { - color: var(--test-color-hl); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.bug { - background: var(--bug-color-bg); - border-left: 8px solid var(--bug-color-hl); - color: var(--bug-color-text); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.deprecated { - background: var(--deprecated-color-bg); - border-left: 8px solid var(--deprecated-color-hl); - color: var(--deprecated-color-text); -} - -dl.deprecated dt a { - color: var(--deprecated-color-hl) !important; -} - -dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, -dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, -dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { - margin-inline-start: 0px; -} - -dl.invariant, dl.pre, dl.post { - background: var(--invariant-color-bg); - border-left: 8px solid var(--invariant-color-hl); - color: var(--invariant-color-text); -} - -dl.invariant dt, dl.pre dt, dl.post dt { - color: var(--invariant-color-hl); -} - - -#projectrow -{ - height: 56px; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; - padding-left: 0.5em; -} - -#projectname -{ - font-size: 200%; - font-family: var(--font-family-title); - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font-size: 90%; - font-family: var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font-size: 50%; - font-family: 50% var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid var(--title-separator-color); - background-color: var(--title-background-color); -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:var(--citation-label-color); - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; - text-align:right; - width:52px; -} - -dl.citelist dd { - margin:2px 0 2px 72px; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: var(--toc-background-color); - border: 1px solid var(--toc-border-color); - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -div.toc li { - background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; - font: 10px/1.2 var(--font-family-toc); - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 var(--font-family-toc); - color: var(--toc-header-color); - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 15px; -} - -div.toc li.level4 { - margin-left: 15px; -} - -span.emoji { - /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html - * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; - */ -} - -span.obfuscator { - display: none; -} - -.inherit_header { - font-weight: bold; - color: var(--inherit-header-color); - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - /*white-space: nowrap;*/ - color: var(--tooltip-foreground-color); - background-color: var(--tooltip-background-color); - border: 1px solid var(--tooltip-border-color); - border-radius: 4px 4px 4px 4px; - box-shadow: var(--tooltip-shadow); - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: var(--tooltip-doc-color); - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip a { - color: var(--tooltip-link-color); -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: var(--tooltip-declaration-color); -} - -#powerTip div { - margin: 0px; - padding: 0px; - font-size: 12px; - font-family: var(--font-family-tooltip); - line-height: 16px; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { - border-top-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - -tt, code, kbd, samp -{ - display: inline-block; -} -/* @end */ - -u { - text-decoration: underline; -} - -details>summary { - list-style-type: none; -} - -details > summary::-webkit-details-marker { - display: none; -} - -details>summary::before { - content: "\25ba"; - padding-right:4px; - font-size: 80%; -} - -details[open]>summary::before { - content: "\25bc"; - padding-right:4px; - font-size: 80%; -} - -body { - scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); -} - -::-webkit-scrollbar { - background-color: var(--scrollbar-background-color); - height: 12px; - width: 12px; -} -::-webkit-scrollbar-thumb { - border-radius: 6px; - box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); - border: solid 2px transparent; -} -::-webkit-scrollbar-corner { - background-color: var(--scrollbar-background-color); -} - diff --git a/docs/manual/doxygen.svg b/docs/manual/doxygen.svg deleted file mode 100644 index 79a7635..0000000 --- a/docs/manual/doxygen.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/doxygen_crawl.html b/docs/manual/doxygen_crawl.html deleted file mode 100644 index 4a3b72e..0000000 --- a/docs/manual/doxygen_crawl.html +++ /dev/null @@ -1,163 +0,0 @@ - - - -Validator / crawler helper - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/dynsections.js b/docs/manual/dynsections.js deleted file mode 100644 index 8985f42..0000000 --- a/docs/manual/dynsections.js +++ /dev/null @@ -1,205 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ - -function toggleVisibility(linkObj) { - return dynsection.toggleVisibility(linkObj); -} - -let dynsection = { - - // helper function - updateStripes : function() { - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); - }, - - toggleVisibility : function(linkObj) { - const base = $(linkObj).attr('id'); - const summary = $('#'+base+'-summary'); - const content = $('#'+base+'-content'); - const trigger = $('#'+base+'-trigger'); - const src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; - }, - - toggleLevel : function(level) { - $('table.directory tr').each(function() { - const l = this.id.split('_').length-1; - const i = $('#img'+this.id.substring(3)); - const a = $('#arr'+this.id.substring(3)); - if (l'); - // add vertical lines to other rows - $('span[class=lineno]').not(':eq(0)').append(''); - // add toggle controls to lines with fold divs - $('div[class=foldopen]').each(function() { - // extract specific id to use - const id = $(this).attr('id').replace('foldopen',''); - // extract start and end foldable fragment attributes - const start = $(this).attr('data-start'); - const end = $(this).attr('data-end'); - // replace normal fold span with controls for the first line of a foldable fragment - $(this).find('span[class=fold]:first').replaceWith(''); - // append div for folded (closed) representation - $(this).after(''); - // extract the first line from the "open" section to represent closed content - const line = $(this).children().first().clone(); - // remove any glow that might still be active on the original line - $(line).removeClass('glow'); - if (start) { - // if line already ends with a start marker (e.g. trailing {), remove it - $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); - } - // replace minus with plus symbol - $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); - // append ellipsis - $(line).append(' '+start+''+end); - // insert constructed line into closed div - $('#foldclosed'+id).html(line); - }); - }, -}; -/* @license-end */ -$(function() { - $('.code,.codeRef').each(function() { - $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); - $.fn.powerTip.smartPlacementLists.s = [ 's', 'n', 'ne', 'se' ]; - $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true }); - }); -}); diff --git a/docs/manual/files.html b/docs/manual/files.html deleted file mode 100644 index 00e561b..0000000 --- a/docs/manual/files.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -BayesNet: File List - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
[detail level 123]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  bayesnet
  classifiers
 Classifier.cc
 Classifier.h
 KDB.cc
 KDB.h
 KDBLd.cc
 KDBLd.h
 Proposal.cc
 Proposal.h
 SPnDE.cc
 SPnDE.h
 SPODE.cc
 SPODE.h
 SPODELd.cc
 SPODELd.h
 TAN.cc
 TAN.h
 TANLd.cc
 TANLd.h
  ensembles
 A2DE.cc
 A2DE.h
 AODE.cc
 AODE.h
 AODELd.cc
 AODELd.h
 Boost.cc
 Boost.h
 BoostA2DE.cc
 BoostA2DE.h
 BoostAODE.cc
 BoostAODE.h
 Ensemble.cc
 Ensemble.h
  network
 Network.cc
 Network.h
 Node.cc
 Node.h
 BaseClassifier.h
-
-
-
- - - - diff --git a/docs/manual/files_dup.js b/docs/manual/files_dup.js deleted file mode 100644 index 3a9b985..0000000 --- a/docs/manual/files_dup.js +++ /dev/null @@ -1,4 +0,0 @@ -var files_dup = -[ - [ "bayesnet", "dir_40070fdff85d618b4d1d3ab4ac4f79bb.html", "dir_40070fdff85d618b4d1d3ab4ac4f79bb" ] -]; \ No newline at end of file diff --git a/docs/manual/folderclosed.svg b/docs/manual/folderclosed.svg deleted file mode 100644 index b04bed2..0000000 --- a/docs/manual/folderclosed.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/docs/manual/folderclosedd.svg b/docs/manual/folderclosedd.svg deleted file mode 100644 index 52f0166..0000000 --- a/docs/manual/folderclosedd.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/docs/manual/folderopen.svg b/docs/manual/folderopen.svg deleted file mode 100644 index f6896dd..0000000 --- a/docs/manual/folderopen.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/docs/manual/folderopend.svg b/docs/manual/folderopend.svg deleted file mode 100644 index 2d1f06e..0000000 --- a/docs/manual/folderopend.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/manual/graph_legend.html b/docs/manual/graph_legend.html deleted file mode 100644 index 46efc2c..0000000 --- a/docs/manual/graph_legend.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - -BayesNet: Graph Legend - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Graph Legend
-
-
-

This page explains how to interpret the graphs that are generated by doxygen.

-

Consider the following example:

/*! Invisible class because of truncation */
-
class Invisible { };
-
-
/*! Truncated class, inheritance relation is hidden */
-
class Truncated : public Invisible { };
-
-
/* Class not documented with doxygen comments */
-
class Undocumented { };
-
-
/*! Class that is inherited using public inheritance */
-
class PublicBase : public Truncated { };
-
-
/*! A template class */
-
template<class T> class Templ { };
-
-
/*! Class that is inherited using protected inheritance */
-
class ProtectedBase { };
-
-
/*! Class that is inherited using private inheritance */
-
class PrivateBase { };
-
-
/*! Class that is used by the Inherited class */
-
class Used { };
-
-
/*! Super class that inherits a number of other classes */
-
class Inherited : public PublicBase,
-
protected ProtectedBase,
-
private PrivateBase,
-
public Undocumented,
-
public Templ<int>
-
{
-
private:
-
Used *m_usedClass;
-
};
-

This will result in the following graph:

-

The boxes in the above graph have the following meaning:

-
    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a gray border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-

The arrows have the following meaning:

-
    -
  • -A blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance.
  • -
-
-
- - - - diff --git a/docs/manual/graph_legend.md5 b/docs/manual/graph_legend.md5 deleted file mode 100644 index da515da..0000000 --- a/docs/manual/graph_legend.md5 +++ /dev/null @@ -1 +0,0 @@ -f74606a252eb303675caf37987d0b7af \ No newline at end of file diff --git a/docs/manual/graph_legend.png b/docs/manual/graph_legend.png deleted file mode 100644 index 9f80d23..0000000 Binary files a/docs/manual/graph_legend.png and /dev/null differ diff --git a/docs/manual/hierarchy.html b/docs/manual/hierarchy.html deleted file mode 100644 index 5b7dbca..0000000 --- a/docs/manual/hierarchy.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -BayesNet: Class Hierarchy - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class Hierarchy
-
- -
- - - - diff --git a/docs/manual/hierarchy.js b/docs/manual/hierarchy.js deleted file mode 100644 index 5202a5c..0000000 --- a/docs/manual/hierarchy.js +++ /dev/null @@ -1,34 +0,0 @@ -var hierarchy = -[ - [ "bayesnet::BaseClassifier", "classbayesnet_1_1_base_classifier.html", [ - [ "bayesnet::Classifier", "classbayesnet_1_1_classifier.html", [ - [ "bayesnet::Ensemble", "classbayesnet_1_1_ensemble.html", [ - [ "bayesnet::A2DE", "classbayesnet_1_1_a2_d_e.html", null ], - [ "bayesnet::AODE", "classbayesnet_1_1_a_o_d_e.html", null ], - [ "bayesnet::AODELd", "classbayesnet_1_1_a_o_d_e_ld.html", null ], - [ "bayesnet::Boost", "classbayesnet_1_1_boost.html", [ - [ "bayesnet::BoostA2DE", "classbayesnet_1_1_boost_a2_d_e.html", null ], - [ "bayesnet::BoostAODE", "classbayesnet_1_1_boost_a_o_d_e.html", null ] - ] ] - ] ], - [ "bayesnet::KDB", "classbayesnet_1_1_k_d_b.html", [ - [ "bayesnet::KDBLd", "classbayesnet_1_1_k_d_b_ld.html", null ] - ] ], - [ "bayesnet::SPODE", "classbayesnet_1_1_s_p_o_d_e.html", [ - [ "bayesnet::SPODELd", "classbayesnet_1_1_s_p_o_d_e_ld.html", null ] - ] ], - [ "bayesnet::SPnDE", "classbayesnet_1_1_s_pn_d_e.html", null ], - [ "bayesnet::TAN", "classbayesnet_1_1_t_a_n.html", [ - [ "bayesnet::TANLd", "classbayesnet_1_1_t_a_n_ld.html", null ] - ] ] - ] ] - ] ], - [ "bayesnet::Network", "classbayesnet_1_1_network.html", null ], - [ "bayesnet::Node", "classbayesnet_1_1_node.html", null ], - [ "bayesnet::Proposal", "classbayesnet_1_1_proposal.html", [ - [ "bayesnet::AODELd", "classbayesnet_1_1_a_o_d_e_ld.html", null ], - [ "bayesnet::KDBLd", "classbayesnet_1_1_k_d_b_ld.html", null ], - [ "bayesnet::SPODELd", "classbayesnet_1_1_s_p_o_d_e_ld.html", null ], - [ "bayesnet::TANLd", "classbayesnet_1_1_t_a_n_ld.html", null ] - ] ] -]; \ No newline at end of file diff --git a/docs/manual/index.html b/docs/manual/index.html deleted file mode 100644 index fe22924..0000000 --- a/docs/manual/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -BayesNet: Main Page - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
BayesNet Documentation
-
-
- -
-
- - - - diff --git a/docs/manual/inherit_graph_0.map b/docs/manual/inherit_graph_0.map deleted file mode 100644 index d8b0322..0000000 --- a/docs/manual/inherit_graph_0.map +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/manual/inherit_graph_0.md5 b/docs/manual/inherit_graph_0.md5 deleted file mode 100644 index 6b3e630..0000000 --- a/docs/manual/inherit_graph_0.md5 +++ /dev/null @@ -1 +0,0 @@ -1a07b7de87ded37a8a348204931028c0 \ No newline at end of file diff --git a/docs/manual/inherit_graph_0.png b/docs/manual/inherit_graph_0.png deleted file mode 100644 index e413ba9..0000000 Binary files a/docs/manual/inherit_graph_0.png and /dev/null differ diff --git a/docs/manual/inherit_graph_1.map b/docs/manual/inherit_graph_1.map deleted file mode 100644 index c129322..0000000 --- a/docs/manual/inherit_graph_1.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/manual/inherit_graph_1.md5 b/docs/manual/inherit_graph_1.md5 deleted file mode 100644 index ed1e310..0000000 --- a/docs/manual/inherit_graph_1.md5 +++ /dev/null @@ -1 +0,0 @@ -65918d135faed85a5d80296a021b4cf3 \ No newline at end of file diff --git a/docs/manual/inherit_graph_1.png b/docs/manual/inherit_graph_1.png deleted file mode 100644 index f36291a..0000000 Binary files a/docs/manual/inherit_graph_1.png and /dev/null differ diff --git a/docs/manual/inherit_graph_2.map b/docs/manual/inherit_graph_2.map deleted file mode 100644 index 6791d6e..0000000 --- a/docs/manual/inherit_graph_2.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/manual/inherit_graph_2.md5 b/docs/manual/inherit_graph_2.md5 deleted file mode 100644 index 81f8e6e..0000000 --- a/docs/manual/inherit_graph_2.md5 +++ /dev/null @@ -1 +0,0 @@ -75f111cd5e54a47afb7579e7ca08bb41 \ No newline at end of file diff --git a/docs/manual/inherit_graph_2.png b/docs/manual/inherit_graph_2.png deleted file mode 100644 index 9b58930..0000000 Binary files a/docs/manual/inherit_graph_2.png and /dev/null differ diff --git a/docs/manual/inherits.html b/docs/manual/inherits.html deleted file mode 100644 index bc90098..0000000 --- a/docs/manual/inherits.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - -BayesNet: Class Hierarchy - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
BayesNet 1.0.5 -
-
Bayesian Network Classifiers using libtorch from scratch
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class Hierarchy
-
-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
-
-
- - - - diff --git a/docs/manual/jquery.js b/docs/manual/jquery.js deleted file mode 100644 index 1dffb65..0000000 --- a/docs/manual/jquery.js +++ /dev/null @@ -1,34 +0,0 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 - * http://www.smartmenus.org/ - * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/docs/manual/logo_small.png b/docs/manual/logo_small.png deleted file mode 100644 index 33030fb..0000000 Binary files a/docs/manual/logo_small.png and /dev/null differ diff --git a/docs/manual/menu.js b/docs/manual/menu.js deleted file mode 100644 index 0fd1e99..0000000 --- a/docs/manual/menu.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { - function makeTree(data,relPath) { - let result=''; - if ('children' in data) { - result+='
    '; - for (let i in data.children) { - let url; - const link = data.children[i].url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - } else { - url = relPath+link; - } - result+='
  • '+ - data.children[i].text+''+ - makeTree(data.children[i],relPath)+'
  • '; - } - result+='
'; - } - return result; - } - let searchBoxHtml; - if (searchEnabled) { - if (serverSide) { - searchBoxHtml='
'+ - '
'+ - '
 '+ - ''+ - '
'+ - '
'+ - '
'+ - '
'; - } else { - searchBoxHtml='
'+ - ''+ - ' '+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
'; - } - } - - $('#main-nav').before('
'+ - ''+ - ''+ - '
'); - $('#main-nav').append(makeTree(menudata,relPath)); - $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchBoxHtml) { - $('#main-menu').append('
  • '); - } - const $mainMenuState = $('#main-menu-state'); - let prevWidth = 0; - if ($mainMenuState.length) { - const initResizableIfExists = function() { - if (typeof initResizable==='function') initResizable(treeview); - } - // animate mobile menu - $mainMenuState.change(function() { - const $menu = $('#main-menu'); - let options = { duration: 250, step: initResizableIfExists }; - if (this.checked) { - options['complete'] = () => $menu.css('display', 'block'); - $menu.hide().slideDown(options); - } else { - options['complete'] = () => $menu.css('display', 'none'); - $menu.show().slideUp(options); - } - }); - // set default menu visibility - const resetState = function() { - const $menu = $('#main-menu'); - const newWidth = $(window).outerWidth(); - if (newWidth!=prevWidth) { - if ($(window).outerWidth()<768) { - $mainMenuState.prop('checked',false); $menu.hide(); - $('#searchBoxPos1').html(searchBoxHtml); - $('#searchBoxPos2').hide(); - } else { - $menu.show(); - $('#searchBoxPos1').empty(); - $('#searchBoxPos2').html(searchBoxHtml); - $('#searchBoxPos2').show(); - } - if (typeof searchBox!=='undefined') { - searchBox.CloseResultsWindow(); - } - prevWidth = newWidth; - } - } - $(window).ready(function() { resetState(); initResizableIfExists(); }); - $(window).resize(resetState); - } - $('#main-menu').smartmenus(); -} -/* @license-end */ diff --git a/docs/manual/menudata.js b/docs/manual/menudata.js deleted file mode 100644 index 1cdd58f..0000000 --- a/docs/manual/menudata.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file -*/ -var menudata={children:[ -{text:"Main Page",url:"index.html"}, -{text:"Classes",url:"annotated.html",children:[ -{text:"Class List",url:"annotated.html"}, -{text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"inherits.html"}]}, -{text:"Files",url:"files.html",children:[ -{text:"File List",url:"files.html"}]}]} diff --git a/docs/manual/minus.svg b/docs/manual/minus.svg deleted file mode 100644 index f70d0c1..0000000 --- a/docs/manual/minus.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/docs/manual/minusd.svg b/docs/manual/minusd.svg deleted file mode 100644 index 5f8e879..0000000 --- a/docs/manual/minusd.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/docs/manual/nav_f.png b/docs/manual/nav_f.png deleted file mode 100644 index 72a58a5..0000000 Binary files a/docs/manual/nav_f.png and /dev/null differ diff --git a/docs/manual/nav_fd.png b/docs/manual/nav_fd.png deleted file mode 100644 index 032fbdd..0000000 Binary files a/docs/manual/nav_fd.png and /dev/null differ diff --git a/docs/manual/nav_g.png b/docs/manual/nav_g.png deleted file mode 100644 index 2093a23..0000000 Binary files a/docs/manual/nav_g.png and /dev/null differ diff --git a/docs/manual/nav_h.png b/docs/manual/nav_h.png deleted file mode 100644 index 33389b1..0000000 Binary files a/docs/manual/nav_h.png and /dev/null differ diff --git a/docs/manual/nav_hd.png b/docs/manual/nav_hd.png deleted file mode 100644 index de80f18..0000000 Binary files a/docs/manual/nav_hd.png and /dev/null differ diff --git a/docs/manual/navtree.css b/docs/manual/navtree.css deleted file mode 100644 index 69211d4..0000000 --- a/docs/manual/navtree.css +++ /dev/null @@ -1,149 +0,0 @@ -#nav-tree .children_ul { - margin:0; - padding:4px; -} - -#nav-tree ul { - list-style:none outside none; - margin:0px; - padding:0px; -} - -#nav-tree li { - white-space:nowrap; - margin:0px; - padding:0px; -} - -#nav-tree .plus { - margin:0px; -} - -#nav-tree .selected { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: var(--nav-text-active-color); - text-shadow: var(--nav-text-active-shadow); -} - -#nav-tree .selected .arrow { - color: var(--nav-arrow-selected-color); - text-shadow: none; -} - -#nav-tree img { - margin:0px; - padding:0px; - border:0px; - vertical-align: middle; -} - -#nav-tree a { - text-decoration:none; - padding:0px; - margin:0px; -} - -#nav-tree .label { - margin:0px; - padding:0px; - font: 12px var(--font-family-nav); -} - -#nav-tree .label a { - padding:2px; -} - -#nav-tree .selected a { - text-decoration:none; - color:var(--nav-text-active-color); -} - -#nav-tree .children_ul { - margin:0px; - padding:0px; -} - -#nav-tree .item { - margin:0px; - padding:0px; -} - -#nav-tree { - padding: 0px 0px; - font-size:14px; - overflow:auto; -} - -#doc-content { - overflow:auto; - display:block; - padding:0px; - margin:0px; - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#side-nav { - padding:0 6px 0 0; - margin: 0px; - display:block; - position: absolute; - left: 0px; - width: $width; - overflow : hidden; -} - -.ui-resizable .ui-resizable-handle { - display:block; -} - -.ui-resizable-e { - background-image:var(--nav-splitbar-image); - background-size:100%; - background-repeat:repeat-y; - background-attachment: scroll; - cursor:ew-resize; - height:100%; - right:0; - top:0; - width:6px; -} - -.ui-resizable-handle { - display:none; - font-size:0.1px; - position:absolute; - z-index:1; -} - -#nav-tree-contents { - margin: 6px 0px 0px 0px; -} - -#nav-tree { - background-repeat:repeat-x; - background-color: var(--nav-background-color); - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#nav-sync { - position:absolute; - top:5px; - right:24px; - z-index:0; -} - -#nav-sync img { - opacity:0.3; -} - -#nav-sync img:hover { - opacity:0.9; -} - -@media print -{ - #nav-tree { display: none; } - div.ui-resizable-handle { display: none; position: relative; } -} - diff --git a/docs/manual/navtree.js b/docs/manual/navtree.js deleted file mode 100644 index 9027ce6..0000000 --- a/docs/manual/navtree.js +++ /dev/null @@ -1,483 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ - -function initNavTree(toroot,relpath) { - let navTreeSubIndices = []; - const ARROW_DOWN = '▼'; - const ARROW_RIGHT = '►'; - const NAVPATH_COOKIE_NAME = ''+'navpath'; - - const getData = function(varName) { - const i = varName.lastIndexOf('/'); - const n = i>=0 ? varName.substring(i+1) : varName; - return eval(n.replace(/-/g,'_')); - } - - const stripPath = function(uri) { - return uri.substring(uri.lastIndexOf('/')+1); - } - - const stripPath2 = function(uri) { - const i = uri.lastIndexOf('/'); - const s = uri.substring(i+1); - const m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); - return m ? uri.substring(i-6) : s; - } - - const hashValue = function() { - return $(location).attr('hash').substring(1).replace(/[^\w-]/g,''); - } - - const hashUrl = function() { - return '#'+hashValue(); - } - - const pathName = function() { - return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]/g, ''); - } - - const storeLink = function(link) { - if (!$("#nav-sync").hasClass('sync')) { - Cookie.writeSetting(NAVPATH_COOKIE_NAME,link,0); - } - } - - const deleteLink = function() { - Cookie.eraseSetting(NAVPATH_COOKIE_NAME); - } - - const cachedLink = function() { - return Cookie.readSetting(NAVPATH_COOKIE_NAME,''); - } - - const getScript = function(scriptName,func) { - const head = document.getElementsByTagName("head")[0]; - const script = document.createElement('script'); - script.id = scriptName; - script.type = 'text/javascript'; - script.onload = func; - script.src = scriptName+'.js'; - head.appendChild(script); - } - - const createIndent = function(o,domNode,node) { - let level=-1; - let n = node; - while (n.parentNode) { level++; n=n.parentNode; } - if (node.childrenData) { - const imgNode = document.createElement("span"); - imgNode.className = 'arrow'; - imgNode.style.paddingLeft=(16*level).toString()+'px'; - imgNode.innerHTML=ARROW_RIGHT; - node.plus_img = imgNode; - node.expandToggle = document.createElement("a"); - node.expandToggle.href = "javascript:void(0)"; - node.expandToggle.onclick = function() { - if (node.expanded) { - $(node.getChildrenUL()).slideUp("fast"); - node.plus_img.innerHTML=ARROW_RIGHT; - node.expanded = false; - } else { - expandNode(o, node, false, true); - } - } - node.expandToggle.appendChild(imgNode); - domNode.appendChild(node.expandToggle); - } else { - let span = document.createElement("span"); - span.className = 'arrow'; - span.style.width = 16*(level+1)+'px'; - span.innerHTML = ' '; - domNode.appendChild(span); - } - } - - let animationInProgress = false; - - const gotoAnchor = function(anchor,aname) { - let pos, docContent = $('#doc-content'); - let ancParent = $(anchor.parent()); - if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') || - ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') || - ancParent.is(':header')) { - pos = ancParent.position().top; - } else if (anchor.position()) { - pos = anchor.position().top; - } - if (pos) { - const dcOffset = docContent.offset().top; - const dcHeight = docContent.height(); - const dcScrHeight = docContent[0].scrollHeight - const dcScrTop = docContent.scrollTop(); - let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop)); - animationInProgress = true; - docContent.animate({ - scrollTop: pos + dcScrTop - dcOffset - },Math.max(50,Math.min(500,dist)),function() { - animationInProgress=false; - if (anchor.parent().attr('class')=='memItemLeft') { - let rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); - glowEffect(rows.children(),300); // member without details - } else if (anchor.parent().attr('class')=='fieldname') { - glowEffect(anchor.parent().parent(),1000); // enum value - } else if (anchor.parent().attr('class')=='fieldtype') { - glowEffect(anchor.parent().parent(),1000); // struct field - } else if (anchor.parent().is(":header")) { - glowEffect(anchor.parent(),1000); // section header - } else { - glowEffect(anchor.next(),1000); // normal member - } - }); - } - } - - const newNode = function(o, po, text, link, childrenData, lastNode) { - const node = { - children : [], - childrenData : childrenData, - depth : po.depth + 1, - relpath : po.relpath, - isLast : lastNode, - li : document.createElement("li"), - parentNode : po, - itemDiv : document.createElement("div"), - labelSpan : document.createElement("span"), - label : document.createTextNode(text), - expanded : false, - childrenUL : null, - getChildrenUL : function() { - if (!this.childrenUL) { - this.childrenUL = document.createElement("ul"); - this.childrenUL.className = "children_ul"; - this.childrenUL.style.display = "none"; - this.li.appendChild(node.childrenUL); - } - return node.childrenUL; - }, - }; - - node.itemDiv.className = "item"; - node.labelSpan.className = "label"; - createIndent(o,node.itemDiv,node); - node.itemDiv.appendChild(node.labelSpan); - node.li.appendChild(node.itemDiv); - - const a = document.createElement("a"); - node.labelSpan.appendChild(a); - po.getChildrenUL().appendChild(node.li); - a.appendChild(node.label); - if (link) { - let url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - link = url; - } else { - url = node.relpath+link; - } - a.className = stripPath(link.replace('#',':')); - if (link.indexOf('#')!=-1) { - const aname = '#'+link.split('#')[1]; - const srcPage = stripPath(pathName()); - const targetPage = stripPath(link.split('#')[0]); - a.href = srcPage!=targetPage ? url : aname; - a.onclick = function() { - storeLink(link); - aPPar = $(a).parent().parent(); - if (!aPPar.hasClass('selected')) { - $('.item').removeClass('selected'); - $('.item').removeAttr('id'); - aPPar.addClass('selected'); - aPPar.attr('id','selected'); - } - const anchor = $(aname); - gotoAnchor(anchor,aname); - }; - } else { - a.href = url; - a.onclick = () => storeLink(link); - } - } else if (childrenData != null) { - a.className = "nolink"; - a.href = "javascript:void(0)"; - a.onclick = node.expandToggle.onclick; - } - return node; - } - - const showRoot = function() { - const headerHeight = $("#top").height(); - const footerHeight = $("#nav-path").height(); - const windowHeight = $(window).height() - headerHeight - footerHeight; - (function() { // retry until we can scroll to the selected item - try { - const navtree=$('#nav-tree'); - navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); - } catch (err) { - setTimeout(arguments.callee, 0); - } - })(); - } - - const expandNode = function(o, node, imm, setFocus) { - if (node.childrenData && !node.expanded) { - if (typeof(node.childrenData)==='string') { - const varName = node.childrenData; - getScript(node.relpath+varName,function() { - node.childrenData = getData(varName); - expandNode(o, node, imm, setFocus); - }); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } - $(node.getChildrenUL()).slideDown("fast"); - node.plus_img.innerHTML = ARROW_DOWN; - node.expanded = true; - if (setFocus) { - $(node.expandToggle).focus(); - } - } - } - } - - const glowEffect = function(n,duration) { - n.addClass('glow').delay(duration).queue(function(next) { - $(this).removeClass('glow');next(); - }); - } - - const highlightAnchor = function() { - const aname = hashUrl(); - const anchor = $(aname); - gotoAnchor(anchor,aname); - } - - const selectAndHighlight = function(hash,n) { - let a; - if (hash) { - const link=stripPath(pathName())+':'+hash.substring(1); - a=$('.item a[class$="'+link+'"]'); - } - if (a && a.length) { - a.parent().parent().addClass('selected'); - a.parent().parent().attr('id','selected'); - highlightAnchor(); - } else if (n) { - $(n.itemDiv).addClass('selected'); - $(n.itemDiv).attr('id','selected'); - } - let topOffset=5; - if ($('#nav-tree-contents .item:first').hasClass('selected')) { - topOffset+=25; - } - $('#nav-sync').css('top',topOffset+'px'); - showRoot(); - } - - const showNode = function(o, node, index, hash) { - if (node && node.childrenData) { - if (typeof(node.childrenData)==='string') { - const varName = node.childrenData; - getScript(node.relpath+varName,function() { - node.childrenData = getData(varName); - showNode(o,node,index,hash); - }); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } - $(node.getChildrenUL()).css({'display':'block'}); - node.plus_img.innerHTML = ARROW_DOWN; - node.expanded = true; - const n = node.children[o.breadcrumbs[index]]; - if (index+11 ? '#'+parts[1].replace(/[^\w-]/g,'') : ''; - } - if (hash.match(/^#l\d+$/)) { - const anchor=$('a[name='+hash.substring(1)+']'); - glowEffect(anchor.parent(),1000); // line number - hash=''; // strip line number anchors - } - const url=root+hash; - let i=-1; - while (NAVTREEINDEX[i+1]<=url) i++; - if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath) - } else { - getScript(relpath+'navtreeindex'+i,function() { - navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath); - } - }); - } - } - - const showSyncOff = function(n,relpath) { - n.html(''); - } - - const showSyncOn = function(n,relpath) { - n.html(''); - } - - const o = { - toroot : toroot, - node : { - childrenData : NAVTREE, - children : [], - childrenUL : document.createElement("ul"), - getChildrenUL : function() { return this.childrenUL }, - li : document.getElementById("nav-tree-contents"), - depth : 0, - relpath : relpath, - expanded : false, - isLast : true, - plus_img : document.createElement("span"), - }, - }; - o.node.li.appendChild(o.node.childrenUL); - o.node.plus_img.className = 'arrow'; - o.node.plus_img.innerHTML = ARROW_RIGHT; - - const navSync = $('#nav-sync'); - if (cachedLink()) { - showSyncOff(navSync,relpath); - navSync.removeClass('sync'); - } else { - showSyncOn(navSync,relpath); - } - - navSync.click(() => { - const navSync = $('#nav-sync'); - if (navSync.hasClass('sync')) { - navSync.removeClass('sync'); - showSyncOff(navSync,relpath); - storeLink(stripPath2(pathName())+hashUrl()); - } else { - navSync.addClass('sync'); - showSyncOn(navSync,relpath); - deleteLink(); - } - }); - - navTo(o,toroot,hashUrl(),relpath); - showRoot(); - - $(window).bind('hashchange', () => { - if (!animationInProgress) { - if (window.location.hash && window.location.hash.length>1) { - let a; - if ($(location).attr('hash')) { - const clslink=stripPath(pathName())+':'+hashValue(); - a=$('.item a[class$="'+clslink.replace(/ - - - - - - - - diff --git a/docs/manual/plusd.svg b/docs/manual/plusd.svg deleted file mode 100644 index 0c65bfe..0000000 --- a/docs/manual/plusd.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/resize.js b/docs/manual/resize.js deleted file mode 100644 index 7d8cdc7..0000000 --- a/docs/manual/resize.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ - -function initResizable(treeview) { - let sidenav,navtree,content,header,footer,barWidth=6; - const RESIZE_COOKIE_NAME = ''+'width'; - - function resizeWidth() { - const sidenavWidth = $(sidenav).outerWidth(); - content.css({marginLeft:parseInt(sidenavWidth)+"px"}); - if (typeof page_layout!=='undefined' && page_layout==1) { - footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); - } - Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); - } - - function restoreWidth(navWidth) { - content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); - if (typeof page_layout!=='undefined' && page_layout==1) { - footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); - } - sidenav.css({width:navWidth + "px"}); - } - - function resizeHeight(treeview) { - const headerHeight = header.outerHeight(); - const windowHeight = $(window).height(); - let contentHeight; - if (treeview) - { - const footerHeight = footer.outerHeight(); - let navtreeHeight,sideNavHeight; - if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ - contentHeight = windowHeight - headerHeight - footerHeight; - navtreeHeight = contentHeight; - sideNavHeight = contentHeight; - } else if (page_layout==1) { /* DISABLE_INDEX=YES */ - contentHeight = windowHeight - footerHeight; - navtreeHeight = windowHeight - headerHeight; - sideNavHeight = windowHeight; - } - navtree.css({height:navtreeHeight + "px"}); - sidenav.css({height:sideNavHeight + "px"}); - } - else - { - contentHeight = windowHeight - headerHeight; - } - content.css({height:contentHeight + "px"}); - if (location.hash.slice(1)) { - (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); - } - } - - function collapseExpand() { - let newWidth; - if (sidenav.width()>0) { - newWidth=0; - } else { - const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); - newWidth = (width>250 && width<$(window).width()) ? width : 250; - } - restoreWidth(newWidth); - const sidenavWidth = $(sidenav).outerWidth(); - Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); - } - - header = $("#top"); - content = $("#doc-content"); - footer = $("#nav-path"); - sidenav = $("#side-nav"); - if (!treeview) { -// title = $("#titlearea"); -// titleH = $(title).height(); -// let animating = false; -// content.on("scroll", function() { -// slideOpts = { duration: 200, -// step: function() { -// contentHeight = $(window).height() - header.outerHeight(); -// content.css({ height : contentHeight + "px" }); -// }, -// done: function() { animating=false; } -// }; -// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { -// title.slideUp(slideOpts); -// animating=true; -// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { -// title.slideDown(slideOpts); -// animating=true; -// } -// }); - } else { - navtree = $("#nav-tree"); - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(sidenav).resizable({ minWidth: 0 }); - } - $(window).resize(function() { resizeHeight(treeview); }); - if (treeview) - { - const device = navigator.userAgent.toLowerCase(); - const touch_device = device.match(/(iphone|ipod|ipad|android)/); - if (touch_device) { /* wider split bar for touch only devices */ - $(sidenav).css({ paddingRight:'20px' }); - $('.ui-resizable-e').css({ width:'20px' }); - $('#nav-sync').css({ right:'34px' }); - barWidth=20; - } - const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); - if (width) { restoreWidth(width); } else { resizeWidth(); } - } - resizeHeight(treeview); - const url = location.href; - const i=url.indexOf("#"); - if (i>=0) window.location.hash=url.substr(i); - const _preventDefault = function(evt) { evt.preventDefault(); }; - if (treeview) - { - $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); - $(".ui-resizable-handle").dblclick(collapseExpand); - } - $(window).on('load',resizeHeight); -} -/* @license-end */ diff --git a/docs/manual/search/all_0.js b/docs/manual/search/all_0.js deleted file mode 100644 index dc433d2..0000000 --- a/docs/manual/search/all_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['a2de_0',['A2DE',['../classbayesnet_1_1_a2_d_e.html',1,'bayesnet']]], - ['aode_1',['AODE',['../classbayesnet_1_1_a_o_d_e.html',1,'bayesnet']]], - ['aodeld_2',['AODELd',['../classbayesnet_1_1_a_o_d_e_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_1.js b/docs/manual/search/all_1.js deleted file mode 100644 index 52180aa..0000000 --- a/docs/manual/search/all_1.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['baseclassifier_0',['BaseClassifier',['../classbayesnet_1_1_base_classifier.html',1,'bayesnet']]], - ['boost_1',['Boost',['../classbayesnet_1_1_boost.html',1,'bayesnet']]], - ['boosta2de_2',['BoostA2DE',['../classbayesnet_1_1_boost_a2_d_e.html',1,'bayesnet']]], - ['boostaode_3',['BoostAODE',['../classbayesnet_1_1_boost_a_o_d_e.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_2.js b/docs/manual/search/all_2.js deleted file mode 100644 index 6aed91c..0000000 --- a/docs/manual/search/all_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['classifier_0',['Classifier',['../classbayesnet_1_1_classifier.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_3.js b/docs/manual/search/all_3.js deleted file mode 100644 index f513172..0000000 --- a/docs/manual/search/all_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['ensemble_0',['Ensemble',['../classbayesnet_1_1_ensemble.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_4.js b/docs/manual/search/all_4.js deleted file mode 100644 index 721cf82..0000000 --- a/docs/manual/search/all_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['kdb_0',['KDB',['../classbayesnet_1_1_k_d_b.html',1,'bayesnet']]], - ['kdbld_1',['KDBLd',['../classbayesnet_1_1_k_d_b_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_5.js b/docs/manual/search/all_5.js deleted file mode 100644 index 5efa2bd..0000000 --- a/docs/manual/search/all_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['network_0',['Network',['../classbayesnet_1_1_network.html',1,'bayesnet']]], - ['node_1',['Node',['../classbayesnet_1_1_node.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_6.js b/docs/manual/search/all_6.js deleted file mode 100644 index 4e9c1ce..0000000 --- a/docs/manual/search/all_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['proposal_0',['Proposal',['../classbayesnet_1_1_proposal.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_7.js b/docs/manual/search/all_7.js deleted file mode 100644 index 3c7da60..0000000 --- a/docs/manual/search/all_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['spnde_0',['SPnDE',['../classbayesnet_1_1_s_pn_d_e.html',1,'bayesnet']]], - ['spode_1',['SPODE',['../classbayesnet_1_1_s_p_o_d_e.html',1,'bayesnet']]], - ['spodeld_2',['SPODELd',['../classbayesnet_1_1_s_p_o_d_e_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/all_8.js b/docs/manual/search/all_8.js deleted file mode 100644 index 59e0076..0000000 --- a/docs/manual/search/all_8.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['tan_0',['TAN',['../classbayesnet_1_1_t_a_n.html',1,'bayesnet']]], - ['tanld_1',['TANLd',['../classbayesnet_1_1_t_a_n_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_0.js b/docs/manual/search/classes_0.js deleted file mode 100644 index dc433d2..0000000 --- a/docs/manual/search/classes_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['a2de_0',['A2DE',['../classbayesnet_1_1_a2_d_e.html',1,'bayesnet']]], - ['aode_1',['AODE',['../classbayesnet_1_1_a_o_d_e.html',1,'bayesnet']]], - ['aodeld_2',['AODELd',['../classbayesnet_1_1_a_o_d_e_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_1.js b/docs/manual/search/classes_1.js deleted file mode 100644 index 52180aa..0000000 --- a/docs/manual/search/classes_1.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['baseclassifier_0',['BaseClassifier',['../classbayesnet_1_1_base_classifier.html',1,'bayesnet']]], - ['boost_1',['Boost',['../classbayesnet_1_1_boost.html',1,'bayesnet']]], - ['boosta2de_2',['BoostA2DE',['../classbayesnet_1_1_boost_a2_d_e.html',1,'bayesnet']]], - ['boostaode_3',['BoostAODE',['../classbayesnet_1_1_boost_a_o_d_e.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_2.js b/docs/manual/search/classes_2.js deleted file mode 100644 index 6aed91c..0000000 --- a/docs/manual/search/classes_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['classifier_0',['Classifier',['../classbayesnet_1_1_classifier.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_3.js b/docs/manual/search/classes_3.js deleted file mode 100644 index f513172..0000000 --- a/docs/manual/search/classes_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['ensemble_0',['Ensemble',['../classbayesnet_1_1_ensemble.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_4.js b/docs/manual/search/classes_4.js deleted file mode 100644 index 721cf82..0000000 --- a/docs/manual/search/classes_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['kdb_0',['KDB',['../classbayesnet_1_1_k_d_b.html',1,'bayesnet']]], - ['kdbld_1',['KDBLd',['../classbayesnet_1_1_k_d_b_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_5.js b/docs/manual/search/classes_5.js deleted file mode 100644 index 5efa2bd..0000000 --- a/docs/manual/search/classes_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['network_0',['Network',['../classbayesnet_1_1_network.html',1,'bayesnet']]], - ['node_1',['Node',['../classbayesnet_1_1_node.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_6.js b/docs/manual/search/classes_6.js deleted file mode 100644 index 4e9c1ce..0000000 --- a/docs/manual/search/classes_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['proposal_0',['Proposal',['../classbayesnet_1_1_proposal.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_7.js b/docs/manual/search/classes_7.js deleted file mode 100644 index 3c7da60..0000000 --- a/docs/manual/search/classes_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['spnde_0',['SPnDE',['../classbayesnet_1_1_s_pn_d_e.html',1,'bayesnet']]], - ['spode_1',['SPODE',['../classbayesnet_1_1_s_p_o_d_e.html',1,'bayesnet']]], - ['spodeld_2',['SPODELd',['../classbayesnet_1_1_s_p_o_d_e_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/classes_8.js b/docs/manual/search/classes_8.js deleted file mode 100644 index 59e0076..0000000 --- a/docs/manual/search/classes_8.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['tan_0',['TAN',['../classbayesnet_1_1_t_a_n.html',1,'bayesnet']]], - ['tanld_1',['TANLd',['../classbayesnet_1_1_t_a_n_ld.html',1,'bayesnet']]] -]; diff --git a/docs/manual/search/close.svg b/docs/manual/search/close.svg deleted file mode 100644 index 337d6cc..0000000 --- a/docs/manual/search/close.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/docs/manual/search/mag.svg b/docs/manual/search/mag.svg deleted file mode 100644 index ffb6cf0..0000000 --- a/docs/manual/search/mag.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - diff --git a/docs/manual/search/mag_d.svg b/docs/manual/search/mag_d.svg deleted file mode 100644 index 4122773..0000000 --- a/docs/manual/search/mag_d.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - diff --git a/docs/manual/search/mag_sel.svg b/docs/manual/search/mag_sel.svg deleted file mode 100644 index 553dba8..0000000 --- a/docs/manual/search/mag_sel.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/search/mag_seld.svg b/docs/manual/search/mag_seld.svg deleted file mode 100644 index c906f84..0000000 --- a/docs/manual/search/mag_seld.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - diff --git a/docs/manual/search/search.css b/docs/manual/search/search.css deleted file mode 100644 index 19f76f9..0000000 --- a/docs/manual/search/search.css +++ /dev/null @@ -1,291 +0,0 @@ -/*---------------- Search Box positioning */ - -#main-menu > li:last-child { - /* This
  • object is the parent of the search bar */ - display: flex; - justify-content: center; - align-items: center; - height: 36px; - margin-right: 1em; -} - -/*---------------- Search box styling */ - -.SRPage * { - font-weight: normal; - line-height: normal; -} - -dark-mode-toggle { - margin-left: 5px; - display: flex; - float: right; -} - -#MSearchBox { - display: inline-block; - white-space : nowrap; - background: var(--search-background-color); - border-radius: 0.65em; - box-shadow: var(--search-box-shadow); - z-index: 102; -} - -#MSearchBox .left { - display: inline-block; - vertical-align: middle; - height: 1.4em; -} - -#MSearchSelect { - display: inline-block; - vertical-align: middle; - width: 20px; - height: 19px; - background-image: var(--search-magnification-select-image); - margin: 0 0 0 0.3em; - padding: 0; -} - -#MSearchSelectExt { - display: inline-block; - vertical-align: middle; - width: 10px; - height: 19px; - background-image: var(--search-magnification-image); - margin: 0 0 0 0.5em; - padding: 0; -} - - -#MSearchField { - display: inline-block; - vertical-align: middle; - width: 7.5em; - height: 19px; - margin: 0 0.15em; - padding: 0; - line-height: 1em; - border:none; - color: var(--search-foreground-color); - outline: none; - font-family: var(--font-family-search); - -webkit-border-radius: 0px; - border-radius: 0px; - background: none; -} - -@media(hover: none) { - /* to avoid zooming on iOS */ - #MSearchField { - font-size: 16px; - } -} - -#MSearchBox .right { - display: inline-block; - vertical-align: middle; - width: 1.4em; - height: 1.4em; -} - -#MSearchClose { - display: none; - font-size: inherit; - background : none; - border: none; - margin: 0; - padding: 0; - outline: none; - -} - -#MSearchCloseImg { - padding: 0.3em; - margin: 0; -} - -.MSearchBoxActive #MSearchField { - color: var(--search-active-color); -} - - - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid var(--search-filter-border-color); - background-color: var(--search-filter-background-color); - z-index: 10001; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt var(--font-family-search); - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: var(--font-family-monospace); - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: var(--search-filter-foreground-color); - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: var(--search-filter-foreground-color); - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: var(--search-filter-highlight-text-color); - background-color: var(--search-filter-highlight-bg-color); - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - /*width: 60ex;*/ - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid var(--search-results-border-color); - background-color: var(--search-results-background-color); - z-index:10000; - width: 300px; - height: 400px; - overflow: auto; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -div.SRPage { - margin: 5px 2px; - background-color: var(--search-results-background-color); -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: var(--search-results-foreground-color); - font-family: var(--font-family-search); - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: var(--search-results-foreground-color); - font-family: var(--font-family-search); - font-size: 8pt; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; - font-family: var(--font-family-search); -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; - font-family: var(--font-family-search); -} - -.SRResult { - display: none; -} - -div.searchresults { - margin-left: 10px; - margin-right: 10px; -} - -/*---------------- External search page results */ - -.pages b { - color: white; - padding: 5px 5px 3px 5px; - background-image: var(--nav-gradient-active-image-parent); - background-repeat: repeat-x; - text-shadow: 0 1px 1px #000000; -} - -.pages { - line-height: 17px; - margin-left: 4px; - text-decoration: none; -} - -.hl { - font-weight: bold; -} - -#searchresults { - margin-bottom: 20px; -} - -.searchpages { - margin-top: 10px; -} - diff --git a/docs/manual/search/search.js b/docs/manual/search/search.js deleted file mode 100644 index 666af01..0000000 --- a/docs/manual/search/search.js +++ /dev/null @@ -1,694 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ -const SEARCH_COOKIE_NAME = ''+'search_grp'; - -const searchResults = new SearchResults(); - -/* A class handling everything associated with the search panel. - - Parameters: - name - The name of the global variable that will be - storing this instance. Is needed to be able to set timeouts. - resultPath - path to use for external files -*/ -function SearchBox(name, resultsPath, extension) { - if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } - if (!extension || extension == "") { extension = ".html"; } - - function getXPos(item) { - let x = 0; - if (item.offsetWidth) { - while (item && item!=document.body) { - x += item.offsetLeft; - item = item.offsetParent; - } - } - return x; - } - - function getYPos(item) { - let y = 0; - if (item.offsetWidth) { - while (item && item!=document.body) { - y += item.offsetTop; - item = item.offsetParent; - } - } - return y; - } - - // ---------- Instance variables - this.name = name; - this.resultsPath = resultsPath; - this.keyTimeout = 0; - this.keyTimeoutLength = 500; - this.closeSelectionTimeout = 300; - this.lastSearchValue = ""; - this.lastResultsPage = ""; - this.hideTimeout = 0; - this.searchIndex = 0; - this.searchActive = false; - this.extension = extension; - - // ----------- DOM Elements - - this.DOMSearchField = () => document.getElementById("MSearchField"); - this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); - this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); - this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); - this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); - this.DOMSearchClose = () => document.getElementById("MSearchClose"); - this.DOMSearchBox = () => document.getElementById("MSearchBox"); - - // ------------ Event Handlers - - // Called when focus is added or removed from the search field. - this.OnSearchFieldFocus = function(isActive) { - this.Activate(isActive); - } - - this.OnSearchSelectShow = function() { - const searchSelectWindow = this.DOMSearchSelectWindow(); - const searchField = this.DOMSearchSelect(); - - const left = getXPos(searchField); - const top = getYPos(searchField) + searchField.offsetHeight; - - // show search selection popup - searchSelectWindow.style.display='block'; - searchSelectWindow.style.left = left + 'px'; - searchSelectWindow.style.top = top + 'px'; - - // stop selection hide timer - if (this.hideTimeout) { - clearTimeout(this.hideTimeout); - this.hideTimeout=0; - } - return false; // to avoid "image drag" default event - } - - this.OnSearchSelectHide = function() { - this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), - this.closeSelectionTimeout); - } - - // Called when the content of the search field is changed. - this.OnSearchFieldChange = function(evt) { - if (this.keyTimeout) { // kill running timer - clearTimeout(this.keyTimeout); - this.keyTimeout = 0; - } - - const e = evt ? evt : window.event; // for IE - if (e.keyCode==40 || e.keyCode==13) { - if (e.shiftKey==1) { - this.OnSearchSelectShow(); - const win=this.DOMSearchSelectWindow(); - for (let i=0;i do a search - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) { // Up - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } else if (e.keyCode==13 || e.keyCode==27) { - e.stopPropagation(); - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() { - this.keyTimeout = 0; - - // strip leading whitespace - const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - const code = searchValue.toLowerCase().charCodeAt(0); - let idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair - idxChar = searchValue.substr(0, 2); - } - - let jsFile; - let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) { - const hexCode=idx.toString(16); - jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; - } - - const loadJS = function(url, impl, loc) { - const scriptTag = document.createElement('script'); - scriptTag.src = url; - scriptTag.onload = impl; - scriptTag.onreadystatechange = impl; - loc.appendChild(scriptTag); - } - - const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - const domSearchBox = this.DOMSearchBox(); - const domPopupSearchResults = this.DOMPopupSearchResults(); - const domSearchClose = this.DOMSearchClose(); - const resultsPath = this.resultsPath; - - const handleResults = function() { - document.getElementById("Loading").style.display="none"; - if (typeof searchData !== 'undefined') { - createResults(resultsPath); - document.getElementById("NoMatches").style.display="none"; - } - - if (idx!=-1) { - searchResults.Search(searchValue); - } else { // no file with search results => force empty search results - searchResults.Search('===='); - } - - if (domPopupSearchResultsWindow.style.display!='block') { - domSearchClose.style.display = 'inline-block'; - let left = getXPos(domSearchBox) + 150; - let top = getYPos(domSearchBox) + 20; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - const maxWidth = document.body.clientWidth; - const maxHeight = document.body.clientHeight; - let width = 300; - if (left<10) left=10; - if (width+left+8>maxWidth) width=maxWidth-left-8; - let height = 400; - if (height+top+8>maxHeight) height=maxHeight-top-8; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResultsWindow.style.height = height + 'px'; - } - } - - if (jsFile) { - loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); - } else { - handleResults(); - } - - this.lastSearchValue = searchValue; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) { - this.DOMSearchBox().className = 'MSearchBoxActive'; - this.searchActive = true; - } else if (!isActive) { // directly remove the panel - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - this.DOMSearchField().value = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults() { - - function convertToId(search) { - let result = ''; - for (let i=0;i. - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) { - const parentElement = document.getElementById(id); - let element = parentElement.firstChild; - - while (element && element!=parentElement) { - if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { - return element; - } - - if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { - element = element.firstChild; - } else if (element.nextSibling) { - element = element.nextSibling; - } else { - do { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) { - const element = this.FindChildElement(id); - if (element) { - if (element.style.display == 'block') { - element.style.display = 'none'; - } else { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) { - if (!search) { // get search word from URL - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - const resultRows = document.getElementsByTagName("div"); - let matches = 0; - - let i = 0; - while (i < resultRows.length) { - const row = resultRows.item(i); - if (row.className == "SRResult") { - let rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) { - row.style.display = 'block'; - matches++; - } else { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) { // no results - document.getElementById("NoMatches").style.display='block'; - } else { // at least one result - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) { - let focusItem; - for (;;) { - const focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { - break; - } else if (!focusItem) { // last element - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) { - let focusItem; - for (;;) { - const focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { - break; - } else if (!focusItem) { // last element - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) { - if (e.type == "keydown") { - this.repeatOn = false; - this.lastKey = e.keyCode; - } else if (e.type == "keypress") { - if (!this.repeatOn) { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } else if (e.type == "keyup") { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) { // Up - const newIndex = itemIndex-1; - let focusItem = this.NavPrev(newIndex); - if (focusItem) { - let child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') { // children visible - let n=0; - let tmpElem; - for (;;) { // search for last child - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) { - focusItem = tmpElem; - } else { // found it! - break; - } - n++; - } - } - } - if (focusItem) { - focusItem.focus(); - } else { // return focus to search field - document.getElementById("MSearchField").focus(); - } - } else if (this.lastKey==40) { // Down - const newIndex = itemIndex+1; - let focusItem; - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') { // children visible - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } else if (this.lastKey==39) { // Right - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } else if (this.lastKey==37) { // Left - const item = document.getElementById('Item'+itemIndex); - const elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } else if (this.lastKey==27) { // Escape - e.stopPropagation(); - searchBox.CloseResultsWindow(); - document.getElementById("MSearchField").focus(); - } else if (this.lastKey==13) { // Enter - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) { - const e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) { // Up - if (childIndex>0) { - const newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } else { // already at first child, jump to parent - document.getElementById('Item'+itemIndex).focus(); - } - } else if (this.lastKey==40) { // Down - const newIndex = childIndex+1; - let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) { // last child, jump to parent next parent - elem = this.NavNext(itemIndex+1); - } - if (elem) { - elem.focus(); - } - } else if (this.lastKey==27) { // Escape - e.stopPropagation(); - searchBox.CloseResultsWindow(); - document.getElementById("MSearchField").focus(); - } else if (this.lastKey==13) { // Enter - return true; - } - return false; - } -} - -function createResults(resultsPath) { - - function setKeyActions(elem,action) { - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); - } - - function setClassAttr(elem,attr) { - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); - } - - const results = document.getElementById("SRResults"); - results.innerHTML = ''; - searchData.forEach((elem,index) => { - const id = elem[0]; - const srResult = document.createElement('div'); - srResult.setAttribute('id','SR_'+id); - setClassAttr(srResult,'SRResult'); - const srEntry = document.createElement('div'); - setClassAttr(srEntry,'SREntry'); - const srLink = document.createElement('a'); - srLink.setAttribute('id','Item'+index); - setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); - setClassAttr(srLink,'SRSymbol'); - srLink.innerHTML = elem[1][0]; - srEntry.appendChild(srLink); - if (elem[1].length==2) { // single result - srLink.setAttribute('href',resultsPath+elem[1][1][0]); - srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); - if (elem[1][1][1]) { - srLink.setAttribute('target','_parent'); - } else { - srLink.setAttribute('target','_blank'); - } - const srScope = document.createElement('span'); - setClassAttr(srScope,'SRScope'); - srScope.innerHTML = elem[1][1][2]; - srEntry.appendChild(srScope); - } else { // multiple results - srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); - const srChildren = document.createElement('div'); - setClassAttr(srChildren,'SRChildren'); - for (let c=0; cli>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} \ No newline at end of file