From c833e9ba32cbecf2fac0f6772f58d2ea63148d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Thu, 23 May 2024 16:27:02 +0200 Subject: [PATCH] Remove coverage report from html folder and integrate in doc --- Makefile | 10 +- README.md | 2 +- docs/Doxyfile.in | 6 +- docs/coverage.pdf | Bin 22170 -> 0 bytes html/amber.png | Bin 141 -> 0 bytes html/bayesnet/BaseClassifier.h.func-c.html | 90 -- html/bayesnet/BaseClassifier.h.func.html | 90 -- .../BaseClassifier.h.gcov.frameset.html | 19 - html/bayesnet/BaseClassifier.h.gcov.html | 129 -- .../BaseClassifier.h.gcov.overview.html | 32 - html/bayesnet/BaseClassifier.h.gcov.png | Bin 372 -> 0 bytes .../classifiers/Classifier.cc.func-c.html | 251 ---- .../classifiers/Classifier.cc.func.html | 251 ---- .../Classifier.cc.gcov.frameset.html | 19 - .../classifiers/Classifier.cc.gcov.html | 278 ----- .../Classifier.cc.gcov.overview.html | 69 -- .../classifiers/Classifier.cc.gcov.png | Bin 852 -> 0 bytes .../classifiers/Classifier.h.func-c.html | 111 -- .../classifiers/Classifier.h.func.html | 111 -- .../Classifier.h.gcov.frameset.html | 19 - .../classifiers/Classifier.h.gcov.html | 149 --- .../Classifier.h.gcov.overview.html | 37 - .../classifiers/Classifier.h.gcov.png | Bin 453 -> 0 bytes html/bayesnet/classifiers/KDB.cc.func-c.html | 118 -- html/bayesnet/classifiers/KDB.cc.func.html | 118 -- .../classifiers/KDB.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/KDB.cc.gcov.html | 195 --- .../classifiers/KDB.cc.gcov.overview.html | 48 - html/bayesnet/classifiers/KDB.cc.gcov.png | Bin 814 -> 0 bytes html/bayesnet/classifiers/KDB.h.func-c.html | 90 -- html/bayesnet/classifiers/KDB.h.func.html | 90 -- .../classifiers/KDB.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/KDB.h.gcov.html | 111 -- .../classifiers/KDB.h.gcov.overview.html | 27 - html/bayesnet/classifiers/KDB.h.gcov.png | Bin 279 -> 0 bytes .../bayesnet/classifiers/KDBLd.cc.func-c.html | 111 -- html/bayesnet/classifiers/KDBLd.cc.func.html | 111 -- .../classifiers/KDBLd.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/KDBLd.cc.gcov.html | 119 -- .../classifiers/KDBLd.cc.gcov.overview.html | 29 - html/bayesnet/classifiers/KDBLd.cc.gcov.png | Bin 333 -> 0 bytes html/bayesnet/classifiers/KDBLd.h.func-c.html | 90 -- html/bayesnet/classifiers/KDBLd.h.func.html | 90 -- .../classifiers/KDBLd.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/KDBLd.h.gcov.html | 108 -- .../classifiers/KDBLd.h.gcov.overview.html | 26 - html/bayesnet/classifiers/KDBLd.h.gcov.png | Bin 265 -> 0 bytes .../classifiers/Proposal.cc.func-c.html | 139 --- .../classifiers/Proposal.cc.func.html | 139 --- .../Proposal.cc.gcov.frameset.html | 19 - .../classifiers/Proposal.cc.gcov.html | 200 --- .../Proposal.cc.gcov.overview.html | 49 - .../bayesnet/classifiers/Proposal.cc.gcov.png | Bin 796 -> 0 bytes .../bayesnet/classifiers/SPODE.cc.func-c.html | 104 -- html/bayesnet/classifiers/SPODE.cc.func.html | 104 -- .../classifiers/SPODE.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/SPODE.cc.gcov.html | 115 -- .../classifiers/SPODE.cc.gcov.overview.html | 28 - html/bayesnet/classifiers/SPODE.cc.gcov.png | Bin 310 -> 0 bytes html/bayesnet/classifiers/SPODE.h.func-c.html | 90 -- html/bayesnet/classifiers/SPODE.h.func.html | 90 -- .../classifiers/SPODE.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/SPODE.h.gcov.html | 107 -- .../classifiers/SPODE.h.gcov.overview.html | 26 - html/bayesnet/classifiers/SPODE.h.gcov.png | Bin 245 -> 0 bytes .../classifiers/SPODELd.cc.func-c.html | 125 -- .../bayesnet/classifiers/SPODELd.cc.func.html | 125 -- .../classifiers/SPODELd.cc.gcov.frameset.html | 19 - .../bayesnet/classifiers/SPODELd.cc.gcov.html | 134 -- .../classifiers/SPODELd.cc.gcov.overview.html | 33 - html/bayesnet/classifiers/SPODELd.cc.gcov.png | Bin 403 -> 0 bytes .../classifiers/SPODELd.h.func-c.html | 90 -- html/bayesnet/classifiers/SPODELd.h.func.html | 90 -- .../classifiers/SPODELd.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/SPODELd.h.gcov.html | 109 -- .../classifiers/SPODELd.h.gcov.overview.html | 27 - html/bayesnet/classifiers/SPODELd.h.gcov.png | Bin 270 -> 0 bytes .../bayesnet/classifiers/SPnDE.cc.func-c.html | 104 -- html/bayesnet/classifiers/SPnDE.cc.func.html | 104 -- .../classifiers/SPnDE.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/SPnDE.cc.gcov.html | 122 -- .../classifiers/SPnDE.cc.gcov.overview.html | 30 - html/bayesnet/classifiers/SPnDE.cc.gcov.png | Bin 332 -> 0 bytes html/bayesnet/classifiers/SPnDE.h.func-c.html | 90 -- html/bayesnet/classifiers/SPnDE.h.func.html | 90 -- .../classifiers/SPnDE.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/SPnDE.h.gcov.html | 110 -- .../classifiers/SPnDE.h.gcov.overview.html | 27 - html/bayesnet/classifiers/SPnDE.h.gcov.png | Bin 254 -> 0 bytes html/bayesnet/classifiers/TAN.cc.func-c.html | 111 -- html/bayesnet/classifiers/TAN.cc.func.html | 111 -- .../classifiers/TAN.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/TAN.cc.gcov.html | 129 -- .../classifiers/TAN.cc.gcov.overview.html | 32 - html/bayesnet/classifiers/TAN.cc.gcov.png | Bin 414 -> 0 bytes html/bayesnet/classifiers/TAN.h.func-c.html | 90 -- html/bayesnet/classifiers/TAN.h.func.html | 90 -- .../classifiers/TAN.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/TAN.h.gcov.html | 105 -- .../classifiers/TAN.h.gcov.overview.html | 26 - html/bayesnet/classifiers/TAN.h.gcov.png | Bin 238 -> 0 bytes .../bayesnet/classifiers/TANLd.cc.func-c.html | 111 -- html/bayesnet/classifiers/TANLd.cc.func.html | 111 -- .../classifiers/TANLd.cc.gcov.frameset.html | 19 - html/bayesnet/classifiers/TANLd.cc.gcov.html | 120 -- .../classifiers/TANLd.cc.gcov.overview.html | 29 - html/bayesnet/classifiers/TANLd.cc.gcov.png | Bin 336 -> 0 bytes html/bayesnet/classifiers/TANLd.h.func-c.html | 90 -- html/bayesnet/classifiers/TANLd.h.func.html | 90 -- .../classifiers/TANLd.h.gcov.frameset.html | 19 - html/bayesnet/classifiers/TANLd.h.gcov.html | 108 -- .../classifiers/TANLd.h.gcov.overview.html | 26 - html/bayesnet/classifiers/TANLd.h.gcov.png | Bin 260 -> 0 bytes .../classifiers/index-detail-sort-f.html | 306 ----- .../classifiers/index-detail-sort-l.html | 306 ----- html/bayesnet/classifiers/index-detail.html | 306 ----- html/bayesnet/classifiers/index-sort-f.html | 306 ----- html/bayesnet/classifiers/index-sort-l.html | 306 ----- html/bayesnet/classifiers/index.html | 306 ----- html/bayesnet/ensembles/A2DE.cc.func-c.html | 111 -- html/bayesnet/ensembles/A2DE.cc.func.html | 111 -- .../ensembles/A2DE.cc.gcov.frameset.html | 19 - html/bayesnet/ensembles/A2DE.cc.gcov.html | 124 -- .../ensembles/A2DE.cc.gcov.overview.html | 30 - html/bayesnet/ensembles/A2DE.cc.gcov.png | Bin 324 -> 0 bytes html/bayesnet/ensembles/A2DE.h.func-c.html | 90 -- html/bayesnet/ensembles/A2DE.h.func.html | 90 -- .../ensembles/A2DE.h.gcov.frameset.html | 19 - html/bayesnet/ensembles/A2DE.h.gcov.html | 106 -- .../ensembles/A2DE.h.gcov.overview.html | 26 - html/bayesnet/ensembles/A2DE.h.gcov.png | Bin 246 -> 0 bytes html/bayesnet/ensembles/AODE.cc.func-c.html | 111 -- html/bayesnet/ensembles/AODE.cc.func.html | 111 -- .../ensembles/AODE.cc.gcov.frameset.html | 19 - html/bayesnet/ensembles/AODE.cc.gcov.html | 122 -- .../ensembles/AODE.cc.gcov.overview.html | 30 - html/bayesnet/ensembles/AODE.cc.gcov.png | Bin 307 -> 0 bytes html/bayesnet/ensembles/AODE.h.func-c.html | 90 -- html/bayesnet/ensembles/AODE.h.func.html | 90 -- .../ensembles/AODE.h.gcov.frameset.html | 19 - html/bayesnet/ensembles/AODE.h.gcov.html | 106 -- .../ensembles/AODE.h.gcov.overview.html | 26 - html/bayesnet/ensembles/AODE.h.gcov.png | Bin 246 -> 0 bytes html/bayesnet/ensembles/AODELd.cc.func-c.html | 118 -- html/bayesnet/ensembles/AODELd.cc.func.html | 118 -- .../ensembles/AODELd.cc.gcov.frameset.html | 19 - html/bayesnet/ensembles/AODELd.cc.gcov.html | 131 -- .../ensembles/AODELd.cc.gcov.overview.html | 32 - html/bayesnet/ensembles/AODELd.cc.gcov.png | Bin 388 -> 0 bytes html/bayesnet/ensembles/AODELd.h.func-c.html | 90 -- html/bayesnet/ensembles/AODELd.h.func.html | 90 -- .../ensembles/AODELd.h.gcov.frameset.html | 19 - html/bayesnet/ensembles/AODELd.h.gcov.html | 109 -- .../ensembles/AODELd.h.gcov.overview.html | 27 - html/bayesnet/ensembles/AODELd.h.gcov.png | Bin 261 -> 0 bytes .../ensembles/BoostAODE.cc.func-c.html | 146 --- .../bayesnet/ensembles/BoostAODE.cc.func.html | 146 --- .../ensembles/BoostAODE.cc.gcov.frameset.html | 19 - .../bayesnet/ensembles/BoostAODE.cc.gcov.html | 480 -------- .../ensembles/BoostAODE.cc.gcov.overview.html | 119 -- html/bayesnet/ensembles/BoostAODE.cc.gcov.png | Bin 2128 -> 0 bytes .../ensembles/BoostAODE.h.func-c.html | 90 -- html/bayesnet/ensembles/BoostAODE.h.func.html | 90 -- .../ensembles/BoostAODE.h.gcov.frameset.html | 19 - html/bayesnet/ensembles/BoostAODE.h.gcov.html | 134 -- .../ensembles/BoostAODE.h.gcov.overview.html | 33 - html/bayesnet/ensembles/BoostAODE.h.gcov.png | Bin 386 -> 0 bytes .../ensembles/Ensemble.cc.func-c.html | 258 ---- html/bayesnet/ensembles/Ensemble.cc.func.html | 258 ---- .../ensembles/Ensemble.cc.gcov.frameset.html | 19 - html/bayesnet/ensembles/Ensemble.cc.gcov.html | 306 ----- .../ensembles/Ensemble.cc.gcov.overview.html | 76 -- html/bayesnet/ensembles/Ensemble.cc.gcov.png | Bin 912 -> 0 bytes .../bayesnet/ensembles/Ensemble.h.func-c.html | 104 -- html/bayesnet/ensembles/Ensemble.h.func.html | 104 -- .../ensembles/Ensemble.h.gcov.frameset.html | 19 - html/bayesnet/ensembles/Ensemble.h.gcov.html | 137 --- .../ensembles/Ensemble.h.gcov.overview.html | 34 - html/bayesnet/ensembles/Ensemble.h.gcov.png | Bin 386 -> 0 bytes .../ensembles/index-detail-sort-f.html | 222 ---- .../ensembles/index-detail-sort-l.html | 222 ---- html/bayesnet/ensembles/index-detail.html | 222 ---- html/bayesnet/ensembles/index-sort-f.html | 222 ---- html/bayesnet/ensembles/index-sort-l.html | 222 ---- html/bayesnet/ensembles/index.html | 222 ---- .../feature_selection/CFS.cc.func-c.html | 97 -- .../feature_selection/CFS.cc.func.html | 97 -- .../CFS.cc.gcov.frameset.html | 19 - .../feature_selection/CFS.cc.gcov.html | 162 --- .../CFS.cc.gcov.overview.html | 40 - .../feature_selection/CFS.cc.gcov.png | Bin 539 -> 0 bytes .../feature_selection/CFS.h.func-c.html | 97 -- .../feature_selection/CFS.h.func.html | 97 -- .../CFS.h.gcov.frameset.html | 19 - .../feature_selection/CFS.h.gcov.html | 110 -- .../CFS.h.gcov.overview.html | 27 - .../bayesnet/feature_selection/CFS.h.gcov.png | Bin 266 -> 0 bytes .../feature_selection/FCBF.cc.func-c.html | 97 -- .../feature_selection/FCBF.cc.func.html | 97 -- .../FCBF.cc.gcov.frameset.html | 19 - .../feature_selection/FCBF.cc.gcov.html | 134 -- .../FCBF.cc.gcov.overview.html | 33 - .../feature_selection/FCBF.cc.gcov.png | Bin 397 -> 0 bytes .../feature_selection/FCBF.h.func-c.html | 90 -- .../feature_selection/FCBF.h.func.html | 90 -- .../FCBF.h.gcov.frameset.html | 19 - .../feature_selection/FCBF.h.gcov.html | 107 -- .../FCBF.h.gcov.overview.html | 26 - .../feature_selection/FCBF.h.gcov.png | Bin 254 -> 0 bytes .../FeatureSelect.cc.func-c.html | 139 --- .../FeatureSelect.cc.func.html | 139 --- .../FeatureSelect.cc.gcov.frameset.html | 19 - .../FeatureSelect.cc.gcov.html | 168 --- .../FeatureSelect.cc.gcov.overview.html | 41 - .../FeatureSelect.cc.gcov.png | Bin 516 -> 0 bytes .../FeatureSelect.h.func-c.html | 90 -- .../FeatureSelect.h.func.html | 90 -- .../FeatureSelect.h.gcov.frameset.html | 19 - .../FeatureSelect.h.gcov.html | 120 -- .../FeatureSelect.h.gcov.overview.html | 29 - .../FeatureSelect.h.gcov.png | Bin 316 -> 0 bytes .../feature_selection/IWSS.cc.func-c.html | 97 -- .../feature_selection/IWSS.cc.func.html | 97 -- .../IWSS.cc.gcov.frameset.html | 19 - .../feature_selection/IWSS.cc.gcov.html | 137 --- .../IWSS.cc.gcov.overview.html | 34 - .../feature_selection/IWSS.cc.gcov.png | Bin 431 -> 0 bytes .../feature_selection/IWSS.h.func-c.html | 90 -- .../feature_selection/IWSS.h.func.html | 90 -- .../IWSS.h.gcov.frameset.html | 19 - .../feature_selection/IWSS.h.gcov.html | 107 -- .../IWSS.h.gcov.overview.html | 26 - .../feature_selection/IWSS.h.gcov.png | Bin 255 -> 0 bytes .../index-detail-sort-f.html | 198 --- .../index-detail-sort-l.html | 198 --- .../feature_selection/index-detail.html | 198 --- .../feature_selection/index-sort-f.html | 198 --- .../feature_selection/index-sort-l.html | 198 --- html/bayesnet/feature_selection/index.html | 198 --- html/bayesnet/index-detail-sort-f.html | 114 -- html/bayesnet/index-detail-sort-l.html | 114 -- html/bayesnet/index-detail.html | 114 -- html/bayesnet/index-sort-f.html | 114 -- html/bayesnet/index-sort-l.html | 114 -- html/bayesnet/index.html | 114 -- html/bayesnet/network/Network.cc.func-c.html | 363 ------ html/bayesnet/network/Network.cc.func.html | 363 ------ .../network/Network.cc.gcov.frameset.html | 19 - html/bayesnet/network/Network.cc.gcov.html | 513 -------- .../network/Network.cc.gcov.overview.html | 128 -- html/bayesnet/network/Network.cc.gcov.png | Bin 1925 -> 0 bytes html/bayesnet/network/Network.h.func-c.html | 90 -- html/bayesnet/network/Network.h.func.html | 90 -- .../network/Network.h.gcov.frameset.html | 19 - html/bayesnet/network/Network.h.gcov.html | 153 --- .../network/Network.h.gcov.overview.html | 38 - html/bayesnet/network/Network.h.gcov.png | Bin 478 -> 0 bytes html/bayesnet/network/Node.cc.func-c.html | 223 ---- html/bayesnet/network/Node.cc.func.html | 223 ---- .../network/Node.cc.gcov.frameset.html | 19 - html/bayesnet/network/Node.cc.gcov.html | 224 ---- .../network/Node.cc.gcov.overview.html | 55 - html/bayesnet/network/Node.cc.gcov.png | Bin 758 -> 0 bytes .../bayesnet/network/index-detail-sort-f.html | 138 --- .../bayesnet/network/index-detail-sort-l.html | 138 --- html/bayesnet/network/index-detail.html | 138 --- html/bayesnet/network/index-sort-f.html | 138 --- html/bayesnet/network/index-sort-l.html | 138 --- html/bayesnet/network/index.html | 138 --- .../utils/BayesMetrics.cc.func-c.html | 160 --- html/bayesnet/utils/BayesMetrics.cc.func.html | 160 --- .../utils/BayesMetrics.cc.gcov.frameset.html | 19 - html/bayesnet/utils/BayesMetrics.cc.gcov.html | 245 ---- .../utils/BayesMetrics.cc.gcov.overview.html | 61 - html/bayesnet/utils/BayesMetrics.cc.gcov.png | Bin 965 -> 0 bytes .../bayesnet/utils/BayesMetrics.h.func-c.html | 118 -- html/bayesnet/utils/BayesMetrics.h.func.html | 118 -- .../utils/BayesMetrics.h.gcov.frameset.html | 19 - html/bayesnet/utils/BayesMetrics.h.gcov.html | 138 --- .../utils/BayesMetrics.h.gcov.overview.html | 34 - html/bayesnet/utils/BayesMetrics.h.gcov.png | Bin 417 -> 0 bytes html/bayesnet/utils/Mst.cc.func-c.html | 153 --- html/bayesnet/utils/Mst.cc.func.html | 153 --- html/bayesnet/utils/Mst.cc.gcov.frameset.html | 19 - html/bayesnet/utils/Mst.cc.gcov.html | 204 ---- html/bayesnet/utils/Mst.cc.gcov.overview.html | 50 - html/bayesnet/utils/Mst.cc.gcov.png | Bin 733 -> 0 bytes html/bayesnet/utils/Mst.h.func-c.html | 90 -- html/bayesnet/utils/Mst.h.func.html | 90 -- html/bayesnet/utils/Mst.h.gcov.frameset.html | 19 - html/bayesnet/utils/Mst.h.gcov.html | 122 -- html/bayesnet/utils/Mst.h.gcov.overview.html | 30 - html/bayesnet/utils/Mst.h.gcov.png | Bin 316 -> 0 bytes .../utils/bayesnetUtils.cc.func-c.html | 111 -- .../bayesnet/utils/bayesnetUtils.cc.func.html | 111 -- .../utils/bayesnetUtils.cc.gcov.frameset.html | 19 - .../bayesnet/utils/bayesnetUtils.cc.gcov.html | 128 -- .../utils/bayesnetUtils.cc.gcov.overview.html | 31 - html/bayesnet/utils/bayesnetUtils.cc.gcov.png | Bin 373 -> 0 bytes html/bayesnet/utils/index-detail-sort-f.html | 162 --- html/bayesnet/utils/index-detail-sort-l.html | 162 --- html/bayesnet/utils/index-detail.html | 162 --- html/bayesnet/utils/index-sort-f.html | 162 --- html/bayesnet/utils/index-sort-l.html | 162 --- html/bayesnet/utils/index.html | 162 --- html/cmd_line | 1 - html/emerald.png | Bin 141 -> 0 bytes html/gcov.css | 1073 ----------------- html/glass.png | Bin 167 -> 0 bytes html/index-sort-f.html | 174 --- html/index-sort-l.html | 174 --- html/index.html | 174 --- html/ruby.png | Bin 141 -> 0 bytes html/snow.png | Bin 141 -> 0 bytes html/updown.png | Bin 117 -> 0 bytes 315 files changed, 13 insertions(+), 28605 deletions(-) delete mode 100644 docs/coverage.pdf delete mode 100644 html/amber.png delete mode 100644 html/bayesnet/BaseClassifier.h.func-c.html delete mode 100644 html/bayesnet/BaseClassifier.h.func.html delete mode 100644 html/bayesnet/BaseClassifier.h.gcov.frameset.html delete mode 100644 html/bayesnet/BaseClassifier.h.gcov.html delete mode 100644 html/bayesnet/BaseClassifier.h.gcov.overview.html delete mode 100644 html/bayesnet/BaseClassifier.h.gcov.png delete mode 100644 html/bayesnet/classifiers/Classifier.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/Classifier.cc.func.html delete mode 100644 html/bayesnet/classifiers/Classifier.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/Classifier.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/Classifier.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/Classifier.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/Classifier.h.func-c.html delete mode 100644 html/bayesnet/classifiers/Classifier.h.func.html delete mode 100644 html/bayesnet/classifiers/Classifier.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/Classifier.h.gcov.html delete mode 100644 html/bayesnet/classifiers/Classifier.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/Classifier.h.gcov.png delete mode 100644 html/bayesnet/classifiers/KDB.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/KDB.cc.func.html delete mode 100644 html/bayesnet/classifiers/KDB.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/KDB.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/KDB.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/KDB.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/KDB.h.func-c.html delete mode 100644 html/bayesnet/classifiers/KDB.h.func.html delete mode 100644 html/bayesnet/classifiers/KDB.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/KDB.h.gcov.html delete mode 100644 html/bayesnet/classifiers/KDB.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/KDB.h.gcov.png delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.func.html delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/KDBLd.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/KDBLd.h.func-c.html delete mode 100644 html/bayesnet/classifiers/KDBLd.h.func.html delete mode 100644 html/bayesnet/classifiers/KDBLd.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/KDBLd.h.gcov.html delete mode 100644 html/bayesnet/classifiers/KDBLd.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/KDBLd.h.gcov.png delete mode 100644 html/bayesnet/classifiers/Proposal.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/Proposal.cc.func.html delete mode 100644 html/bayesnet/classifiers/Proposal.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/Proposal.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/Proposal.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/Proposal.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/SPODE.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/SPODE.cc.func.html delete mode 100644 html/bayesnet/classifiers/SPODE.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPODE.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/SPODE.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPODE.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/SPODE.h.func-c.html delete mode 100644 html/bayesnet/classifiers/SPODE.h.func.html delete mode 100644 html/bayesnet/classifiers/SPODE.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPODE.h.gcov.html delete mode 100644 html/bayesnet/classifiers/SPODE.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPODE.h.gcov.png delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.func.html delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPODELd.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/SPODELd.h.func-c.html delete mode 100644 html/bayesnet/classifiers/SPODELd.h.func.html delete mode 100644 html/bayesnet/classifiers/SPODELd.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPODELd.h.gcov.html delete mode 100644 html/bayesnet/classifiers/SPODELd.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPODELd.h.gcov.png delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.func.html delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPnDE.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/SPnDE.h.func-c.html delete mode 100644 html/bayesnet/classifiers/SPnDE.h.func.html delete mode 100644 html/bayesnet/classifiers/SPnDE.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/SPnDE.h.gcov.html delete mode 100644 html/bayesnet/classifiers/SPnDE.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/SPnDE.h.gcov.png delete mode 100644 html/bayesnet/classifiers/TAN.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/TAN.cc.func.html delete mode 100644 html/bayesnet/classifiers/TAN.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/TAN.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/TAN.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/TAN.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/TAN.h.func-c.html delete mode 100644 html/bayesnet/classifiers/TAN.h.func.html delete mode 100644 html/bayesnet/classifiers/TAN.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/TAN.h.gcov.html delete mode 100644 html/bayesnet/classifiers/TAN.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/TAN.h.gcov.png delete mode 100644 html/bayesnet/classifiers/TANLd.cc.func-c.html delete mode 100644 html/bayesnet/classifiers/TANLd.cc.func.html delete mode 100644 html/bayesnet/classifiers/TANLd.cc.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/TANLd.cc.gcov.html delete mode 100644 html/bayesnet/classifiers/TANLd.cc.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/TANLd.cc.gcov.png delete mode 100644 html/bayesnet/classifiers/TANLd.h.func-c.html delete mode 100644 html/bayesnet/classifiers/TANLd.h.func.html delete mode 100644 html/bayesnet/classifiers/TANLd.h.gcov.frameset.html delete mode 100644 html/bayesnet/classifiers/TANLd.h.gcov.html delete mode 100644 html/bayesnet/classifiers/TANLd.h.gcov.overview.html delete mode 100644 html/bayesnet/classifiers/TANLd.h.gcov.png delete mode 100644 html/bayesnet/classifiers/index-detail-sort-f.html delete mode 100644 html/bayesnet/classifiers/index-detail-sort-l.html delete mode 100644 html/bayesnet/classifiers/index-detail.html delete mode 100644 html/bayesnet/classifiers/index-sort-f.html delete mode 100644 html/bayesnet/classifiers/index-sort-l.html delete mode 100644 html/bayesnet/classifiers/index.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.func-c.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.func.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.gcov.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/A2DE.cc.gcov.png delete mode 100644 html/bayesnet/ensembles/A2DE.h.func-c.html delete mode 100644 html/bayesnet/ensembles/A2DE.h.func.html delete mode 100644 html/bayesnet/ensembles/A2DE.h.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/A2DE.h.gcov.html delete mode 100644 html/bayesnet/ensembles/A2DE.h.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/A2DE.h.gcov.png delete mode 100644 html/bayesnet/ensembles/AODE.cc.func-c.html delete mode 100644 html/bayesnet/ensembles/AODE.cc.func.html delete mode 100644 html/bayesnet/ensembles/AODE.cc.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/AODE.cc.gcov.html delete mode 100644 html/bayesnet/ensembles/AODE.cc.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/AODE.cc.gcov.png delete mode 100644 html/bayesnet/ensembles/AODE.h.func-c.html delete mode 100644 html/bayesnet/ensembles/AODE.h.func.html delete mode 100644 html/bayesnet/ensembles/AODE.h.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/AODE.h.gcov.html delete mode 100644 html/bayesnet/ensembles/AODE.h.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/AODE.h.gcov.png delete mode 100644 html/bayesnet/ensembles/AODELd.cc.func-c.html delete mode 100644 html/bayesnet/ensembles/AODELd.cc.func.html delete mode 100644 html/bayesnet/ensembles/AODELd.cc.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/AODELd.cc.gcov.html delete mode 100644 html/bayesnet/ensembles/AODELd.cc.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/AODELd.cc.gcov.png delete mode 100644 html/bayesnet/ensembles/AODELd.h.func-c.html delete mode 100644 html/bayesnet/ensembles/AODELd.h.func.html delete mode 100644 html/bayesnet/ensembles/AODELd.h.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/AODELd.h.gcov.html delete mode 100644 html/bayesnet/ensembles/AODELd.h.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/AODELd.h.gcov.png delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.func-c.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.func.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.gcov.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.cc.gcov.png delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.func-c.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.func.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.gcov.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/BoostAODE.h.gcov.png delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.func-c.html delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.func.html delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.gcov.html delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/Ensemble.cc.gcov.png delete mode 100644 html/bayesnet/ensembles/Ensemble.h.func-c.html delete mode 100644 html/bayesnet/ensembles/Ensemble.h.func.html delete mode 100644 html/bayesnet/ensembles/Ensemble.h.gcov.frameset.html delete mode 100644 html/bayesnet/ensembles/Ensemble.h.gcov.html delete mode 100644 html/bayesnet/ensembles/Ensemble.h.gcov.overview.html delete mode 100644 html/bayesnet/ensembles/Ensemble.h.gcov.png delete mode 100644 html/bayesnet/ensembles/index-detail-sort-f.html delete mode 100644 html/bayesnet/ensembles/index-detail-sort-l.html delete mode 100644 html/bayesnet/ensembles/index-detail.html delete mode 100644 html/bayesnet/ensembles/index-sort-f.html delete mode 100644 html/bayesnet/ensembles/index-sort-l.html delete mode 100644 html/bayesnet/ensembles/index.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.func-c.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.func.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.gcov.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/CFS.cc.gcov.png delete mode 100644 html/bayesnet/feature_selection/CFS.h.func-c.html delete mode 100644 html/bayesnet/feature_selection/CFS.h.func.html delete mode 100644 html/bayesnet/feature_selection/CFS.h.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/CFS.h.gcov.html delete mode 100644 html/bayesnet/feature_selection/CFS.h.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/CFS.h.gcov.png delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.func-c.html delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.func.html delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.gcov.html delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/FCBF.cc.gcov.png delete mode 100644 html/bayesnet/feature_selection/FCBF.h.func-c.html delete mode 100644 html/bayesnet/feature_selection/FCBF.h.func.html delete mode 100644 html/bayesnet/feature_selection/FCBF.h.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/FCBF.h.gcov.html delete mode 100644 html/bayesnet/feature_selection/FCBF.h.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/FCBF.h.gcov.png delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.func-c.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.func.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.gcov.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.cc.gcov.png delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.func-c.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.func.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.gcov.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/FeatureSelect.h.gcov.png delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.func-c.html delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.func.html delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.gcov.html delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/IWSS.cc.gcov.png delete mode 100644 html/bayesnet/feature_selection/IWSS.h.func-c.html delete mode 100644 html/bayesnet/feature_selection/IWSS.h.func.html delete mode 100644 html/bayesnet/feature_selection/IWSS.h.gcov.frameset.html delete mode 100644 html/bayesnet/feature_selection/IWSS.h.gcov.html delete mode 100644 html/bayesnet/feature_selection/IWSS.h.gcov.overview.html delete mode 100644 html/bayesnet/feature_selection/IWSS.h.gcov.png delete mode 100644 html/bayesnet/feature_selection/index-detail-sort-f.html delete mode 100644 html/bayesnet/feature_selection/index-detail-sort-l.html delete mode 100644 html/bayesnet/feature_selection/index-detail.html delete mode 100644 html/bayesnet/feature_selection/index-sort-f.html delete mode 100644 html/bayesnet/feature_selection/index-sort-l.html delete mode 100644 html/bayesnet/feature_selection/index.html delete mode 100644 html/bayesnet/index-detail-sort-f.html delete mode 100644 html/bayesnet/index-detail-sort-l.html delete mode 100644 html/bayesnet/index-detail.html delete mode 100644 html/bayesnet/index-sort-f.html delete mode 100644 html/bayesnet/index-sort-l.html delete mode 100644 html/bayesnet/index.html delete mode 100644 html/bayesnet/network/Network.cc.func-c.html delete mode 100644 html/bayesnet/network/Network.cc.func.html delete mode 100644 html/bayesnet/network/Network.cc.gcov.frameset.html delete mode 100644 html/bayesnet/network/Network.cc.gcov.html delete mode 100644 html/bayesnet/network/Network.cc.gcov.overview.html delete mode 100644 html/bayesnet/network/Network.cc.gcov.png delete mode 100644 html/bayesnet/network/Network.h.func-c.html delete mode 100644 html/bayesnet/network/Network.h.func.html delete mode 100644 html/bayesnet/network/Network.h.gcov.frameset.html delete mode 100644 html/bayesnet/network/Network.h.gcov.html delete mode 100644 html/bayesnet/network/Network.h.gcov.overview.html delete mode 100644 html/bayesnet/network/Network.h.gcov.png delete mode 100644 html/bayesnet/network/Node.cc.func-c.html delete mode 100644 html/bayesnet/network/Node.cc.func.html delete mode 100644 html/bayesnet/network/Node.cc.gcov.frameset.html delete mode 100644 html/bayesnet/network/Node.cc.gcov.html delete mode 100644 html/bayesnet/network/Node.cc.gcov.overview.html delete mode 100644 html/bayesnet/network/Node.cc.gcov.png delete mode 100644 html/bayesnet/network/index-detail-sort-f.html delete mode 100644 html/bayesnet/network/index-detail-sort-l.html delete mode 100644 html/bayesnet/network/index-detail.html delete mode 100644 html/bayesnet/network/index-sort-f.html delete mode 100644 html/bayesnet/network/index-sort-l.html delete mode 100644 html/bayesnet/network/index.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.func-c.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.func.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.gcov.frameset.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.gcov.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.gcov.overview.html delete mode 100644 html/bayesnet/utils/BayesMetrics.cc.gcov.png delete mode 100644 html/bayesnet/utils/BayesMetrics.h.func-c.html delete mode 100644 html/bayesnet/utils/BayesMetrics.h.func.html delete mode 100644 html/bayesnet/utils/BayesMetrics.h.gcov.frameset.html delete mode 100644 html/bayesnet/utils/BayesMetrics.h.gcov.html delete mode 100644 html/bayesnet/utils/BayesMetrics.h.gcov.overview.html delete mode 100644 html/bayesnet/utils/BayesMetrics.h.gcov.png delete mode 100644 html/bayesnet/utils/Mst.cc.func-c.html delete mode 100644 html/bayesnet/utils/Mst.cc.func.html delete mode 100644 html/bayesnet/utils/Mst.cc.gcov.frameset.html delete mode 100644 html/bayesnet/utils/Mst.cc.gcov.html delete mode 100644 html/bayesnet/utils/Mst.cc.gcov.overview.html delete mode 100644 html/bayesnet/utils/Mst.cc.gcov.png delete mode 100644 html/bayesnet/utils/Mst.h.func-c.html delete mode 100644 html/bayesnet/utils/Mst.h.func.html delete mode 100644 html/bayesnet/utils/Mst.h.gcov.frameset.html delete mode 100644 html/bayesnet/utils/Mst.h.gcov.html delete mode 100644 html/bayesnet/utils/Mst.h.gcov.overview.html delete mode 100644 html/bayesnet/utils/Mst.h.gcov.png delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.func-c.html delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.func.html delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.gcov.frameset.html delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.gcov.html delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.gcov.overview.html delete mode 100644 html/bayesnet/utils/bayesnetUtils.cc.gcov.png delete mode 100644 html/bayesnet/utils/index-detail-sort-f.html delete mode 100644 html/bayesnet/utils/index-detail-sort-l.html delete mode 100644 html/bayesnet/utils/index-detail.html delete mode 100644 html/bayesnet/utils/index-sort-f.html delete mode 100644 html/bayesnet/utils/index-sort-l.html delete mode 100644 html/bayesnet/utils/index.html delete mode 100644 html/cmd_line delete mode 100644 html/emerald.png delete mode 100644 html/gcov.css delete mode 100644 html/glass.png delete mode 100644 html/index-sort-f.html delete mode 100644 html/index-sort-l.html delete mode 100644 html/index.html delete mode 100644 html/ruby.png delete mode 100644 html/snow.png delete mode 100644 html/updown.png diff --git a/Makefile b/Makefile index 6d8a7aa..cb02f3a 100644 --- a/Makefile +++ b/Makefile @@ -133,8 +133,13 @@ coverage: ## Run tests and generate coverage report (build/index.html) @echo ">>> Done"; viewcoverage: ## View the html coverage report - @which $(genhtml) || (echo ">>> Please install lcov (genhtml not found)"; exit 1) - @$(genhtml) $(f_debug)/tests/coverage.info --demangle-cpp --output-directory html --title "BayesNet Coverage Report" -s -k -f --legend >/dev/null 2>&1; + @which $(genhtml) >/dev/null || (echo ">>> Please install lcov (genhtml not found)"; exit 1) + @if [ ! -d $(docsrcdir)/coverage ]; then mkdir -p $(docsrcdir)/coverage; fi + @if [ ! -f $(f_debug)/tests/coverage.info ]; then \ + echo ">>> No coverage.info file found. Run make coverage first!"; \ + exit 1; \ + fi + @$(genhtml) $(f_debug)/tests/coverage.info --demangle-cpp --output-directory $(docsrcdir)/coverage --title "BayesNet Coverage Report" -s -k -f --legend >/dev/null 2>&1; @xdg-open html/index.html || open html/index.html 2>/dev/null @echo ">>> Done"; @@ -151,6 +156,7 @@ updatebadge: ## Update the coverage badge in README.md doc: ## Generate documentation @echo ">>> Generating documentation..." @cmake --build $(f_release) -t doxygen + @cp -rp diagrams $(docsrcdir) @echo ">>> Done"; docdir = "" diff --git a/README.md b/README.md index 67d8213..1b47306 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ make sample fname=tests/data/glass.arff ### [Manual](https://rmontanana.github.io/bayesnet/) -### [Coverage report](docs/coverage.pdf) +### [Coverage report](https://rmontanana.github.io/bayesnet/coverage/index.html) ## Diagrams diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 95acb53..afb2526 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -950,6 +950,7 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = /Users/rmontanana/Code/BayesNet/bayesnet +INPUT += /Users/rmontanana/Code/BayesNet/README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1174,7 +1175,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = README.md # The Fortran standard specifies that for fixed formatted Fortran code all # characters from position 72 are to be considered as comment. A common @@ -1424,7 +1425,8 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = /Users/rmontanana/Code/BayesNet/diagrams +HTML_EXTRA_FILES += /Users/rmontanana/Code/BayesNet/logo.png # The HTML_COLORSTYLE tag can be used to specify if the generated HTML output # should be rendered with a dark or light theme. diff --git a/docs/coverage.pdf b/docs/coverage.pdf deleted file mode 100644 index 3d4b011b997af8efd7f0de9f86c01b278327c2db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22170 zcma%jV~{9Ol5X3!ZQHtS+qP}nwvF5F+qP}nw(Wj*W;Wj2jh&cy|IW$C%JWs8s>=K_ ztBO=!Sd^BLjvb2hHZQdpij{zYz|PPTiid|@)WX`?#F2nr)Y`z=MA*d0&e()r+Qin( z*_?oxiII(u56a2e(Zs+8%6)xE+a`{f6Y)D&FM;2GgMo#1u5Dw>wKS)(@<4};Jx#jw{H(%p>7c&DYf)kT!YuOpkP=h^>AD1_u z_@4c%>o)_=x3~Pr>-*WrKt~eN{p*1r+#~OoSsw&>$-^~9HdGxW#$+&T%lm4qfZ z%Djb*4LmjWKjzeD)B(B@Bs-nxzXIW|Pg!9rq0G;RHG>IQF|j&VLWlL#LzXu}hOCWK z`;B{2H05WDA4`xd4NMr4l~q2ztb2s-349?^k?aiku`@~-HsVx4W{0z`pPdpkpi(~P zpn_plKW4f8*5m&%rA+2Jk;7(^DoEt-x;i0hK!HkS*`*||B7?*Pafg(}or5NBV(ujw zW2+_W8xzL8eDo6?5xe!yZtNVtTErC|)cI%WVq%uOlp!fh0R_)6gI_3m3d(P6F#u zA~C@YF^k~wB=1)YZj{&H*2pvn2NWkD&u18zPHm&sMrlIEe2Wy+r4nnD9Z8_d%!@0Y z*;&K>x==7=8oH#A#dRbvW>Qhz$+JM|_RRMoqZj85st#Qev?TP48k+2{fBLU;lEVI~ zl*xN@nrCRgY|Mz5QYQ1jJ9tTgouJ8d7n&4CKzO-#!`92x4?lz~OV@nRni4mlSn}kh zFtw>(nLT(T|1~rGph3AZ^8MQIcQa6PXSgzS@fq?UClmhMd8>{ew)1uN!2X`!!JA+u^9(!Tzn1X)zvj!?|0$&6$#dcQ zD`XJs{=4RX2`zbc*#Bz<^q}R8ldQkj0O-s@ctpN8z~%5mOuS7ZYA$`#`@Q!+E{Xn! z5Jj_GJ0Vj_W%q9R^T`LBzt~u3(7Aj(x?$6a_4eKb%b90d{vx2_+2Q=BU8tF~pyjla zjepwJlF$>!m2SCuV;dyvgBnAZ^m#eX^5?uq4V~f2VgJ|A^Y75@=pRxm+ZigKmcuN2 z%zaeDztWe3f9k5&$9jj%N6npgAn$-oCeXiaViW*_RChdG{R1(pBz@!i^VL7V zVO5%yO#68K1H9;^M!D0@cIe+7v-es)+h}P4bUL(p%uV5X`IqXzfB9JSeklLxYU3Y} zncu|uZz!l)b&9KZ0C{*AYj@LBkI4EmCGPeD?>qxDI8f|y=Q>iG^z9F=T*26{!me5x zK!b?&>W~#=FWRGj|&JryG!gHsfdq7@yKtH`^3-kjZE2H1PPZa>nBnio@N z`Q5zRaK4|ND4&ibLSAi0+=}u-TLdUXB}qrz2$UBeuTMwPMnqX*4jcyW+yLG=P1fGr zlNpK8j+pPx7Ixz3cks4*246Rdh-_nCX07=7#96`2ALVeyo%GyTGq@cLtP0?;|qQzF_v0qj}fdlVQ573!%%jZsPa4^ z=q81pDQ5G*B5T(}Dxr)w5Sna%(j+3;@@?R6^Z#6%pn`M>>yh`lH)Ha#K_p8Y4kGaZ zVZ9uJG4QrC`D@nzW}}79a|E;c`{D}ml`K~kGf2m=n_Jo)6uF*@!jKb#*0&Q5_=w z%2|LXq+ps)OqjocsE_$_^mH^IuoU^FNZ6HiQC08j8)#-@vv@nUAHy&YB?p5eV!)Eg zkv%!`ER8M7Rl-Ns@5AxIb}7#R*MEC0x{vSsGIV007+!!8PUCYkZ`Oc|m5(_JdZJ*L zSuC`#mU4`h#w1G~TWyLnm3x{4zfzDlGFzM%))32q#FGgo7n(0>B}a|-AP8o^zEssU z-=1O9D4MWHJ}W3*gpPp%`YJp3K8Y-3u0tAaa*Xg>3=6U&9kB7%3C<{?5}CC4GyZq_ zuFIvq&7q~tAOIdqHEbv9HrM$?tnx6Qo4VzFO2HDv`l93-rX@3gLu3wj!J30-Pw~rw zI>nt+g4H7CLZPBY$v&{knm(%8&MQrrZdkA?z;s{{yyU_@d*%#~1)6O{LLW>sCW&Ms zMkd&<{^y z^^=4#)xJVBRWD+5KBu~@>c<7>0I`p=f&g~oE=O_ZlNhjW1oy|_3;yQXe35tuDE7NP zx;Q~%pI}g0umUr~?8JKYQfa5@O`e=TXOjR;b)tYCM+RI%Ls#v)X)ZhFVla4={T!UE zE-jrs=SPvM4F)bP6msOJQoW28*0<8M(VD1KNCEL+0kK!7gdltcAT9pPcs%PXP?UUk0E#9lU zcj(x#0)n|?8Vvt_?nt}o{+bFaObZ_ObkT)Lt;z6SLv+SKq$bfo?)a5pM=*5(IVR)< z=oO0%X-1ODLO!mRUsG%o6}IZq9ntRG)NR?>U^|+@^$Ckl9i&54(=3CcZ3U+3p_Pe~ z)~swYH`ucvaQEDG*{mN@kSoervxUMJun0foRbaRJCE%-tOn)aYJM{T1nXXUB_nsQZ zpS+_gf&t+v7n&6GZUA1+Smz&bf3y$)7K&zfhh*aMNeEuvR#Xr}Sjla^@Jv8*Vtvkb zqBF7hwp!^ZDrTj+&qiGeuuXB=v|B{l#nO8*)&~n*zY7a&o>*`*V`rzS*MD}kKR^oN z4LdwBfvv0kSGyX-SsQWAj zfF^koH+IdjIKw0wnQ9gWYGZm3l%S?nR1{2}l^^Qu>nMEjaaJ3b9$JA@G3Y!HjxBiv zpHgg*P1n3QrB}C`l8#~ZQG={&qF9N3$z2X`cAuC|>qb?QaJ5PKU^tsinA2dwpXRkm z^2t*FI*rOY?fmcU)}gZ=;@hQBAr&5y*r8LA6?;jsBxB}1^t(-&+V^#c?rvML#5RqI z9^tx>l_Hj3xgwQIzPeoK)vpN*qwzMfvwu|N)Pkc-5BBIT3QsSNMs?UzfnAs z&KYjR`8Y4aZF%AVn+Jt`ez@0mRsijCLTIs;Y=j+VG*B-lOgr4o9iW|?=P^_AWwBRC zs#B6ZZyeF?VHU`+z`4|9)!7&xzKO%BdrZiMe>yI;e2Jhc+Qy4UDLhSYAOC|Ij$g6F zwKZ=*5$XB{V|?deD8hmpnQwXJRJHOf`$g?6WLHhAR1fqpAjPvLk$RFh<_T%PMp1!u zE1R;ycp*bxXRws2{1wrY=I{VFg)80t0!t+Vj>wm#g6CU4Lp|EfJs<#leDDO)x;59W zD52S0SQ`?fhtUruP=}o1f&q@rdP+~@+Db-GZ9qP+Tb44-M#zBfZn-V`4BQs|7|2i+ z>vt`8NZZk9ZvUp^@ba~I2DHw!tN)O$J|4^+$1^W=zuE3SCMC3e)Y6VLjN{LTdCc0Qfds%&z zxGI&1rP5MDVp_NIlh6y)@0~7~sJg9T_^zI5-i;oglb@L{dPbskp)`s7V_~gM9fa4O zhTW@jL!<9`XG_W$yn{~o*~-$BX*mtc_ZQ>{ z@(2_a=A`n7@udym)ei((rXbKI*rAJAazop^jG3y{M{m@JEOTb3sDtu(N9IRJJA1(1#7;Zp&!6b$^FJV0olizAH4oN{T~}&Xh-~o>67594-gSY zrf64wBL04U0#Ik|gOP@pa;@|7s2F(xF5cYI<3hnjdxsWhq73O;_Pwt*So}fAXP4T| z_~+J?orHvlS=M?=!n|!{J{nQccYYr4z|3#*xWq}V13A2z883%^y+vDm4`c1TBrzT~MBQsW(!5SFMY=IWwApBP<~DQ({_tnw1<*}YXpiy~PYQ{k zaPK&bf2uCFAC%#@$|fK(3kfeg`|d_)47JD5_>0&f*YY z(jru)3#MBm&@sRD36N-&sWdLfA53D%>Bu%jzhIYT?H1&9EUZd9c69g(bh^A>+m80^ zBi;h*8ZBsW`8)@c{Vd`%>Z!YYBRYaUFjzoB^2a~B(&)b@CU2^~4hvBX#@=bwS8O&; zYW2)FM|1+jNpRMkgNFWe?&5yCo{y`{EbQP|VpQ_49!f218Lp@0;ksW~iS>B-p5~w@ zroF3`8jjtLzPT4l)yL8tvm4-MKx}{|DWXOT7lsmO@je8~bFt%6Lx~0j(poA}71`6bU+w9TR+yJixC)G1Z_<}^6 zz-uH27cAd|8{D}FC7!NnbH7qj{ljT~H&m5NHDXZ7TJC~>bK1_elus{yf;u?E@@g3g zrTQ3>WsY`RO2O(#Z^9v=p@ZdemB1V0=q;5&|v>Cx=xF*;3Sp!t8 z`fkL^5>kc3qjBQp-8%eN+!xrlv=}l!fzp?YswVKzeMRp|+$$@5*jRl1f$ti?kzoa8wUg;WnC>H~ zjBa8u_>%YazPZ{iqi!b_8<|Ob$CWg-Rx03BZyWpKl7qIp_6DW9Ke-ip5mRjKMcc7_ zBar)!v@XBg7~8^?L-Ui5G+S}Sy79SICkK&#hXg`lh( zc=hKvuc6<4wFXq9D-EYx)@pH9hGuv5NMQMlzq~$Cjl-SE_T(4!xhD%GOpsj|be z>yGF4t%g?4gAIe`45%V4iXsvnf1lgao6KMQEFNJ(v7CqSI z0q$ISwbhA(r*pEa&H`9X#H1V=SC$D!mC2qc1ehvBn97II+}457`p*HVlFhvYQU{q9 z5btUiFR0_Dd1#qqeno2!q%!Q(#!mEVlj8QU&#-KH@ zfqP;Az6MnuwK&ZJ$?0?FIoZK6M`M10^Lr<3064=ibz%ufk-aQ-%m!4iD$s;dBqo)2 zNOEVlm9QK4Y$6M(leYzLzH?hW&HfhL1B&OddWqXW&?jxfF!a6oApB z1ir09AnJ4LKgWnrM2JvCACP~;U+xOV^>0Egl{tEMiP@%BJIR{ z7foE(_>zj+-8flIQ)*>X)4Av8?7F&chg8GP#Tj9`iq+L0-5%dRJvUxEPu;$H#L)8~#{vi+>MRica1_{ z+?3uRE`=~u|9mSLEi51Q%Ozxcnh|uRJalEk$ z{3&uCeT2?d)$8h)riUW1h~96P5)2)+JJWK+wg_{uX&l)am8up)ItUl0A`Gq=t|F_l zH7^rA5qNh}z$D?mb;$2X>n0Yhr!Xf2)ZJo)>hoODA@E>(PlZk^qUnSS0j&w40M`U$ zX;?*><(XAC=c-#7x$QY4I+;at1UO1^n?*CQM*1i*?+HAKi^V)~d2k}~1ywA#aZjK# zM)nNMHU`rKc7!^}FpuLcGZk@zuR!14iZ~yu^{0=%Ybe9}LFT-pPe9vVLYhsr5Q7A| zW;dr>&kfgA?!$%d0^x=0ig}0PI8A_Tljo}tRv{3>ty+oJRDeGh;wCHM$~UO>up{@q^Cu#5(t;QxkcS4_JIHL_YU*%33uH>W;x5oJT-e zoN?I&hezT^n3pt@0Rj*N;Q=5+GzqZz9CHiPD~425jJfOT4-Vpvvg<-g`~=)6byD1u z&`tWKmm=n1Fj9s8*ypre3sm11-)NRU+CH`S9*DukxVj za2;2jmBpRO&YFnE#}p!W`=L$8?yH%7=@01PVrg#f>1l3GWk4x_)?xZ`mE}Xjwj?LU zLT_B4W)HV5P(*ynUe-{1nX;yl4o~kFxc#g27Z=JSXlpuvfgRk%Q$6Q4Rod90qdE;s zvtuehvF5#5BU%ZtREl(RvZ90v)-?9*$7Gd)Xk+eNP1f^qj0;}w(ac6aVHhz=^IrED z^p&4GgJZ#0dEWFj@M=%qxC%f^L%hr~fw4Ynw}3oZ(gf`0 zlyF)q^SCtbaW)qe+;zmY{qqL)6q6-Ykieshg{@yTY(?YEmA;o`h8wH7{UnX5=r5tP zVNDi5ghHN9B@EjdJMYI1HrOihwS21+?H;9QG@CG+KHr*%wBDmDf$ zs|gXXUKI=u!S_61cBYx&9Z@fEEv=Yi(aKoo)MgLQ(ZaUn9NVhO=hWIKlFZ4gWwBg@ zNN9Ue5ggY3Wy1&Vuzs-w-&EzijV=~=g*oFHqBQ_Dpl@o{gfm3vDX*}ZAr#A4<^Gy| zP0}>kQ)p4rp$(C4sn!sgD;rX-Hk)3>jM-`mTbB_h=wc-ro6+3vdor_uo4e5z1u4v1A_}m>!>2y zjw$*s6bLQMvp^t+PMMP$(f65=&7PVieX zotkQMyZQ44R|(#k2k*K8I@#9IZ$wUgaU%9P zfEU*kVcqVrat&OuC^Wt}9c4t!f3|G#Ldo2Rru+>q@a^7?PY7LG6^NxL8xl%>-z(Ll z`MEJTG~EE)C1YZ@n;?bOi+8d`fGU3=2Vyx`2NkrQf4q1(^6<*?lUJ!Ww*Ng6 zQYE&+0k0k*xXeu9&$!9y=o{eYW&n7BRvYJssO*bh8nG(b8>)mOhPb4K#*p2cipPg= z-~zf$ML|Dl$)Y(9=Y-JFdpCabc0wvF8Os|09M3RXO_FqR@|p+y2EKiTw@G8k1CEne z_EPknIF>>)07Oh%8T$^oA&bk7T9UOX0?lHoKb55neoy|3i8SF)#s*YSW~r+Q&g}-gH}@{pAFa# z(^vz>N{Eka{6yO)rZ09OPPeY&!8wLO%t}8vw`rW}G)u5%J+8HaYB9xW4I`Ena_m;y zfqns*2NUI!p_5PhalEL+6F_WyU5~#vY(h8Kl7e@g{*spU1 zuX5PTiv!&IG#s?yYn>JWxGK6kJ4X#}$xQg=WRdeLgR{KaG!EO$8p?77D>9Yw!mq6j zxD>b$s7@20AC%bvKu(IZT-iqLc%{K^410(ISq%rdM|~i;yNtAt{zO)AJMPq-i|efP z;M?)4m&a(?O->FRII!@dI?J=E^0neci;Zt#5!u8o9=}H~w<&ENz2)R}UGU2Jq}wok zUQed?@r-cMTMHrG+`d!SxXC2?dYd*+pBmbarjiy28OnanH=BIpV4dMEUU>0+o^l{w z<+?IOVOlx2V6<+@*VN|%kF3gh?j9}Fv^fbJE$}zy*5dr#;i*q1M%A@RMk{pSv{g>A zMusUMJsWp?mT`W7Rumzqg#ol$C7%U@RjO`Y0OZ5KjC5U~+dEw0ZntvB=-aKBMs=BF2D?C|O0j#%`LyT| zRGi22CCov05$gRE;4|7pqTg?m{fz>AaCBWF<@t(6=K)Y~lw{~e21yug*(Myd$*I() z{<@I(LN)3Bx-d~YDI}%88IZuPkw)6QjwKHxAcX@>?i>{z3X~Hu=m{aMj!a6Yw_kz_ z_e1Ls59_h1l>Ee^)fOtplO=5JYH%iA{YX*Ms8CH<&(wZ_NdJ&QIGPa@BMhM(rdHpZ zF}VAhY2z5A3w!Lez0{XpEXYVitU@Dlto?SPyQ8t8$_p9c}hmGxd z0WOt*blaaQ6l@pIV3hPzyi3dDc*=U4<_C6?@JY#&#qLQdP*0=enNR@B35c-6J)OWP zrv%9xz~w_+qR`8G0Y1umzzH;!hGF1`u^-$nLZlyQQQ>&NzArjOR)uVe7Y^lw5ewjuW71wpx!-xj5iDW3`;r`Un$ zBZ#(D9$ElqGUn5T%|WaKDs~8X!tdt~mxo$50bYYrzcN~%Kz;u>&j0D$0J%`A1_Q-> z(%Y*>Z@dK0qzv#Ci039!*N5M2m50cL*F;c#0A}Yu&HJED4F3s8otgDh*L!II+&eNE zU7PcB-j9RF$l8sL32>s@yb8|+DO)N)`}Np)4Bks1gm9e#p#J*De@+x2`W&EEpENpC zfGm2QV4C3^$lv7~Iyho$`QNZJrvJ^(SXkK@{!<~8iIekx6hc!lAg!~O-nw3Xniq;W zaXwm{8VQ??xE-B!5GGZB{2B%!H5e?eun7GML*P-O`a zkc5H&TWASXf>c#yf;A!+VhL`fFBg=*HQanPFF=EQ@OOQ5-F$D~{bgtCv9Uy8te)9) z>>dd`G4YRhr%&L|DjB8SSn2{0UIn}?Ox!#(pE*~;;R!+?V-b6=Jjt94Ke7}HWTvXa zddt{)zrtgPl6^_J*mx@7a=c)Mx5JF%1j7zF-au~aX6YiP>FE9jx`|m|#QDj|%~AWy z&wgzGA2o*W_siRR9xPEf4C)Y92WxlNNrtT|K?*O3_nPUMA$0b;oDPdlj$?39BPYL3lk_$`S1TvIBexL*l6| zdi71ehruQGFxH8W2Gs^GM-6-!-vod;%+flCT&*bhxs^|8rSW#4-pV)Ksd5i6ZLUAJFcA#?r+A$v2ousokFC@(L0gyq&~2@ULvWuEa# zJ-3Dc6DnYyQN#uoBMJIMGy&p=m>81qbdAy=ECjh?tCTH5ONu@>UyWf?k6VzH$v##wuUBMu;Ls>KX_XYlj%4 zjQ^nCdEWC&(Q-SaD1K_<4@F(-mBczNK~OETj`d8;r<#L~_D2H%EG4q=KEr-S%jp=# zqNrq=Vv*u3|64KYwL&mXvWEgh4=-z> zRP48~)>0%p+xrtZT{FE!9mFa$9BKX}@9sEzbbaQua&=9?dXCol&>(yOYgTv0oBM9i zp*&YGYPYqay|G?D(k`VVuV#!>l6gcxP3q_08k!_nxyQnm0;^Sw#!Dd#48%yKhz0x5 z)7#g5nnh!}aL+Vt2|PUSmY#jSntzo)4P>Pw;mwW=Om4Fv;>I4 z^h-`;6avqpnmiwrv=n$#L)cIP6Yy^@h%$2#A2n8RW{z<>F-fby`KslJ(a=Q9=%;U~ zjCuLdMW|y! z9<ednMg|#-B1E?4GOtKh#V!tUV-8&S%d6o z#Ix&fYYmRZ>Y_>1?k(Z$HOEA@Ye|h+`Q+C8T(S!9r422-5YB8`7yYfwOwXf8Vt8%y z_voQ|-k8-CE!2%mW2&dMX|+aDQCUltjd%Idk)yf}=sqrAg&4Dadg?rJs#!vC3C*#m zpp7qWGs?TM05s0IxMsmg4P%>31$*1arH63U>Pn-Z!Ak1{rqyRV-|S@#8p<1nO0oE2 zrUqvEW;GkFbmR1;>y}?((E@6Ik2`yh=nWF?C8MO}gjI8ruG&lLA-Z`J=o@J{ zlHNQj>X~F@)SHQoLIN5Ui|?d)f;F+wB9&&f%tVB+F}7YP|MATbb=1kEUUSbUi+t5D zbcjAZ{}2)ZL~HUu<)9T0Zrza?PoAD9ciX`u0AnIq<6&z5Q={%ncDb(k?~*s1l2&k* zRcI_4e^E&hI9YieMK{R^*)X}08x5W6a~fLMmFb!{ptunE#st5dC$@s8oyx=tr zBnu4KDy4qKzKq)IS41JDv5q7&{OC?rzAfBKk_)4Qj!)E#Pc8KsJ%Wp?Pe1Lc zYfVY~Y1cxaXrutXOOR|Zb}>HEak)`T0)cAPHV;rgQRUr@b`Y6z(VinlxRItW2{KvB zA=7~&a4@Wrs^3#**j(OKb}du8YN(c>>tY)?N7E1rF0i+yU!p=U5aTr-x_#4l$&i(}M)fMgA_kd|kYF^9?5OQ;sCK)UKm23^(&4*R7q|-90h;}*| zsD*`m=1HX8Y$L0~sKArq4+X!rk2*QkCHeU`h5fo0$^6g{WaJ#+w;joh8AX&bR*SJ3 z@fs})$Y!e-MDewYVl?PSQfvFox?tiXJg>g^mS7^?FZOY4Tf%p*gWR@ZWQQGXVE(Oj z#QP6!E=~L6yQbgxPk4T17ENyUwzl^6reu_yzV=bn?N$(_%V=r=)-tA|$2J-!+xK{O zTw1fg7GaPLS0m$d{=QTShk;F*iW5HJbI1ZjYW2rSE!-e%pkIR{2BnZl#&&eF{uq-- z)GurJeGpmY38`75-lnt#as`70TrKCby*$zo+CLiyBl_N%w%33;Q3e6A>S6AR?#Kfm>itE5UA{)kewC)xtTwwjUkFIRWg)Z^k(ymhM5M=R}K; zA5MjIqC>B??pl)t9*sbDkrM7&!gEBOT$A=$EWjuOS;SCwiH6}7oERBFnh2)T1(c__ zh{tRNq!dN{m85W2ihv_TyU_z1zoGPj7#1+4P60ZbMfHzq9)}Y#MhJ)U(ZaehIoQz* zTwzptD}n@!U}S`RNXB+xdPy3`YYxott0MZ&;nKMQStw$Idc8C6>4$w6zP?DCapMtR{LQbA}GekF?hB5xsnpRWoq4mkuEXLFxe z6CgI(nLtgl_n#uS^I<3dA<}oJH7y$CPd_w5o0h@_2+irlal{4yYk$l=1?kO)r$3|} zl{12(m^X(P+J^NF{Q)N|HfR1fG=TYk(*R~Bj{isl7&$o^|9g{WNzFz&YXz0>rTZHo zC@6*>Fvy1I6L8f(#s;Wa==ByH!RMjv%Aubn5`PB%W& zZ6~=O+g1bs@{nl(LEEFf`su^w^i(xP&D@N0$9xZG5k3G&L+|~Hd<|nuPIkcdU{yC& z#?9;sRJA`U$tKiRUK4UwAHLuOk-*{5m1~n04};u2Bh4M7-73oBHSuYPa=}mZ)yHnG zIxj<&>OXw<)9b^EqCRRLi2FUkS1k`2TQchYXx0rzTaCG6W;r|27=Xs%axz)i8{9)H zy)n-#>fE($^4D5^-&1$a?Nqmr;%#AN0sPwCAAm`InLTZ=@>ThikxoF6@)W!rvWGOC zVL?h&k#<0Gd`_LFaG4>DVjGD5zA>F3hB#k9aZK8Y#(0~>@J*=ujtT0*<)^2o;zWpq zc0$;fDc%TM#50CzE8pP`#h#vFc^MFO$9p}u1k-e%`1~cP`z9Ei5j>QOz@t84@1&p^ z$nR~SXZ(xgB#mx_@X%Z#1Ub?KPNSCI$hwgX#2L!@qQRA^p`_}eIM%(KtpHv_M9oY# zVD)9Z&|0K6cYO-)fjI9oc}71*6(X5|Cwnr*;KkXcY{ev;GTk!UMEDGaj$G0$r!K{M zgs2Xp=~{<;$27x}LOjN4%5tcDg>KJ2*3CmEnN-_`Hduc&gp~e}B+>Nm?Gr2J$H;@T z0q7JhZJa%Pbmgc@6$x8Dyz$spi(1rakRWAkoIH4zAVr8)`y`KQbM@fDHb-klFSqHl z;ip7QDpgOnS{WErX|ZLxTSguE(d>W(^nOQx(;&sheQHWrnmI)4_hi$7)B&6qM{UYW1- zAe9sTj0=IvsrbL89DI4gEKSnK)i)~o_J~!~uNG%+Hl{14h&(N?+u>JzQ;6WB*I<&< zvcg?;!9(|ajvQjc?Db|j3cpVJ-k^VvEGgw&Oi*SUN@^$TNI3Vpd}6ao;?1G$ltm)%zd_+6i`edK zTI(MH{~n!-eXq?C>K!Z7uF8UprIq;zI`~q~vu~O-hWZm<9)Mi=5YnUX{pF3uE{J-K zp9&2=)+_jF{LM9hO)ggzHjqW`wL)BUmoPV%prCO(|GB9a*cWxy7S*>Z%9S%yx_~{| zfZ&NHu$dVo?t>Phh^CKq%2IISbI>K3P_VOex^#|O%}VRDtR^MZeEOs|j&$U>(|BX% zE$q|^{~hTbJFoj-sc~N9q?#3#>bUPGxNOM-9C)_Uw6w3GAKkJdUEak3;LNL9G;7tfVoF4aVGf zS#CAvh8GRuTbq8sk2Io#r|G(vW1$-s`V0f5)J&4~9(b2erIT>i55u{&APkSu?eCH> zvS_*!1y=bSa^X4h9C<|#jwo28AbZ8L`$ftuVVd7KY6>dbZHIJfqjfZi;+Z2#R#!|m zm}|G1vqdKgs0MEp|lf$gFK(P{!MDY_McM&CT5oZQ6bDx^RiZ2!TgzSYqracMIMPYBEMty^+)FJj+H?g z;b@M?0cRv5;~^cFE>}=R<Pl?^AfsU(y609V;6j;!Zz zkEtuL5Es%qTkqqSc;2!CM-sSn;Lq{O-MMhu z9WCSYr44YxH@dq8w*K>~l1$#;ZQPr<7;N#B&SSo8#i8l!Vr#h*po823)@Lv?*B5ck3nOW(@J0$q8z;6M{Vg*7K-~y4qk#n@17H724@({`^T+eYiqEU^;{gUSDqkH^gm)X%h zJp$9S!6RDoN+w7fxKhV<>lN6*RW|f$6^tO9k8C~m7Pn*dhI9wN5t4|IoGkR$sa z%m4*#W^m{X){B-r8M%n&pA$+DUPT}quLH*SA>_vv7{n_fM+lb2kXYW7nnbTdye-+0 z2IqT19|61jL4bwcXyP2CQ>gdS&<$acO`c_4`jHB$>(tHIkv9YyogW~&Uc^yg3g*QQ z-fXFIiWK3kCDoE)5|;}dtftg~9CP&_bd`B*c^FaOlD6$Dv*0Gh;r)B&C)!JW);%DWTj^d`WgOzUK z(xTse#m{F~;Ds?l3vh}fY1pNL$OMaNc{`KipP9!boti&(TR%UuCD z0Te`T7}b>^2zI-w!F*@<+97MwIy(P zbr!s+_OM~FKH9wp43zw~E6Lw?IJcj-l7Q26qldkfc203JEi*Y5SUILfD7G~pQO@aw zzhKDKs5Ib$gr*Z-T*<8l4F#hnE4a&9wd;=?NTq+L2Yo^T1JgPcnwVPldJT0VHUWv^ z;4AAE2^%^Tki?xNMD)N6(pC?|JpIa0N7po`MZtV$T}l`(#Hrh`g=}Ye?hNRTT|n-} zUD~R2Q+!Tklk*cY$?4y#++bfgyvv`4TGR;C6F^l5VWAOSrZ`cjJgVLXngF8;$&Ht; zg6~dYX&3?(HePQb#$XQ#8(7XS^3L;BE1F9=sos{t*Jf%v>Ncb38UHWMl0*=U_BKK+!(ft4eI%7 zGg;5t)@=HD%|%UxJox1Xr%_j5kq@7oE=rmO&QeOMq)s|C`FL?PC{&iLO*u_d`_vtX zWncx^M_zpqx6WRU?NcRXG?g3__&H@xw4v}l|1%=L=lEaJ(f=2P+!wabyuF0 zFk-^$(WBDVy3f|N4wME#70K~Z11@elaP91f8B?LQwH~S?cDGDEh*t*NkljX;brvAI zccx90fS6;w4I>Ey@k}GByhyBpZBnSmrzE|;E;C?K`qwD~y`!On0d)Yek-8hChXR(C zm%RzrZwD6ADw_b4Dsl&FK(snLRAZWgNs-BH9C2id486K&OjTOP5(6}`lX|3)x=8~o z#1T`59!;eCN~}Xo0bHY7oaVm|AJh2XwPqW}a_sk$gl^c+V)YMniwD76yZMmJEf|U* zTG%|;IILRkxyfZ4Ogll%w|KIU&*#mjvygak2kR!khKqLx68(n>wUwZ`Yg_Bw6|8uV z>x9W)E4gPEBwyYPI7_mPIi;O9Pi2Y{z`fx`B+ zQ}cW0j0_%}f5A)d5}{Y!w1Fi-b&3B_k?&&u#s$yWXR{qiekgt23At$(&bbyNP^sFQv&3 z^!qP9&w?hY>2*mDD{U=&&wH0qJ}J4fmtl|2A@JAyTNLxML0^{#ST&g_x+)Jq-G zHn2Ur&<1P97Q{JyHtgFg?I%;g}AnrHoNqq5bB5W zrP99ifpk6d)HKQe>E=44n%cHCO%4W--U4b+s)B(8A_@cuy+}1AR1+ceA`ps5uPRCh zfkOv@0}2A6M5=;_f=HJ`K&41IfC2##32@^*_ne1ApVvFy81Ieo{;je0-ec|geRIw= z_u6ZHNr7?pmM;hZNMdJcSLwZlw;-`WgW?5DeQ0!!{IUT82*EqmhlsEHX&?gcB)B(~ zZ!V8k&Fqw{NO$4;wz;1BH`}iAQ?^hrBXU+yVUX>ql6!UWP4LF}mtlmgLRgbzBbLF&ENp6N{UlI^xLF=3W61yB;8c0zV|JHteXbX%!PNDdy>&#||MFM;tJnfT%E^Fs> z*l-HS1-_`PM#VqxR7sOi+`q_SMK&sBadt0l6KsgCn1~hE)f>^u1f=@so8_NiONAqP z@^Ss#1nw*b`TP^?JXD>BtNC=Pe%FV?FEWD@`sD~*<@uLlLNcSe!ix`UT*!~2`;8%K z)wDfMLj|F7__iM_nPX00)g=$6rb6$SA^b)hVIQt@$dSPjaFsBRZ51Nx_G)JsJ(hn| z*Ljt*&uluL$zQ}I`s1lp#Oetzy(qKfMwRCsr4I z-eWVEA>iCUfS*YA-TV%dXMZYUp|W2sR@)>WOp&WaA#xZN(aC^;Uwn6H>*e$q>ZI&( zQ*BlETusYVBRX;vp}i94{J}W`x#Gt?c$KeK5|ZN6x91qvlFp1jkeWATZZivdB8N_A z@M$}fThdpSDbH#Ik8BKRSnsIK)(*r_|0d27h^rl2M7D`H_jU_z+?tnkwK}64tx**j zEGRauOE{`1fM0oKw@T3rx}P3!?3_CEayns5Em5#H8l4g|w5}CB1c9vQ<>p`n(;AO> zFoU17=awK}Yn@WHC^pq7H|o#LPwS`dht6jKhPyav7E2|hp0*FKil{OM(IQ%0s{HAY z-8bN_8x|$~B1}0W3-?r8I5+i->xRO*fk_PRw~EFcYgpY$E5RqH=d96M6dEsP5~Z$S z=XiDPq%~>x5EfaO`7QWz2M%}qD2$+Asl)sY{@y?5C($;bOiZ#z^Fn0FE{!IzG{%y* zrgrrWDp%07tUZPbepc+D-PQyV%dvPZqxS~y09zkpR;jCuNFQFn`b64;NDGh7P^e2@ z@j#H}d~{derrDs}iQVhd%~8nZ++}=8tVl3(`s24}E^qlNX~Jz<_6w3GPSg~;M^p6y z0tfbx2_mNTD~f`fSc|OzGT$08kn^TRAwSe2s|ChQXfhtOUn3MQ&Ny>fF6yy|>y=mv*Mx}`jPwJX@&T#u3{FMHNb%I9GPcsE5DbV8 zrpl+F)PCqYz;NUd16*`={%5V#kyW0?s>i{iH5a>2m{`O=7YRfy*c8SJDR;AE9l~-F zXT#r!HQf%mCcM>><;vuBmvSrM4vF^{?X5d=;%&tG4}7BPRjuD)1@>Pdaq;RE90-gy zy6l3p!-LIyFXR8&q3e!y#DP)H_Ehm6S+EYy+0hA4ZK!*?d3u{&!P-%u(ZKmR+u=;L z5nzNf-p3f{t?uc5#nS`lfd?sobv>w3Kvz7!C;@@+-oCi+?ic%0Bgh!*?d}7j>IWHn zY&M z+xw2$|0Was5Q?9ASL!SN1Z3LYSn6TspTO*2;z_bH2Wp9II}8mC4IK^bckEO6&uEqT zn^(F23u0yd9P}$@zf@O$GYdO=(C)e<#UnH_Oo-^6H;3wrCDKE}n)G}Q zJ;|Ph^;_?eKXByzhlc-zhySl8g} z&gd(MN#DLEraUQ>F>QT0QF4kqC0_EKFpHwlQ@&VTOH8tJrLaimDD7G2lKXN70wu~e z(ooL0MI z{$5k9sbeU%ZR>;dH=t0Ux<{+B)?Ii}ZcF-7<4ZHh=yN?#Von}%@r_Gs-Hm}hEw5WQ)IhZTZ(Oi;i9|TB4gEVuR-0Z-HFpL^mzg#hlP?`??}m`h90Aztyq%;w7VS{U69zESAZ~?p#DWd zeV}=|X`i}DUvNe&rbO*39Qh`2?Dz^3Wxo_XINVS*6Y%d(Y8o zo>VU?y(OHEtR@BF>?~h1r06;tu(OOkYi8?n8Grh)Lt0uNKu#Hhp(+HXE6qYnD+LYW zk8Yy9`JGBVAML~~fNR>y_6m367Qyvx8|O8uG@_1aJ65=CqhRmPT$b8LEQClT4{R@v z5cDUvkh_9H^mJX%S9=30B~Ds*-}CDd2H$%5Nd_?Ny?@LP69f#8O>OKpp45fFZ?#^Ym{-B>18Dp&C)q@C6dQhHyF2b9fFev1vWaLPVQ zf97m_c}1mVvxFo=V+stI%IkYbAu3(WSotv&>&{dLf1A(xdc6)dRk(D`XICqb?|`>m0U^BWJJSjKKP7xd?KlFL`jSN%)fO1u>J8&A#Ld>(nfgVP)} zxd}^eZno|eJ*Re!QPlATsbiPziD-{!@q;|OCtZWgPWZ}?+CBG5aWi-j41FmyM^{sRRe%rz8bUBYIthTv)Ny5N|U#m zIErQWCi-*a^Zsy&nZ?#rc^q-skT7kKO8Tfg{&s$*65AR;amU!fLL5hC+Kr_D1y3V?JLRDpD(!oS}P*!jD(QCQS9I&7; z>8pzUdA|kE6pZC46uck6yzOu=Kz(GOPy$!4okwrUEQ~(Fpd&4tNs0=ef;^}ApteLc zzk*9$XZAW9P$Er;DUI5WHN6iDJ1?VhZ_mi7KP_3q)MY)G4SLB(XqxKmbm9_+tIt)Wzt7m=v2b4St4(ZB7$OVq(|E; z&9@$q$R3|HZ*p(oBST^fZ9_3bRYt>0b&|%;=?~%BiHI281L=X9pT_Y&K|Zxo^O`K&~uo?~`KbKAr#k z&^(GW)tBOZpAK2JIJ<0l6xcuP{IZUhP(W{!Gr0_F=QqtFKB f2|oQ6A|E`~8z10}a{xeO738T>w4$0uT7Z85WssDA diff --git a/html/amber.png b/html/amber.png deleted file mode 100644 index 2cab170d8359081983a4e343848dfe06bc490f12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG - - - - - - LCOV - BayesNet Coverage Report - bayesnet/BaseClassifier.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet - BaseClassifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::BaseClassifier::~BaseClassifier()1680
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/BaseClassifier.h.func.html b/html/bayesnet/BaseClassifier.h.func.html deleted file mode 100644 index 8418b7d..0000000 --- a/html/bayesnet/BaseClassifier.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/BaseClassifier.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet - BaseClassifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::BaseClassifier::~BaseClassifier()1680
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/BaseClassifier.h.gcov.frameset.html b/html/bayesnet/BaseClassifier.h.gcov.frameset.html deleted file mode 100644 index 92b4ff4..0000000 --- a/html/bayesnet/BaseClassifier.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/BaseClassifier.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/BaseClassifier.h.gcov.html b/html/bayesnet/BaseClassifier.h.gcov.html deleted file mode 100644 index 9d3ca81..0000000 --- a/html/bayesnet/BaseClassifier.h.gcov.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/BaseClassifier.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet - BaseClassifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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>
-      11              : namespace bayesnet {
-      12              :     enum status_t { NORMAL, WARNING, ERROR };
-      13              :     class BaseClassifier {
-      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         1680 :         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              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/BaseClassifier.h.gcov.overview.html b/html/bayesnet/BaseClassifier.h.gcov.overview.html deleted file mode 100644 index 57bcea7..0000000 --- a/html/bayesnet/BaseClassifier.h.gcov.overview.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/BaseClassifier.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/BaseClassifier.h.gcov.png b/html/bayesnet/BaseClassifier.h.gcov.png deleted file mode 100644 index 678d90ab3d0a236bbeba73a2beb5a625a0ec3075..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 372 zcmV-)0gL{LP)Llv@(RAP7an4sZ+U4(k5*R>trW(J)g!5|bV;7o@owv~ye>69~@*>5B3K1Bh;O z8j~XG{ul7%u^f-R8aT4=%?0q)jt7sZ^sqs}BT0c~VDgr-RB}G8Dz;*ziCwWl^Z;Iagw{v{Q>Rv)XW|gP-&>jbJYR$F|JoN#s z7`7MMsD!mAXspT#+K({KantZ5t@N6G<)Ay2$>bs!YWN$(Em;TG9_Db~Y;f{%9_@dV z*0NDdwxnR@Qq$_3@A^29`5Qgo`6JR2M3hB9u)NB1YMq?bY^<7N(W|Ace(`?c2uPaz Sr9RvM0000 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %126126
Test Date:2024-05-06 17:54:04Functions:100.0 %2424
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Classifier::dump_cpt[abi:cxx11]() const4
bayesnet::Classifier::topological_order[abi:cxx11]()4
bayesnet::Classifier::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)16
bayesnet::Classifier::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&)16
bayesnet::Classifier::getNumberOfStates() const24
bayesnet::Classifier::show[abi:cxx11]() const24
bayesnet::Classifier::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)92
bayesnet::Classifier::score(at::Tensor&, at::Tensor&)112
bayesnet::Classifier::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)128
bayesnet::Classifier::fit(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)136
bayesnet::Classifier::getNumberOfEdges() const332
bayesnet::Classifier::getNumberOfNodes() const332
bayesnet::Classifier::buildDataset(at::Tensor&)340
bayesnet::Classifier::getClassNumStates() const348
bayesnet::Classifier::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)548
bayesnet::Classifier::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&, at::Tensor const&)660
bayesnet::Classifier::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)852
bayesnet::Classifier::predict_proba(at::Tensor&)1484
bayesnet::Classifier::addNodes()1576
bayesnet::Classifier::trainModel(at::Tensor const&)1576
bayesnet::Classifier::build(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&, at::Tensor const&)1760
bayesnet::Classifier::checkFitParameters()1760
bayesnet::Classifier::predict(at::Tensor&)1844
bayesnet::Classifier::Classifier(bayesnet::Network)2240
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.cc.func.html b/html/bayesnet/classifiers/Classifier.cc.func.html deleted file mode 100644 index 711837d..0000000 --- a/html/bayesnet/classifiers/Classifier.cc.func.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %126126
Test Date:2024-05-06 17:54:04Functions:100.0 %2424
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Classifier::Classifier(bayesnet::Network)2240
bayesnet::Classifier::addNodes()1576
bayesnet::Classifier::build(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&, at::Tensor const&)1760
bayesnet::Classifier::buildDataset(at::Tensor&)340
bayesnet::Classifier::checkFitParameters()1760
bayesnet::Classifier::dump_cpt[abi:cxx11]() const4
bayesnet::Classifier::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)128
bayesnet::Classifier::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)852
bayesnet::Classifier::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&, at::Tensor const&)660
bayesnet::Classifier::fit(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)136
bayesnet::Classifier::getClassNumStates() const348
bayesnet::Classifier::getNumberOfEdges() const332
bayesnet::Classifier::getNumberOfNodes() const332
bayesnet::Classifier::getNumberOfStates() const24
bayesnet::Classifier::predict(at::Tensor&)1844
bayesnet::Classifier::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)16
bayesnet::Classifier::predict_proba(at::Tensor&)1484
bayesnet::Classifier::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)548
bayesnet::Classifier::score(at::Tensor&, at::Tensor&)112
bayesnet::Classifier::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&)16
bayesnet::Classifier::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)92
bayesnet::Classifier::show[abi:cxx11]() const24
bayesnet::Classifier::topological_order[abi:cxx11]()4
bayesnet::Classifier::trainModel(at::Tensor const&)1576
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.cc.gcov.frameset.html b/html/bayesnet/classifiers/Classifier.cc.gcov.frameset.html deleted file mode 100644 index ced4c8c..0000000 --- a/html/bayesnet/classifiers/Classifier.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/Classifier.cc.gcov.html b/html/bayesnet/classifiers/Classifier.cc.gcov.html deleted file mode 100644 index 96d250b..0000000 --- a/html/bayesnet/classifiers/Classifier.cc.gcov.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %126126
Test Date:2024-05-06 17:54:04Functions:100.0 %2424
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      11              : namespace bayesnet {
-      12         2240 :     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         1760 :     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         1760 :         this->features = features;
-      17         1760 :         this->className = className;
-      18         1760 :         this->states = states;
-      19         1760 :         m = dataset.size(1);
-      20         1760 :         n = features.size();
-      21         1760 :         checkFitParameters();
-      22         1728 :         auto n_classes = states.at(className).size();
-      23         1728 :         metrics = Metrics(dataset, features, className, n_classes);
-      24         1728 :         model.initialize();
-      25         1728 :         buildModel(weights);
-      26         1728 :         trainModel(weights);
-      27         1712 :         fitted = true;
-      28         1712 :         return *this;
-      29              :     }
-      30          340 :     void Classifier::buildDataset(torch::Tensor& ytmp)
-      31              :     {
-      32              :         try {
-      33          340 :             auto yresized = torch::transpose(ytmp.view({ ytmp.size(0), 1 }), 0, 1);
-      34         1052 :             dataset = torch::cat({ dataset, yresized }, 0);
-      35          340 :         }
-      36           16 :         catch (const std::exception& e) {
-      37           16 :             std::stringstream oss;
-      38           16 :             oss << "* Error in X and y dimensions *\n";
-      39           16 :             oss << "X dimensions: " << dataset.sizes() << "\n";
-      40           16 :             oss << "y dimensions: " << ytmp.sizes();
-      41           16 :             throw std::runtime_error(oss.str());
-      42           32 :         }
-      43          680 :     }
-      44         1576 :     void Classifier::trainModel(const torch::Tensor& weights)
-      45              :     {
-      46         1576 :         model.fit(dataset, weights, features, className, states);
-      47         1576 :     }
-      48              :     // X is nxm where n is the number of features and m the number of samples
-      49          128 :     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          128 :         dataset = X;
-      52          128 :         buildDataset(y);
-      53          120 :         const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-      54          208 :         return build(features, className, states, weights);
-      55          120 :     }
-      56              :     // X is nxm where n is the number of features and m the number of samples
-      57          136 :     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          136 :         dataset = torch::zeros({ static_cast<int>(X.size()), static_cast<int>(X[0].size()) }, torch::kInt32);
-      60          976 :         for (int i = 0; i < X.size(); ++i) {
-      61         3360 :             dataset.index_put_({ i, "..." }, torch::tensor(X[i], torch::kInt32));
-      62              :         }
-      63          136 :         auto ytmp = torch::tensor(y, torch::kInt32);
-      64          136 :         buildDataset(ytmp);
-      65          128 :         const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-      66          240 :         return build(features, className, states, weights);
-      67          992 :     }
-      68          852 :     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          852 :         this->dataset = dataset;
-      71          852 :         const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);
-      72         1704 :         return build(features, className, states, weights);
-      73          852 :     }
-      74          660 :     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          660 :         this->dataset = dataset;
-      77          660 :         return build(features, className, states, weights);
-      78              :     }
-      79         1760 :     void Classifier::checkFitParameters()
-      80              :     {
-      81         1760 :         if (torch::is_floating_point(dataset)) {
-      82            8 :             throw std::invalid_argument("dataset (X, y) must be of type Integer");
-      83              :         }
-      84         1752 :         if (dataset.size(0) - 1 != features.size()) {
-      85            8 :             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         1744 :         if (states.find(className) == states.end()) {
-      88            8 :             throw std::invalid_argument("class name not found in states");
-      89              :         }
-      90        32996 :         for (auto feature : features) {
-      91        31268 :             if (states.find(feature) == states.end()) {
-      92            8 :                 throw std::invalid_argument("feature [" + feature + "] not found in states");
-      93              :             }
-      94        31268 :         }
-      95         1728 :     }
-      96         1844 :     torch::Tensor Classifier::predict(torch::Tensor& X)
-      97              :     {
-      98         1844 :         if (!fitted) {
-      99           16 :             throw std::logic_error(CLASSIFIER_NOT_FITTED);
-     100              :         }
-     101         1828 :         return model.predict(X);
-     102              :     }
-     103           16 :     std::vector<int> Classifier::predict(std::vector<std::vector<int>>& X)
-     104              :     {
-     105           16 :         if (!fitted) {
-     106            8 :             throw std::logic_error(CLASSIFIER_NOT_FITTED);
-     107              :         }
-     108            8 :         auto m_ = X[0].size();
-     109            8 :         auto n_ = X.size();
-     110            8 :         std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));
-     111           40 :         for (auto i = 0; i < n_; i++) {
-     112           64 :             Xd[i] = std::vector<int>(X[i].begin(), X[i].end());
-     113              :         }
-     114            8 :         auto yp = model.predict(Xd);
-     115           16 :         return yp;
-     116            8 :     }
-     117         1484 :     torch::Tensor Classifier::predict_proba(torch::Tensor& X)
-     118              :     {
-     119         1484 :         if (!fitted) {
-     120            8 :             throw std::logic_error(CLASSIFIER_NOT_FITTED);
-     121              :         }
-     122         1476 :         return model.predict_proba(X);
-     123              :     }
-     124          548 :     std::vector<std::vector<double>> Classifier::predict_proba(std::vector<std::vector<int>>& X)
-     125              :     {
-     126          548 :         if (!fitted) {
-     127            8 :             throw std::logic_error(CLASSIFIER_NOT_FITTED);
-     128              :         }
-     129          540 :         auto m_ = X[0].size();
-     130          540 :         auto n_ = X.size();
-     131          540 :         std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));
-     132              :         // Convert to nxm vector
-     133         5040 :         for (auto i = 0; i < n_; i++) {
-     134         9000 :             Xd[i] = std::vector<int>(X[i].begin(), X[i].end());
-     135              :         }
-     136          540 :         auto yp = model.predict_proba(Xd);
-     137         1080 :         return yp;
-     138          540 :     }
-     139          112 :     float Classifier::score(torch::Tensor& X, torch::Tensor& y)
-     140              :     {
-     141          112 :         torch::Tensor y_pred = predict(X);
-     142          208 :         return (y_pred == y).sum().item<float>() / y.size(0);
-     143          104 :     }
-     144           16 :     float Classifier::score(std::vector<std::vector<int>>& X, std::vector<int>& y)
-     145              :     {
-     146           16 :         if (!fitted) {
-     147            8 :             throw std::logic_error(CLASSIFIER_NOT_FITTED);
-     148              :         }
-     149            8 :         return model.score(X, y);
-     150              :     }
-     151           24 :     std::vector<std::string> Classifier::show() const
-     152              :     {
-     153           24 :         return model.show();
-     154              :     }
-     155         1576 :     void Classifier::addNodes()
-     156              :     {
-     157              :         // Add all nodes to the network
-     158        30872 :         for (const auto& feature : features) {
-     159        29296 :             model.addNode(feature);
-     160              :         }
-     161         1576 :         model.addNode(className);
-     162         1576 :     }
-     163          332 :     int Classifier::getNumberOfNodes() const
-     164              :     {
-     165              :         // Features does not include class
-     166          332 :         return fitted ? model.getFeatures().size() : 0;
-     167              :     }
-     168          332 :     int Classifier::getNumberOfEdges() const
-     169              :     {
-     170          332 :         return fitted ? model.getNumEdges() : 0;
-     171              :     }
-     172           24 :     int Classifier::getNumberOfStates() const
-     173              :     {
-     174           24 :         return fitted ? model.getStates() : 0;
-     175              :     }
-     176          348 :     int Classifier::getClassNumStates() const
-     177              :     {
-     178          348 :         return fitted ? model.getClassNumStates() : 0;
-     179              :     }
-     180            4 :     std::vector<std::string> Classifier::topological_order()
-     181              :     {
-     182            4 :         return model.topological_sort();
-     183              :     }
-     184            4 :     std::string Classifier::dump_cpt() const
-     185              :     {
-     186            4 :         return model.dump_cpt();
-     187              :     }
-     188           92 :     void Classifier::setHyperparameters(const nlohmann::json& hyperparameters)
-     189              :     {
-     190           92 :         if (!hyperparameters.empty()) {
-     191            8 :             throw std::invalid_argument("Invalid hyperparameters" + hyperparameters.dump());
-     192              :         }
-     193           84 :     }
-     194              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.cc.gcov.overview.html b/html/bayesnet/classifiers/Classifier.cc.gcov.overview.html deleted file mode 100644 index f6fa969..0000000 --- a/html/bayesnet/classifiers/Classifier.cc.gcov.overview.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/Classifier.cc.gcov.png b/html/bayesnet/classifiers/Classifier.cc.gcov.png deleted file mode 100644 index 5148c17383ab61be77bd63024e1da3aea30384c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 852 zcmV-a1FQUrP)k7 zR9J=WSqXB(APlsB;C#XQf%yO5YJ>#hKI}BjOiAk`o<&-nV6wgTS9@$cBH->W$8|mA z#*qLIHMuwxN8oBfBg)@32#9i92Fe}# zvQrI;M1_hzyDvx*@f;bOy$Cz2!wdkKSr@LU*}sprrFdZ0&v1P@R9TIyyh z&X~!Z;s`(;m^=s+9+HXZQUFPAsWnSfLU_zVYrgbMSUms?E0A7|_?k!b)Y-BaGSv*#uye%L)AEq)L<{%|IF1p1o-B6kzJUGEfE_K3nl;|=?Y)m6ho z_Vgv*E-n+**B50^R0lQSbaBN&PRAFy=X1pc#yy}nbpNd?EE9cG6=rc(&zUO{b!GET zr)i8*X#AA522g+2Q#$aAYDQ8TtJSdDQhcqX=R)(bE*=K0b5xD4I&1O}aHrR6Kisbw z)k8q(BH;5dk9+pSUSl~O>#o^Tek`=7I}+KC^m7F{)Bace82vsW1lD)WPa9L@SU4QJ z#W5?a`y5N>cYlpziRbMm#p52wlAIeHqebhfe5~`E=a}ypF?lz)4qbX1q(pf*DRJ*_ ecw!%eo#zjnwPqClXgALQ0000 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Classifier::getVersion[abi:cxx11]()32
bayesnet::Classifier::getNotes[abi:cxx11]() const80
bayesnet::Classifier::getStatus() const128
bayesnet::Classifier::~Classifier()1680
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.h.func.html b/html/bayesnet/classifiers/Classifier.h.func.html deleted file mode 100644 index bb4a025..0000000 --- a/html/bayesnet/classifiers/Classifier.h.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Classifier::getNotes[abi:cxx11]() const80
bayesnet::Classifier::getStatus() const128
bayesnet::Classifier::getVersion[abi:cxx11]()32
bayesnet::Classifier::~Classifier()1680
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.h.gcov.frameset.html b/html/bayesnet/classifiers/Classifier.h.gcov.frameset.html deleted file mode 100644 index 5ec80ed..0000000 --- a/html/bayesnet/classifiers/Classifier.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/Classifier.h.gcov.html b/html/bayesnet/classifiers/Classifier.h.gcov.html deleted file mode 100644 index 6d0578d..0000000 --- a/html/bayesnet/classifiers/Classifier.h.gcov.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Classifier.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      14              : namespace bayesnet {
-      15              :     class Classifier : public BaseClassifier {
-      16              :     public:
-      17              :         Classifier(Network model);
-      18         1680 :         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          128 :         status_t getStatus() const override { return status; }
-      33           96 :         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           80 :         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              : 
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Classifier.h.gcov.overview.html b/html/bayesnet/classifiers/Classifier.h.gcov.overview.html deleted file mode 100644 index 1810955..0000000 --- a/html/bayesnet/classifiers/Classifier.h.gcov.overview.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Classifier.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/Classifier.h.gcov.png b/html/bayesnet/classifiers/Classifier.h.gcov.png deleted file mode 100644 index aad5b614c1c20cf63cd39a4f086005bf0ed1caf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 453 zcmV;$0XqJPP)4l~ERiAP7Zc2e^gYf$o2AQ!0oG%FO5RQP#QQdq{Z&2>ZBN3?S4CK3Aj{IDsf8 zt1)Cmo__#$8r{LVPgB1ES*9D@>R&;lLMwRCdJNjW01mV@0C1)BS+;(4d2TZcx}V57 zr(7bH`>h0ljEac-D&^Rh#x4NGfW|6VpZW{7`vnNT%^S0UJ?9sYwCQ{02PfN9%7vD7 znF0sNYepmKoJRY3a8tzGu92GP9Yni(Iu}JFrQAT#W87SIkSJr-h^r`Ww(5K_1G}Q@ zj;|4BGo-8;D*|6bshXc%xB9H#S6h1gkxx5Cn;67q9%BFHPp;uD9AGUEQ1#kSfXDMl zf{w3nF8CHihx@gL^?)@%*`GBJ>4$9z(0x)4`* - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.3 %5452
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDB::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const8
bayesnet::KDB::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)12
bayesnet::KDB::buildModel(at::Tensor const&)52
bayesnet::KDB::KDB(int, float)148
bayesnet::KDB::add_m_edges(int, std::vector<int, std::allocator<int> >&, at::Tensor&)344
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.cc.func.html b/html/bayesnet/classifiers/KDB.cc.func.html deleted file mode 100644 index 2a880ae..0000000 --- a/html/bayesnet/classifiers/KDB.cc.func.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.3 %5452
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDB::KDB(int, float)148
bayesnet::KDB::add_m_edges(int, std::vector<int, std::allocator<int> >&, at::Tensor&)344
bayesnet::KDB::buildModel(at::Tensor const&)52
bayesnet::KDB::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const8
bayesnet::KDB::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)12
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.cc.gcov.frameset.html b/html/bayesnet/classifiers/KDB.cc.gcov.frameset.html deleted file mode 100644 index c87890b..0000000 --- a/html/bayesnet/classifiers/KDB.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/KDB.cc.gcov.html b/html/bayesnet/classifiers/KDB.cc.gcov.html deleted file mode 100644 index 910f3e9..0000000 --- a/html/bayesnet/classifiers/KDB.cc.gcov.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.3 %5452
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10          148 :     KDB::KDB(int k, float theta) : Classifier(Network()), k(k), theta(theta)
-      11              :     {
-      12          444 :         validHyperparameters = { "k", "theta" };
-      13              : 
-      14          444 :     }
-      15           12 :     void KDB::setHyperparameters(const nlohmann::json& hyperparameters_)
-      16              :     {
-      17           12 :         auto hyperparameters = hyperparameters_;
-      18           12 :         if (hyperparameters.contains("k")) {
-      19            4 :             k = hyperparameters["k"];
-      20            4 :             hyperparameters.erase("k");
-      21              :         }
-      22           12 :         if (hyperparameters.contains("theta")) {
-      23            4 :             theta = hyperparameters["theta"];
-      24            4 :             hyperparameters.erase("theta");
-      25              :         }
-      26           12 :         Classifier::setHyperparameters(hyperparameters);
-      27           12 :     }
-      28           52 :     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           52 :         addNodes();
-      52          156 :         const torch::Tensor& y = dataset.index({ -1, "..." });
-      53           52 :         std::vector<double> mi;
-      54          396 :         for (auto i = 0; i < features.size(); i++) {
-      55         1032 :             torch::Tensor firstFeature = dataset.index({ i, "..." });
-      56          344 :             mi.push_back(metrics.mutualInformation(firstFeature, y, weights));
-      57          344 :         }
-      58              :         // 2. Compute class conditional mutual information I(Xi;XjIC), f or each
-      59           52 :         auto conditionalEdgeWeights = metrics.conditionalEdge(weights);
-      60              :         // 3. Let the used variable list, S, be empty.
-      61           52 :         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           52 :         auto order = argsort(mi);
-      68          396 :         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          344 :             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          344 :             add_m_edges(idx, S, conditionalEdgeWeights);
-      75              :             // 5.5. Add Xmax to S.
-      76          344 :             S.push_back(idx);
-      77              :         }
-      78          448 :     }
-      79          344 :     void KDB::add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights)
-      80              :     {
-      81          344 :         auto n_edges = std::min(k, static_cast<int>(S.size()));
-      82          344 :         auto cond_w = clone(weights);
-      83          344 :         bool exit_cond = k == 0;
-      84          344 :         int num = 0;
-      85         1004 :         while (!exit_cond) {
-      86         2640 :             auto max_minfo = argmax(cond_w.index({ idx, "..." })).item<int>();
-      87          660 :             auto belongs = find(S.begin(), S.end(), max_minfo) != S.end();
-      88         1764 :             if (belongs && cond_w.index({ idx, max_minfo }).item<float>() > theta) {
-      89              :                 try {
-      90          320 :                     model.addEdge(features[max_minfo], features[idx]);
-      91          320 :                     num++;
-      92              :                 }
-      93            0 :                 catch (const std::invalid_argument& e) {
-      94              :                     // Loops are not allowed
-      95            0 :                 }
-      96              :             }
-      97         2640 :             cond_w.index_put_({ idx, max_minfo }, -1);
-      98         1980 :             auto candidates_mask = cond_w.index({ idx, "..." }).gt(theta);
-      99          660 :             auto candidates = candidates_mask.nonzero();
-     100          660 :             exit_cond = num == n_edges || candidates.size(0) == 0;
-     101          660 :         }
-     102         2692 :     }
-     103            8 :     std::vector<std::string> KDB::graph(const std::string& title) const
-     104              :     {
-     105            8 :         std::string header{ title };
-     106            8 :         if (title == "KDB") {
-     107            8 :             header += " (k=" + std::to_string(k) + ", theta=" + std::to_string(theta) + ")";
-     108              :         }
-     109           16 :         return model.graph(header);
-     110            8 :     }
-     111              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.cc.gcov.overview.html b/html/bayesnet/classifiers/KDB.cc.gcov.overview.html deleted file mode 100644 index 4ee7aca..0000000 --- a/html/bayesnet/classifiers/KDB.cc.gcov.overview.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/KDB.cc.gcov.png b/html/bayesnet/classifiers/KDB.cc.gcov.png deleted file mode 100644 index 1e8717528aa9f23720a7ec9fed3f022317b5778a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 814 zcmV+}1JV46P)Soscaz?j^7mFBT)oyidrfIH#z_t@E`xYoPudGGD9 zyUT}r99RW>*A(>DH&xtcgaO;0L?gGdyhnSxRNE2YrjmlcJ8I05=I8(| z#%R&?jFIa?IXSro#^ghZ0$BUN}5cc*ninQQ4DDhL(dr4QM)NWJOb+m^0f(PKl`09>R;_vje7IWwB%D(AY}@`$sVRdI{7NHQS-(`5t{R$IwM?&N=(>$VT%OcLdN@sKO$+YIQay(i6^)8pV! s$jXCHUIzs07*qoM6N<$g7u4utpET3 diff --git a/html/bayesnet/classifiers/KDB.h.func-c.html b/html/bayesnet/classifiers/KDB.h.func-c.html deleted file mode 100644 index 6c28413..0000000 --- a/html/bayesnet/classifiers/KDB.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDB::~KDB()44
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.h.func.html b/html/bayesnet/classifiers/KDB.h.func.html deleted file mode 100644 index 76df4e6..0000000 --- a/html/bayesnet/classifiers/KDB.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDB::~KDB()44
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.h.gcov.frameset.html b/html/bayesnet/classifiers/KDB.h.gcov.frameset.html deleted file mode 100644 index a03d09b..0000000 --- a/html/bayesnet/classifiers/KDB.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/KDB.h.gcov.html b/html/bayesnet/classifiers/KDB.h.gcov.html deleted file mode 100644 index b054798..0000000 --- a/html/bayesnet/classifiers/KDB.h.gcov.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDB.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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"
-      12              : namespace 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           44 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDB.h.gcov.overview.html b/html/bayesnet/classifiers/KDB.h.gcov.overview.html deleted file mode 100644 index 346dd56..0000000 --- a/html/bayesnet/classifiers/KDB.h.gcov.overview.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDB.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/KDB.h.gcov.png b/html/bayesnet/classifiers/KDB.h.gcov.png deleted file mode 100644 index 835cfa8a165580ddc4862ec2e7f3119abe6aa75f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIx!VDxO7l;}HDTx4|5ZC|z|E~gq##|=FrKS`~8>?jhwK>H7SoD0wN - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDBLd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::KDBLd::predict(at::Tensor&)16
bayesnet::KDBLd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::KDBLd::KDBLd(int)68
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.cc.func.html b/html/bayesnet/classifiers/KDBLd.cc.func.html deleted file mode 100644 index 3a04439..0000000 --- a/html/bayesnet/classifiers/KDBLd.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDBLd::KDBLd(int)68
bayesnet::KDBLd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::KDBLd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::KDBLd::predict(at::Tensor&)16
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.cc.gcov.frameset.html b/html/bayesnet/classifiers/KDBLd.cc.gcov.frameset.html deleted file mode 100644 index 8f6d341..0000000 --- a/html/bayesnet/classifiers/KDBLd.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/KDBLd.cc.gcov.html b/html/bayesnet/classifiers/KDBLd.cc.gcov.html deleted file mode 100644 index 0375be3..0000000 --- a/html/bayesnet/classifiers/KDBLd.cc.gcov.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10           68 :     KDBLd::KDBLd(int k) : KDB(k), Proposal(dataset, features, className) {}
-      11           20 :     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           20 :         checkInput(X_, y_);
-      14           20 :         features = features_;
-      15           20 :         className = className_;
-      16           20 :         Xf = X_;
-      17           20 :         y = y_;
-      18              :         // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-      19           20 :         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           20 :         KDB::fit(dataset, features, className, states);
-      23           20 :         states = localDiscretizationProposal(states, model);
-      24           20 :         return *this;
-      25              :     }
-      26           16 :     torch::Tensor KDBLd::predict(torch::Tensor& X)
-      27              :     {
-      28           16 :         auto Xt = prepareX(X);
-      29           32 :         return KDB::predict(Xt);
-      30           16 :     }
-      31            4 :     std::vector<std::string> KDBLd::graph(const std::string& name) const
-      32              :     {
-      33            4 :         return KDB::graph(name);
-      34              :     }
-      35              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.cc.gcov.overview.html b/html/bayesnet/classifiers/KDBLd.cc.gcov.overview.html deleted file mode 100644 index 93ed692..0000000 --- a/html/bayesnet/classifiers/KDBLd.cc.gcov.overview.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/KDBLd.cc.gcov.png b/html/bayesnet/classifiers/KDBLd.cc.gcov.png deleted file mode 100644 index 286a27019b0764dc207924edb2c64e4ed899a1d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 333 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$G!VDxoc24*Rq$C1-LR|m<|Gx?dmcNgUef6J# zVHHpuOr7)IycEdhEbxddW?X?_wfUrhg10?g978O6*G}o?Wme>9>*p@~=`U{-dVK__4IDYRQ>Qh2|dl8L&3VDY`$$WP-{}O-+TDcaqowpivPZJFWsFMQJ!R16nb6soYp`3$N2cq|1sI} Y2M^EZc3bCp7U)d|Pgg&ebxsLQ02nokZ2$lO diff --git a/html/bayesnet/classifiers/KDBLd.h.func-c.html b/html/bayesnet/classifiers/KDBLd.h.func-c.html deleted file mode 100644 index ca49f19..0000000 --- a/html/bayesnet/classifiers/KDBLd.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDBLd::~KDBLd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.h.func.html b/html/bayesnet/classifiers/KDBLd.h.func.html deleted file mode 100644 index ca196e4..0000000 --- a/html/bayesnet/classifiers/KDBLd.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::KDBLd::~KDBLd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.h.gcov.frameset.html b/html/bayesnet/classifiers/KDBLd.h.gcov.frameset.html deleted file mode 100644 index 82ae19e..0000000 --- a/html/bayesnet/classifiers/KDBLd.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/KDBLd.h.gcov.html b/html/bayesnet/classifiers/KDBLd.h.gcov.html deleted file mode 100644 index df42bea..0000000 --- a/html/bayesnet/classifiers/KDBLd.h.gcov.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - KDBLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      12              : namespace bayesnet {
-      13              :     class KDBLd : public KDB, public Proposal {
-      14              :     private:
-      15              :     public:
-      16              :         explicit KDBLd(int k);
-      17           20 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/KDBLd.h.gcov.overview.html b/html/bayesnet/classifiers/KDBLd.h.gcov.overview.html deleted file mode 100644 index 531b1ee..0000000 --- a/html/bayesnet/classifiers/KDBLd.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/KDBLd.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/KDBLd.h.gcov.png b/html/bayesnet/classifiers/KDBLd.h.gcov.png deleted file mode 100644 index d6405077fd60f86a990aa36ffd06cdaa68da103a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIl!VDzmo21VNaRPioT>t<7zX}MJzmJW5^`C)Z z6;K>Zo%7zj6v*Z*@Q5sCVBk9f!i-b3`J{n@(>+}rLo_DNoz%#CK!Jm$w7I->m*dU) z?MbXhj)h(F&+4%J`g?+x-hHn{oM&no*I(eZaoBO#+t>Wix%>nA{fV7>zpMXmNGd+8 zC9!qa^tRX{hE#zK&rFpgB>9$0ai!nUZ2rtAtD|J~b8%F3sm{^_=e)U5_gZr&+uEL8 z_pPh@j32-JE($l}_s0eToyg$n>gTe~DWM4f DrkG_O diff --git a/html/bayesnet/classifiers/Proposal.cc.func-c.html b/html/bayesnet/classifiers/Proposal.cc.func-c.html deleted file mode 100644 index b6fcac4..0000000 --- a/html/bayesnet/classifiers/Proposal.cc.func-c.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Proposal.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Proposal.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.7 %8684
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Proposal::prepareX(at::Tensor&)168
bayesnet::Proposal::~Proposal()200
bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)212
bayesnet::Proposal::checkInput(at::Tensor const&, at::Tensor const&)228
bayesnet::Proposal::fit_local_discretization[abi:cxx11](at::Tensor const&)232
bayesnet::Proposal::Proposal(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)424
auto bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)::{lambda(auto:1 const&)#2}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const1372
auto bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const2696
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Proposal.cc.func.html b/html/bayesnet/classifiers/Proposal.cc.func.html deleted file mode 100644 index 01294d6..0000000 --- a/html/bayesnet/classifiers/Proposal.cc.func.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Proposal.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Proposal.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.7 %8684
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
auto bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const2696
auto bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)::{lambda(auto:1 const&)#2}::operator()<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const1372
bayesnet::Proposal::Proposal(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)424
bayesnet::Proposal::checkInput(at::Tensor const&, at::Tensor const&)228
bayesnet::Proposal::fit_local_discretization[abi:cxx11](at::Tensor const&)232
bayesnet::Proposal::localDiscretizationProposal(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, bayesnet::Network&)212
bayesnet::Proposal::prepareX(at::Tensor&)168
bayesnet::Proposal::~Proposal()200
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Proposal.cc.gcov.frameset.html b/html/bayesnet/classifiers/Proposal.cc.gcov.frameset.html deleted file mode 100644 index 5eb6be5..0000000 --- a/html/bayesnet/classifiers/Proposal.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Proposal.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/Proposal.cc.gcov.html b/html/bayesnet/classifiers/Proposal.cc.gcov.html deleted file mode 100644 index fa0ef3f..0000000 --- a/html/bayesnet/classifiers/Proposal.cc.gcov.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Proposal.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - Proposal.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.7 %8684
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include <ArffFiles.h>
-       8              : #include "Proposal.h"
-       9              : 
-      10              : namespace bayesnet {
-      11          424 :     Proposal::Proposal(torch::Tensor& dataset_, std::vector<std::string>& features_, std::string& className_) : pDataset(dataset_), pFeatures(features_), pClassName(className_) {}
-      12          200 :     Proposal::~Proposal()
-      13              :     {
-      14         1896 :         for (auto& [key, value] : discretizers) {
-      15         1696 :             delete value;
-      16              :         }
-      17          200 :     }
-      18          228 :     void Proposal::checkInput(const torch::Tensor& X, const torch::Tensor& y)
-      19              :     {
-      20          228 :         if (!torch::is_floating_point(X)) {
-      21            0 :             throw std::invalid_argument("X must be a floating point tensor");
-      22              :         }
-      23          228 :         if (torch::is_floating_point(y)) {
-      24            0 :             throw std::invalid_argument("y must be an integer tensor");
-      25              :         }
-      26          228 :     }
-      27          212 :     map<std::string, std::vector<int>> Proposal::localDiscretizationProposal(const map<std::string, std::vector<int>>& oldStates, Network& model)
-      28              :     {
-      29              :         // order of local discretization is important. no good 0, 1, 2...
-      30              :         // although we rediscretize features after the local discretization of every feature
-      31          212 :         auto order = model.topological_sort();
-      32          212 :         auto& nodes = model.getNodes();
-      33          212 :         map<std::string, std::vector<int>> states = oldStates;
-      34          212 :         std::vector<int> indicesToReDiscretize;
-      35          212 :         bool upgrade = false; // Flag to check if we need to upgrade the model
-      36         1776 :         for (auto feature : order) {
-      37         1564 :             auto nodeParents = nodes[feature]->getParents();
-      38         1564 :             if (nodeParents.size() < 2) continue; // Only has class as parent
-      39         1324 :             upgrade = true;
-      40         1324 :             int index = find(pFeatures.begin(), pFeatures.end(), feature) - pFeatures.begin();
-      41         1324 :             indicesToReDiscretize.push_back(index); // We need to re-discretize this feature
-      42         1324 :             std::vector<std::string> parents;
-      43         4020 :             transform(nodeParents.begin(), nodeParents.end(), back_inserter(parents), [](const auto& p) { return p->getName(); });
-      44              :             // Remove class as parent as it will be added later
-      45         1324 :             parents.erase(remove(parents.begin(), parents.end(), pClassName), parents.end());
-      46              :             // Get the indices of the parents
-      47         1324 :             std::vector<int> indices;
-      48         1324 :             indices.push_back(-1); // Add class index
-      49         2696 :             transform(parents.begin(), parents.end(), back_inserter(indices), [&](const auto& p) {return find(pFeatures.begin(), pFeatures.end(), p) - pFeatures.begin(); });
-      50              :             // Now we fit the discretizer of the feature, conditioned on its parents and the class i.e. discretizer.fit(X[index], X[indices] + y)
-      51         1324 :             std::vector<std::string> yJoinParents(Xf.size(1));
-      52         4020 :             for (auto idx : indices) {
-      53       958640 :                 for (int i = 0; i < Xf.size(1); ++i) {
-      54      2867832 :                     yJoinParents[i] += to_string(pDataset.index({ idx, i }).item<int>());
-      55              :                 }
-      56              :             }
-      57         1324 :             auto arff = ArffFiles();
-      58         1324 :             auto yxv = arff.factorize(yJoinParents);
-      59         2648 :             auto xvf_ptr = Xf.index({ index }).data_ptr<float>();
-      60         1324 :             auto xvf = std::vector<mdlp::precision_t>(xvf_ptr, xvf_ptr + Xf.size(1));
-      61         1324 :             discretizers[feature]->fit(xvf, yxv);
-      62         1804 :         }
-      63          212 :         if (upgrade) {
-      64              :             // Discretize again X (only the affected indices) with the new fitted discretizers
-      65         1536 :             for (auto index : indicesToReDiscretize) {
-      66         2648 :                 auto Xt_ptr = Xf.index({ index }).data_ptr<float>();
-      67         1324 :                 auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));
-      68         5296 :                 pDataset.index_put_({ index, "..." }, torch::tensor(discretizers[pFeatures[index]]->transform(Xt)));
-      69         1324 :                 auto xStates = std::vector<int>(discretizers[pFeatures[index]]->getCutPoints().size() + 1);
-      70         1324 :                 iota(xStates.begin(), xStates.end(), 0);
-      71              :                 //Update new states of the feature/node
-      72         1324 :                 states[pFeatures[index]] = xStates;
-      73         1324 :             }
-      74          212 :             const torch::Tensor weights = torch::full({ pDataset.size(1) }, 1.0 / pDataset.size(1), torch::kDouble);
-      75          212 :             model.fit(pDataset, weights, pFeatures, pClassName, states);
-      76          212 :         }
-      77          424 :         return states;
-      78       960128 :     }
-      79          232 :     map<std::string, std::vector<int>> Proposal::fit_local_discretization(const torch::Tensor& y)
-      80              :     {
-      81              :         // Discretize the continuous input data and build pDataset (Classifier::dataset)
-      82          232 :         int m = Xf.size(1);
-      83          232 :         int n = Xf.size(0);
-      84          232 :         map<std::string, std::vector<int>> states;
-      85          232 :         pDataset = torch::zeros({ n + 1, m }, torch::kInt32);
-      86          232 :         auto yv = std::vector<int>(y.data_ptr<int>(), y.data_ptr<int>() + y.size(0));
-      87              :         // discretize input data by feature(row)
-      88         1944 :         for (auto i = 0; i < pFeatures.size(); ++i) {
-      89         1712 :             auto* discretizer = new mdlp::CPPFImdlp();
-      90         3424 :             auto Xt_ptr = Xf.index({ i }).data_ptr<float>();
-      91         1712 :             auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));
-      92         1712 :             discretizer->fit(Xt, yv);
-      93         6848 :             pDataset.index_put_({ i, "..." }, torch::tensor(discretizer->transform(Xt)));
-      94         1712 :             auto xStates = std::vector<int>(discretizer->getCutPoints().size() + 1);
-      95         1712 :             iota(xStates.begin(), xStates.end(), 0);
-      96         1712 :             states[pFeatures[i]] = xStates;
-      97         1712 :             discretizers[pFeatures[i]] = discretizer;
-      98         1712 :         }
-      99          232 :         int n_classes = torch::max(y).item<int>() + 1;
-     100          232 :         auto yStates = std::vector<int>(n_classes);
-     101          232 :         iota(yStates.begin(), yStates.end(), 0);
-     102          232 :         states[pClassName] = yStates;
-     103          696 :         pDataset.index_put_({ n, "..." }, y);
-     104          464 :         return states;
-     105         3888 :     }
-     106          168 :     torch::Tensor Proposal::prepareX(torch::Tensor& X)
-     107              :     {
-     108          168 :         auto Xtd = torch::zeros_like(X, torch::kInt32);
-     109         1376 :         for (int i = 0; i < X.size(0); ++i) {
-     110         1208 :             auto Xt = std::vector<float>(X[i].data_ptr<float>(), X[i].data_ptr<float>() + X.size(1));
-     111         1208 :             auto Xd = discretizers[pFeatures[i]]->transform(Xt);
-     112         3624 :             Xtd.index_put_({ i }, torch::tensor(Xd, torch::kInt32));
-     113         1208 :         }
-     114          336 :         return Xtd;
-     115         1376 :     }
-     116              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/Proposal.cc.gcov.overview.html b/html/bayesnet/classifiers/Proposal.cc.gcov.overview.html deleted file mode 100644 index 143a658..0000000 --- a/html/bayesnet/classifiers/Proposal.cc.gcov.overview.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/Proposal.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/Proposal.cc.gcov.png b/html/bayesnet/classifiers/Proposal.cc.gcov.png deleted file mode 100644 index fdaf4ea45e424d2f52bbf0722514da9881adc31c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 796 zcmV+%1LOROP)NTI|IM( zvACv#=VRaW_hP%Z#s$+02}jSGg_L=XnGT6v`$1!*tnnlL@0E6$h6j-mdAXMhKHEzk zbJr@@I<>yr1ei~*(+F(i#`gw5M{D&lI|*q8*<)U%|8%V^gox(6jyMGii`ihR(gG_W z1e__iX()>bg4eg*hiVc~B{GU36;MajXazE11C1C57~JCc8acG;jfk2fWScU)u8%xT z@UChMrCv~KH1g38#5WzV9_9tl$6zBiK0>K&$#ro;+;tMp;?^3g?Kk8`iyInJivig) zFKl(me%q0ryP1Kb!Gg15Vy`B%fg87@u>$+VGC<-WsG`7FBWGVmZN7F0xw5+w{X4V7 z_{d?DqLX_NsrOY==o!$dwVa+o^;!#5`qWWG14V9dluFU2{iIu<)L2Y+g28D`%reDs zG@=8hTnHQ&k(&alg8L1y&E7gwL}Ouqr~*odfh@_GZsGW((|v>}f1@ z=^T*azl@Zo4chdq{4UhHb<5RLR7RY68e%c9$LtvE^cVsgjZ~UCA2jqA!+wCC&*L2I aJbwUJ2Do1V!-pXN0000 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1010
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const68
bayesnet::SPODE::buildModel(at::Tensor const&)1016
bayesnet::SPODE::SPODE(int)1124
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.cc.func.html b/html/bayesnet/classifiers/SPODE.cc.func.html deleted file mode 100644 index 87e8648..0000000 --- a/html/bayesnet/classifiers/SPODE.cc.func.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1010
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODE::SPODE(int)1124
bayesnet::SPODE::buildModel(at::Tensor const&)1016
bayesnet::SPODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const68
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.cc.gcov.frameset.html b/html/bayesnet/classifiers/SPODE.cc.gcov.frameset.html deleted file mode 100644 index 76bbdb6..0000000 --- a/html/bayesnet/classifiers/SPODE.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPODE.cc.gcov.html b/html/bayesnet/classifiers/SPODE.cc.gcov.html deleted file mode 100644 index c596c09..0000000 --- a/html/bayesnet/classifiers/SPODE.cc.gcov.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1010
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10              : 
-      11         1124 :     SPODE::SPODE(int root) : Classifier(Network()), root(root) {}
-      12              : 
-      13         1016 :     void SPODE::buildModel(const torch::Tensor& weights)
-      14              :     {
-      15              :         // 0. Add all nodes to the model
-      16         1016 :         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        25680 :         for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-      20        24664 :             model.addEdge(className, features[i]);
-      21        24664 :             if (i != root) {
-      22        23648 :                 model.addEdge(features[root], features[i]);
-      23              :             }
-      24              :         }
-      25         1016 :     }
-      26           68 :     std::vector<std::string> SPODE::graph(const std::string& name) const
-      27              :     {
-      28           68 :         return model.graph(name);
-      29              :     }
-      30              : 
-      31              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.cc.gcov.overview.html b/html/bayesnet/classifiers/SPODE.cc.gcov.overview.html deleted file mode 100644 index b38cc57..0000000 --- a/html/bayesnet/classifiers/SPODE.cc.gcov.overview.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPODE.cc.gcov.png b/html/bayesnet/classifiers/SPODE.cc.gcov.png deleted file mode 100644 index b891cfebdadff1846452c9e6c49fe2a03de19d14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIz!VDyv48zrdlth3}i0l9V|5pLQ^7pZ^ul_SI ztOAOIsdL_&mjc zt%ddpO!c?oR`lxaha4pdHZJ|@h!u*+?EU+8(kN;M;`RmBdLwj23{ULEn-xLNR=OOj^SQm2pe z+)^)`Hi`Cbu93cNzH6;(cgM`d?m_9ZAOFz*mBTYJqWjj2kF&o1$q{PZ!5_ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODE::~SPODE()1836
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.h.func.html b/html/bayesnet/classifiers/SPODE.h.func.html deleted file mode 100644 index 2a850e6..0000000 --- a/html/bayesnet/classifiers/SPODE.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODE::~SPODE()1836
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.h.gcov.frameset.html b/html/bayesnet/classifiers/SPODE.h.gcov.frameset.html deleted file mode 100644 index 5bab82c..0000000 --- a/html/bayesnet/classifiers/SPODE.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPODE.h.gcov.html b/html/bayesnet/classifiers/SPODE.h.gcov.html deleted file mode 100644 index 7cf5fc8..0000000 --- a/html/bayesnet/classifiers/SPODE.h.gcov.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      11              : namespace 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         1836 :         virtual ~SPODE() = default;
-      20              :         std::vector<std::string> graph(const std::string& name = "SPODE") const override;
-      21              :     };
-      22              : }
-      23              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODE.h.gcov.overview.html b/html/bayesnet/classifiers/SPODE.h.gcov.overview.html deleted file mode 100644 index 1142d9b..0000000 --- a/html/bayesnet/classifiers/SPODE.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODE.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPODE.h.gcov.png b/html/bayesnet/classifiers/SPODE.h.gcov.png deleted file mode 100644 index 79e3825d7216994c1d6a3a382a236b38235bb50b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIy!VDzylCF9IDTx4|5ZC|z|E~gq?fWOq)j89*t)pvaQm~EML zG-;i2z)X%3&H&Mv8KGXcLZrOA9COoN$*xWn=i^(v;yDYOpz1x5WV=>ft3ZMF8C81g i@7!2+-i9-bKR!`F=FNlTcOgLMFnGH9xvX - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %66
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODELd::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)8
bayesnet::SPODELd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const36
bayesnet::SPODELd::predict(at::Tensor&)136
bayesnet::SPODELd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)168
bayesnet::SPODELd::commonFit(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)172
bayesnet::SPODELd::SPODELd(int)220
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.cc.func.html b/html/bayesnet/classifiers/SPODELd.cc.func.html deleted file mode 100644 index 217c3a2..0000000 --- a/html/bayesnet/classifiers/SPODELd.cc.func.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %66
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODELd::SPODELd(int)220
bayesnet::SPODELd::commonFit(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)172
bayesnet::SPODELd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)168
bayesnet::SPODELd::fit(at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)8
bayesnet::SPODELd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const36
bayesnet::SPODELd::predict(at::Tensor&)136
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.cc.gcov.frameset.html b/html/bayesnet/classifiers/SPODELd.cc.gcov.frameset.html deleted file mode 100644 index 04b5f98..0000000 --- a/html/bayesnet/classifiers/SPODELd.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPODELd.cc.gcov.html b/html/bayesnet/classifiers/SPODELd.cc.gcov.html deleted file mode 100644 index 29421e0..0000000 --- a/html/bayesnet/classifiers/SPODELd.cc.gcov.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %66
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10          220 :     SPODELd::SPODELd(int root) : SPODE(root), Proposal(dataset, features, className) {}
-      11          168 :     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          168 :         checkInput(X_, y_);
-      14          168 :         Xf = X_;
-      15          168 :         y = y_;
-      16          168 :         return commonFit(features_, className_, states_);
-      17              :     }
-      18              : 
-      19            8 :     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            8 :         if (!torch::is_floating_point(dataset)) {
-      22            4 :             throw std::runtime_error("Dataset must be a floating point tensor");
-      23              :         }
-      24           16 :         Xf = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." }).clone();
-      25           12 :         y = dataset.index({ -1, "..." }).clone().to(torch::kInt32);
-      26            4 :         return commonFit(features_, className_, states_);
-      27           12 :     }
-      28              : 
-      29          172 :     SPODELd& SPODELd::commonFit(const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)
-      30              :     {
-      31          172 :         features = features_;
-      32          172 :         className = className_;
-      33              :         // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-      34          172 :         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          172 :         SPODE::fit(dataset, features, className, states);
-      38          172 :         states = localDiscretizationProposal(states, model);
-      39          172 :         return *this;
-      40              :     }
-      41          136 :     torch::Tensor SPODELd::predict(torch::Tensor& X)
-      42              :     {
-      43          136 :         auto Xt = prepareX(X);
-      44          272 :         return SPODE::predict(Xt);
-      45          136 :     }
-      46           36 :     std::vector<std::string> SPODELd::graph(const std::string& name) const
-      47              :     {
-      48           36 :         return SPODE::graph(name);
-      49              :     }
-      50              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.cc.gcov.overview.html b/html/bayesnet/classifiers/SPODELd.cc.gcov.overview.html deleted file mode 100644 index 431ffcf..0000000 --- a/html/bayesnet/classifiers/SPODELd.cc.gcov.overview.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPODELd.cc.gcov.png b/html/bayesnet/classifiers/SPODELd.cc.gcov.png deleted file mode 100644 index a623770a0ec0c241e0123d9b4bfd40cc91eecc1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfT!VDxWnH|pqDTx4|5ZC|z|E~gq# z;ruYZ;d<$6$0~*YPLWQMTmtW|IXv@_DD!gIQ+DR!0vB$1wq=uZ4VBjIcyle3*DOo7 zAo$F--p3W!8N{r67OS4IswzLeK2LrYri^V=a8jSu{!HC0pE$UvUe_HIB{K|k~d&=`{Rt)k33@}0yP?MvLCn; zR`X@$+9mq6mmaSy{CPq+FZu1>JSmTrpBl3&uIa7iX;>{G_Mj|{P4e95_dQ2AgP!Cc vSa$B&0cS(gGB=s&r`Zkv+dTgB{>m->n~guqXMUIg3U&rhS3j3^P6 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODELd::~SPODELd()320
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.h.func.html b/html/bayesnet/classifiers/SPODELd.h.func.html deleted file mode 100644 index ae57f22..0000000 --- a/html/bayesnet/classifiers/SPODELd.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPODELd::~SPODELd()320
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.h.gcov.frameset.html b/html/bayesnet/classifiers/SPODELd.h.gcov.frameset.html deleted file mode 100644 index 2dfdfd0..0000000 --- a/html/bayesnet/classifiers/SPODELd.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPODELd.h.gcov.html b/html/bayesnet/classifiers/SPODELd.h.gcov.html deleted file mode 100644 index fd1f83a..0000000 --- a/html/bayesnet/classifiers/SPODELd.h.gcov.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      12              : namespace bayesnet {
-      13              :     class SPODELd : public SPODE, public Proposal {
-      14              :     public:
-      15              :         explicit SPODELd(int root);
-      16          320 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPODELd.h.gcov.overview.html b/html/bayesnet/classifiers/SPODELd.h.gcov.overview.html deleted file mode 100644 index b271338..0000000 --- a/html/bayesnet/classifiers/SPODELd.h.gcov.overview.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPODELd.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPODELd.h.gcov.png b/html/bayesnet/classifiers/SPODELd.h.gcov.png deleted file mode 100644 index 569995f9f0999faa06fe3fcb6cc293f3a72c9dfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIt!VDxsGPYO&DTx4|5ZC|z|E~gqM z_YU^(oqVhPQ^|vtT%SLEYZoX6#R-JJV6;+N^+a)2*M>i=AAJ`~ud4p{j6Z4GOSN^` zRtwLj6$PxHxX@>f$HCx}?3Lf!Gv;k^?>M2zsko#--mz0?$%6|YxZdojz7=&~ZDfc1 zk$3kd_1w7ga!ry$rMs((ue|irysc3uZ^cy~eVMpD-RHuh51eLKR78n diff --git a/html/bayesnet/classifiers/SPnDE.cc.func-c.html b/html/bayesnet/classifiers/SPnDE.cc.func-c.html deleted file mode 100644 index 79a9fb1..0000000 --- a/html/bayesnet/classifiers/SPnDE.cc.func-c.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1414
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPnDE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const24
bayesnet::SPnDE::SPnDE(std::vector<int, std::allocator<int> >)456
bayesnet::SPnDE::buildModel(at::Tensor const&)456
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.cc.func.html b/html/bayesnet/classifiers/SPnDE.cc.func.html deleted file mode 100644 index 3e2fd7a..0000000 --- a/html/bayesnet/classifiers/SPnDE.cc.func.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1414
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPnDE::SPnDE(std::vector<int, std::allocator<int> >)456
bayesnet::SPnDE::buildModel(at::Tensor const&)456
bayesnet::SPnDE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const24
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.cc.gcov.frameset.html b/html/bayesnet/classifiers/SPnDE.cc.gcov.frameset.html deleted file mode 100644 index f62ea4c..0000000 --- a/html/bayesnet/classifiers/SPnDE.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPnDE.cc.gcov.html b/html/bayesnet/classifiers/SPnDE.cc.gcov.html deleted file mode 100644 index 958f687..0000000 --- a/html/bayesnet/classifiers/SPnDE.cc.gcov.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1414
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10              : 
-      11          456 :     SPnDE::SPnDE(std::vector<int> parents) : Classifier(Network()), parents(parents) {}
-      12              : 
-      13          456 :     void SPnDE::buildModel(const torch::Tensor& weights)
-      14              :     {
-      15              :         // 0. Add all nodes to the model
-      16          456 :         addNodes();
-      17          456 :         std::vector<int> attributes;
-      18         4440 :         for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-      19         3984 :             if (std::find(parents.begin(), parents.end(), i) == parents.end()) {
-      20         3072 :                 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         3528 :         for (const auto& attribute : attributes) {
-      26         3072 :             model.addEdge(className, features[attribute]);
-      27         9216 :             for (const auto& root : parents) {
-      28              : 
-      29         6144 :                 model.addEdge(features[root], features[attribute]);
-      30              :             }
-      31              :         }
-      32          456 :     }
-      33           24 :     std::vector<std::string> SPnDE::graph(const std::string& name) const
-      34              :     {
-      35           24 :         return model.graph(name);
-      36              :     }
-      37              : 
-      38              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.cc.gcov.overview.html b/html/bayesnet/classifiers/SPnDE.cc.gcov.overview.html deleted file mode 100644 index 9aebe7f..0000000 --- a/html/bayesnet/classifiers/SPnDE.cc.gcov.overview.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPnDE.cc.gcov.png b/html/bayesnet/classifiers/SPnDE.cc.gcov.png deleted file mode 100644 index de6281b1dbccad73dd982215dc8fe792ab040f34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$A!VDxAx-dEcDTx4|5ZC|z|E~gqQr>H(N^-`2d%9+*vLS*r`{EpSeyB5mzS%-JY zxc->>=<^aj5AFudB~v=>HY8ov|Gp-<<3(`FbHz*7m47!n&7HBb% - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPnDE::~SPnDE()912
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.h.func.html b/html/bayesnet/classifiers/SPnDE.h.func.html deleted file mode 100644 index d504556..0000000 --- a/html/bayesnet/classifiers/SPnDE.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::SPnDE::~SPnDE()912
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.h.gcov.frameset.html b/html/bayesnet/classifiers/SPnDE.h.gcov.frameset.html deleted file mode 100644 index 9d7e330..0000000 --- a/html/bayesnet/classifiers/SPnDE.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/SPnDE.h.gcov.html b/html/bayesnet/classifiers/SPnDE.h.gcov.html deleted file mode 100644 index 1574cb0..0000000 --- a/html/bayesnet/classifiers/SPnDE.h.gcov.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - SPnDE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      12              : namespace bayesnet {
-      13              :     class SPnDE : public Classifier {
-      14              :     public:
-      15              :         explicit SPnDE(std::vector<int> parents);
-      16          912 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/SPnDE.h.gcov.overview.html b/html/bayesnet/classifiers/SPnDE.h.gcov.overview.html deleted file mode 100644 index 6940831..0000000 --- a/html/bayesnet/classifiers/SPnDE.h.gcov.overview.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/SPnDE.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/SPnDE.h.gcov.png b/html/bayesnet/classifiers/SPnDE.h.gcov.png deleted file mode 100644 index 36d64f460ffe72a39885ee0fae94a7941c50a6b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIp!VDxY{W&%TNJ#|vgt-3y|9=$_EPo#x`|3Xf z!z!RSm^$aZc`1<1S>O>_%)r2R1cVukg?d%pxF;B9$kf%Kc#zv_^FpUfPuK#zGN;ZX|IQ;C?Y21^;>je+( tdBFDdX!Iughs&!~xQoqZb>98NCO2QM<>>7ro - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TAN::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const8
bayesnet::TAN::buildModel(at::Tensor const&)52
bayesnet::TAN::TAN()188
auto bayesnet::TAN::buildModel(at::Tensor const&)::{lambda(auto:1 const&, auto:2 const&)#1}::operator()<std::pair<int, float>, std::pair<int, float> >(std::pair<int, float> const&, std::pair<int, float> const&) const648
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.cc.func.html b/html/bayesnet/classifiers/TAN.cc.func.html deleted file mode 100644 index 487522b..0000000 --- a/html/bayesnet/classifiers/TAN.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
auto bayesnet::TAN::buildModel(at::Tensor const&)::{lambda(auto:1 const&, auto:2 const&)#1}::operator()<std::pair<int, float>, std::pair<int, float> >(std::pair<int, float> const&, std::pair<int, float> const&) const648
bayesnet::TAN::TAN()188
bayesnet::TAN::buildModel(at::Tensor const&)52
bayesnet::TAN::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const8
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.cc.gcov.frameset.html b/html/bayesnet/classifiers/TAN.cc.gcov.frameset.html deleted file mode 100644 index 1c81b16..0000000 --- a/html/bayesnet/classifiers/TAN.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/TAN.cc.gcov.html b/html/bayesnet/classifiers/TAN.cc.gcov.html deleted file mode 100644 index 12c5c28..0000000 --- a/html/bayesnet/classifiers/TAN.cc.gcov.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10          188 :     TAN::TAN() : Classifier(Network()) {}
-      11              : 
-      12           52 :     void TAN::buildModel(const torch::Tensor& weights)
-      13              :     {
-      14              :         // 0. Add all nodes to the model
-      15           52 :         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           52 :         auto mi = std::vector <std::pair<int, float >>();
-      19          156 :         torch::Tensor class_dataset = dataset.index({ -1, "..." });
-      20          356 :         for (int i = 0; i < static_cast<int>(features.size()); ++i) {
-      21          912 :             torch::Tensor feature_dataset = dataset.index({ i, "..." });
-      22          304 :             auto mi_value = metrics.mutualInformation(class_dataset, feature_dataset, weights);
-      23          304 :             mi.push_back({ i, mi_value });
-      24          304 :         }
-      25          700 :         sort(mi.begin(), mi.end(), [](const auto& left, const auto& right) {return left.second < right.second;});
-      26           52 :         auto root = mi[mi.size() - 1].first;
-      27              :         // 2. Compute mutual information between each feature and the class
-      28           52 :         auto weights_matrix = metrics.conditionalEdge(weights);
-      29              :         // 3. Compute the maximum spanning tree
-      30           52 :         auto mst = metrics.maximumSpanningTree(features, weights_matrix, root);
-      31              :         // 4. Add edges from the maximum spanning tree to the model
-      32          304 :         for (auto i = 0; i < mst.size(); ++i) {
-      33          252 :             auto [from, to] = mst[i];
-      34          252 :             model.addEdge(features[from], features[to]);
-      35              :         }
-      36              :         // 5. Add edges from the class to all features
-      37          356 :         for (auto feature : features) {
-      38          304 :             model.addEdge(className, feature);
-      39          304 :         }
-      40          408 :     }
-      41            8 :     std::vector<std::string> TAN::graph(const std::string& title) const
-      42              :     {
-      43            8 :         return model.graph(title);
-      44              :     }
-      45              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.cc.gcov.overview.html b/html/bayesnet/classifiers/TAN.cc.gcov.overview.html deleted file mode 100644 index eb915d6..0000000 --- a/html/bayesnet/classifiers/TAN.cc.gcov.overview.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/TAN.cc.gcov.png b/html/bayesnet/classifiers/TAN.cc.gcov.png deleted file mode 100644 index e18de49282c42a322662b8c4b0c04c8817aef83f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 414 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$F!VDx&H-BsdQW60^A+G=b|6c_J%iqVwzWUF= zunH&+rp|e9UJ7J$7I;J!GcfQS0b$0e+I-Rs42(LSE{-71#*1hMP7rZOLce{$zg;+k1PVRGfXq z>4>!+{0Bbo(O_67*6>`$y+F(@bxY13MO|eBFA;+c~0dzZN}uaM{o?v_b0-1v82Yp$4u+Ji9ev!N$i^%utU2;FhY)ckGB z9eG8<{P)=zx%+~ew%k>CvHcrw^3ylUAIp1R*DJ`&KjOW$_~-{oHDF*ec)I$ztaD0e F0sucprsDtr diff --git a/html/bayesnet/classifiers/TAN.h.func-c.html b/html/bayesnet/classifiers/TAN.h.func-c.html deleted file mode 100644 index 5e95716..0000000 --- a/html/bayesnet/classifiers/TAN.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TAN::~TAN()76
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.h.func.html b/html/bayesnet/classifiers/TAN.h.func.html deleted file mode 100644 index 002e588..0000000 --- a/html/bayesnet/classifiers/TAN.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TAN::~TAN()76
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.h.gcov.frameset.html b/html/bayesnet/classifiers/TAN.h.gcov.frameset.html deleted file mode 100644 index 0974d93..0000000 --- a/html/bayesnet/classifiers/TAN.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/TAN.h.gcov.html b/html/bayesnet/classifiers/TAN.h.gcov.html deleted file mode 100644 index 10dc513..0000000 --- a/html/bayesnet/classifiers/TAN.h.gcov.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TAN.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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"
-      10              : namespace bayesnet {
-      11              :     class TAN : public Classifier {
-      12              :     private:
-      13              :     protected:
-      14              :         void buildModel(const torch::Tensor& weights) override;
-      15              :     public:
-      16              :         TAN();
-      17           76 :         virtual ~TAN() = default;
-      18              :         std::vector<std::string> graph(const std::string& name = "TAN") const override;
-      19              :     };
-      20              : }
-      21              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TAN.h.gcov.overview.html b/html/bayesnet/classifiers/TAN.h.gcov.overview.html deleted file mode 100644 index 0060cc0..0000000 --- a/html/bayesnet/classifiers/TAN.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TAN.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/TAN.h.gcov.png b/html/bayesnet/classifiers/TAN.h.gcov.png deleted file mode 100644 index 5165005c82bb464b0dd52e40c83106f73c98781d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIu!VDypSCu#dDTx4|5ZC|z|E~gq(_e}__xs@=Rw zXWt^$#Rht8k+we`Ogr(?{!IBBrqI3Iq3W(qnyQ!mR?0q-Y}W7yJ~L;|?X2G1&yl4! bS_HJJCrh7s)O|(*=ne)?S3j3^P6 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TANLd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::TANLd::predict(at::Tensor&)16
bayesnet::TANLd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::TANLd::TANLd()68
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.cc.func.html b/html/bayesnet/classifiers/TANLd.cc.func.html deleted file mode 100644 index d202a54..0000000 --- a/html/bayesnet/classifiers/TANLd.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TANLd::TANLd()68
bayesnet::TANLd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::TANLd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::TANLd::predict(at::Tensor&)16
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.cc.gcov.frameset.html b/html/bayesnet/classifiers/TANLd.cc.gcov.frameset.html deleted file mode 100644 index f5abeeb..0000000 --- a/html/bayesnet/classifiers/TANLd.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/TANLd.cc.gcov.html b/html/bayesnet/classifiers/TANLd.cc.gcov.html deleted file mode 100644 index d4a6403..0000000 --- a/html/bayesnet/classifiers/TANLd.cc.gcov.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1717
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10           68 :     TANLd::TANLd() : TAN(), Proposal(dataset, features, className) {}
-      11           20 :     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           20 :         checkInput(X_, y_);
-      14           20 :         features = features_;
-      15           20 :         className = className_;
-      16           20 :         Xf = X_;
-      17           20 :         y = y_;
-      18              :         // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-      19           20 :         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           20 :         TAN::fit(dataset, features, className, states);
-      23           20 :         states = localDiscretizationProposal(states, model);
-      24           20 :         return *this;
-      25              : 
-      26              :     }
-      27           16 :     torch::Tensor TANLd::predict(torch::Tensor& X)
-      28              :     {
-      29           16 :         auto Xt = prepareX(X);
-      30           32 :         return TAN::predict(Xt);
-      31           16 :     }
-      32            4 :     std::vector<std::string> TANLd::graph(const std::string& name) const
-      33              :     {
-      34            4 :         return TAN::graph(name);
-      35              :     }
-      36              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.cc.gcov.overview.html b/html/bayesnet/classifiers/TANLd.cc.gcov.overview.html deleted file mode 100644 index 3904a1e..0000000 --- a/html/bayesnet/classifiers/TANLd.cc.gcov.overview.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/TANLd.cc.gcov.png b/html/bayesnet/classifiers/TANLd.cc.gcov.png deleted file mode 100644 index 72788e6b4b5ac2d82fb4fcd40963a5962b545616..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$6!VDze^epfMQW60^A+G=b|6c_J%iqVwzWUF= zunH&+rp|e9UJ7J$7I;J!GcfQS0b$0e+I-SL!F!%Ajv*GkYlAy^k0|gcOCR7$Y2NTZ zkJr?t;YXF#cGm`(=WDq|z7?>_PTWutTf6rI^F{Mx!6jYy-tZrZ?YX`|#xDAu$o-%T zjS|UBGlC~=I?kp(Z3d&#a<-WMNh`00b#AaY`1I%!Gc&g**YD5Dba6EBR_o9z7hSwc z)>x}+tJ9)KOzopr03u+I9{>OV diff --git a/html/bayesnet/classifiers/TANLd.h.func-c.html b/html/bayesnet/classifiers/TANLd.h.func-c.html deleted file mode 100644 index e388977..0000000 --- a/html/bayesnet/classifiers/TANLd.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TANLd::~TANLd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.h.func.html b/html/bayesnet/classifiers/TANLd.h.func.html deleted file mode 100644 index cd88f69..0000000 --- a/html/bayesnet/classifiers/TANLd.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::TANLd::~TANLd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.h.gcov.frameset.html b/html/bayesnet/classifiers/TANLd.h.gcov.frameset.html deleted file mode 100644 index e27ea9f..0000000 --- a/html/bayesnet/classifiers/TANLd.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/classifiers/TANLd.h.gcov.html b/html/bayesnet/classifiers/TANLd.h.gcov.html deleted file mode 100644 index 06ed158..0000000 --- a/html/bayesnet/classifiers/TANLd.h.gcov.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiers - TANLd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      12              : namespace bayesnet {
-      13              :     class TANLd : public TAN, public Proposal {
-      14              :     private:
-      15              :     public:
-      16              :         TANLd();
-      17           20 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/TANLd.h.gcov.overview.html b/html/bayesnet/classifiers/TANLd.h.gcov.overview.html deleted file mode 100644 index dfc5d32..0000000 --- a/html/bayesnet/classifiers/TANLd.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers/TANLd.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/classifiers/TANLd.h.gcov.png b/html/bayesnet/classifiers/TANLd.h.gcov.png deleted file mode 100644 index dd5b3fea99a09e8b2f36ce40bf7a089524d46984..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIl!VDzmo21VNaRPioT>t<7zX}MJzmJW5^`C)Z z6;K>Zo%7zj6v*Z*@Q5sCVBk9f!i-b3`J{n@lRRA - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
Classifier.h -
100.0%
-
100.0 %44100.0 %44
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/index-detail-sort-l.html b/html/bayesnet/classifiers/index-detail-sort-l.html deleted file mode 100644 index e3933a6..0000000 --- a/html/bayesnet/classifiers/index-detail-sort-l.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.h -
100.0%
-
100.0 %11100.0 %11
Classifier.h -
100.0%
-
100.0 %44100.0 %44
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/index-detail.html b/html/bayesnet/classifiers/index-detail.html deleted file mode 100644 index e516b23..0000000 --- a/html/bayesnet/classifiers/index-detail.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
Classifier.h -
100.0%
-
100.0 %44100.0 %44
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
TANLd.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/index-sort-f.html b/html/bayesnet/classifiers/index-sort-f.html deleted file mode 100644 index 3bd48a5..0000000 --- a/html/bayesnet/classifiers/index-sort-f.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
Classifier.h -
100.0%
-
100.0 %44100.0 %44
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/index-sort-l.html b/html/bayesnet/classifiers/index-sort-l.html deleted file mode 100644 index e3933a6..0000000 --- a/html/bayesnet/classifiers/index-sort-l.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.h -
100.0%
-
100.0 %11100.0 %11
Classifier.h -
100.0%
-
100.0 %44100.0 %44
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/classifiers/index.html b/html/bayesnet/classifiers/index.html deleted file mode 100644 index e516b23..0000000 --- a/html/bayesnet/classifiers/index.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/classifiers - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/classifiersCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %384380
Test Date:2024-05-06 17:54:04Functions:100.0 %7272
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Classifier.cc -
100.0%
-
100.0 %126126100.0 %2424
Classifier.h -
100.0%
-
100.0 %44100.0 %44
KDB.cc -
96.3%96.3%
-
96.3 %5452100.0 %55
KDB.h -
100.0%
-
100.0 %11100.0 %11
KDBLd.cc -
100.0%
-
100.0 %1717100.0 %44
KDBLd.h -
100.0%
-
100.0 %11100.0 %11
Proposal.cc -
97.7%97.7%
-
97.7 %8684100.0 %88
SPODE.cc -
100.0%
-
100.0 %1010100.0 %33
SPODE.h -
100.0%
-
100.0 %11100.0 %11
SPODELd.cc -
100.0%
-
100.0 %2626100.0 %66
SPODELd.h -
100.0%
-
100.0 %11100.0 %11
SPnDE.cc -
100.0%
-
100.0 %1414100.0 %33
SPnDE.h -
100.0%
-
100.0 %11100.0 %11
TAN.cc -
100.0%
-
100.0 %2323100.0 %44
TAN.h -
100.0%
-
100.0 %11100.0 %11
TANLd.cc -
100.0%
-
100.0 %1717100.0 %44
TANLd.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.cc.func-c.html b/html/bayesnet/ensembles/A2DE.cc.func-c.html deleted file mode 100644 index 306cddd..0000000 --- a/html/bayesnet/ensembles/A2DE.cc.func-c.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::A2DE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::A2DE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)8
bayesnet::A2DE::A2DE(bool)12
bayesnet::A2DE::buildModel(at::Tensor const&)16
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.cc.func.html b/html/bayesnet/ensembles/A2DE.cc.func.html deleted file mode 100644 index 50e0946..0000000 --- a/html/bayesnet/ensembles/A2DE.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::A2DE::A2DE(bool)12
bayesnet::A2DE::buildModel(at::Tensor const&)16
bayesnet::A2DE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::A2DE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)8
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.cc.gcov.frameset.html b/html/bayesnet/ensembles/A2DE.cc.gcov.frameset.html deleted file mode 100644 index a5f7f37..0000000 --- a/html/bayesnet/ensembles/A2DE.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/A2DE.cc.gcov.html b/html/bayesnet/ensembles/A2DE.cc.gcov.html deleted file mode 100644 index 197b670..0000000 --- a/html/bayesnet/ensembles/A2DE.cc.gcov.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2323
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10           12 :     A2DE::A2DE(bool predict_voting) : Ensemble(predict_voting)
-      11              :     {
-      12           24 :         validHyperparameters = { "predict_voting" };
-      13           36 :     }
-      14            8 :     void A2DE::setHyperparameters(const nlohmann::json& hyperparameters_)
-      15              :     {
-      16            8 :         auto hyperparameters = hyperparameters_;
-      17            8 :         if (hyperparameters.contains("predict_voting")) {
-      18            8 :             predict_voting = hyperparameters["predict_voting"];
-      19            8 :             hyperparameters.erase("predict_voting");
-      20              :         }
-      21            8 :         Classifier::setHyperparameters(hyperparameters);
-      22            8 :     }
-      23           16 :     void A2DE::buildModel(const torch::Tensor& weights)
-      24              :     {
-      25           16 :         models.clear();
-      26           16 :         significanceModels.clear();
-      27          124 :         for (int i = 0; i < features.size() - 1; ++i) {
-      28          564 :             for (int j = i + 1; j < features.size(); ++j) {
-      29          456 :                 auto model = std::make_unique<SPnDE>(std::vector<int>({ i, j }));
-      30          456 :                 models.push_back(std::move(model));
-      31          456 :             }
-      32              :         }
-      33           16 :         n_models = static_cast<unsigned>(models.size());
-      34           16 :         significanceModels = std::vector<double>(n_models, 1.0);
-      35           16 :     }
-      36            4 :     std::vector<std::string> A2DE::graph(const std::string& title) const
-      37              :     {
-      38            4 :         return Ensemble::graph(title);
-      39              :     }
-      40              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.cc.gcov.overview.html b/html/bayesnet/ensembles/A2DE.cc.gcov.overview.html deleted file mode 100644 index 0606f56..0000000 --- a/html/bayesnet/ensembles/A2DE.cc.gcov.overview.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/A2DE.cc.gcov.png b/html/bayesnet/ensembles/A2DE.cc.gcov.png deleted file mode 100644 index e1917a4fab902d6595ec091a22ae01d083d4d9fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!VDy5`z06wDTx4|5ZC|z|E~gqR9kJ*i*&)mK$T<1N^ zyTwse`HP=r?BVD0uJbNeYu0&kWh3vcNJHU0O%ZH7fjs&z+8?%sha8f9l@ZJ(JAXr& z(tPfMZ>LTb-d*&0`?gEQ2U9Lyc(8e4fLKxU*{>BEDMiKwmkYnM|6&p-Ju-Lmo}=wR P-!XW)`njxgN@xNARrZ9j diff --git a/html/bayesnet/ensembles/A2DE.h.func-c.html b/html/bayesnet/ensembles/A2DE.h.func-c.html deleted file mode 100644 index eeddf23..0000000 --- a/html/bayesnet/ensembles/A2DE.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::A2DE::~A2DE()12
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.h.func.html b/html/bayesnet/ensembles/A2DE.h.func.html deleted file mode 100644 index 471300f..0000000 --- a/html/bayesnet/ensembles/A2DE.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::A2DE::~A2DE()12
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.h.gcov.frameset.html b/html/bayesnet/ensembles/A2DE.h.gcov.frameset.html deleted file mode 100644 index 7054d6e..0000000 --- a/html/bayesnet/ensembles/A2DE.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/A2DE.h.gcov.html b/html/bayesnet/ensembles/A2DE.h.gcov.html deleted file mode 100644 index f87081b..0000000 --- a/html/bayesnet/ensembles/A2DE.h.gcov.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - A2DE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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"
-      11              : namespace bayesnet {
-      12              :     class A2DE : public Ensemble {
-      13              :     public:
-      14              :         A2DE(bool predict_voting = false);
-      15           12 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/A2DE.h.gcov.overview.html b/html/bayesnet/ensembles/A2DE.h.gcov.overview.html deleted file mode 100644 index 4ebfd35..0000000 --- a/html/bayesnet/ensembles/A2DE.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/A2DE.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/A2DE.h.gcov.png b/html/bayesnet/ensembles/A2DE.h.gcov.png deleted file mode 100644 index 335f3bc0d96657c35e9cb0c00b3eff576713a3d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIq!VDyr+OfR{QW60^A+G=b|6c_J%iqVwzWUF= zunH&+rp|e9UJ7J$7I;J!GcfQS0b$0e+I-SL!4^*!#}JK)Qzy0a9#G(6`N(#jD}{N_ z|GbSaEJU8WPJB>s_}pas)1tl#PgyrDl5=R3kkdDfbg8aq^f#Q9%K6@W#o-wBD+g;2 z@%kK9Z7yc)eD~+>>+5^ZFPm=4p_JB_d2B-{qx`$Btn<^)e!Y^pHNnX1^unZTDX;D) lY~cRO?UsE_$SS)=Kjg3c@*Q0J!+`E#@O1TaS?83{1OOYtUP%A| diff --git a/html/bayesnet/ensembles/AODE.cc.func-c.html b/html/bayesnet/ensembles/AODE.cc.func-c.html deleted file mode 100644 index ed8871d..0000000 --- a/html/bayesnet/ensembles/AODE.cc.func-c.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2020
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::AODE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)4
bayesnet::AODE::buildModel(at::Tensor const&)24
bayesnet::AODE::AODE(bool)76
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.cc.func.html b/html/bayesnet/ensembles/AODE.cc.func.html deleted file mode 100644 index 073fd53..0000000 --- a/html/bayesnet/ensembles/AODE.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2020
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODE::AODE(bool)76
bayesnet::AODE::buildModel(at::Tensor const&)24
bayesnet::AODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::AODE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)4
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.cc.gcov.frameset.html b/html/bayesnet/ensembles/AODE.cc.gcov.frameset.html deleted file mode 100644 index 3c1d4a3..0000000 --- a/html/bayesnet/ensembles/AODE.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/AODE.cc.gcov.html b/html/bayesnet/ensembles/AODE.cc.gcov.html deleted file mode 100644 index a07c4e0..0000000 --- a/html/bayesnet/ensembles/AODE.cc.gcov.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2020
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10           76 :     AODE::AODE(bool predict_voting) : Ensemble(predict_voting)
-      11              :     {
-      12          152 :         validHyperparameters = { "predict_voting" };
-      13              : 
-      14          228 :     }
-      15            4 :     void AODE::setHyperparameters(const nlohmann::json& hyperparameters_)
-      16              :     {
-      17            4 :         auto hyperparameters = hyperparameters_;
-      18            4 :         if (hyperparameters.contains("predict_voting")) {
-      19            4 :             predict_voting = hyperparameters["predict_voting"];
-      20            4 :             hyperparameters.erase("predict_voting");
-      21              :         }
-      22            4 :         Classifier::setHyperparameters(hyperparameters);
-      23            4 :     }
-      24           24 :     void AODE::buildModel(const torch::Tensor& weights)
-      25              :     {
-      26           24 :         models.clear();
-      27           24 :         significanceModels.clear();
-      28          188 :         for (int i = 0; i < features.size(); ++i) {
-      29          164 :             models.push_back(std::make_unique<SPODE>(i));
-      30              :         }
-      31           24 :         n_models = models.size();
-      32           24 :         significanceModels = std::vector<double>(n_models, 1.0);
-      33           24 :     }
-      34            4 :     std::vector<std::string> AODE::graph(const std::string& title) const
-      35              :     {
-      36            4 :         return Ensemble::graph(title);
-      37              :     }
-      38              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.cc.gcov.overview.html b/html/bayesnet/ensembles/AODE.cc.gcov.overview.html deleted file mode 100644 index d7e43cc..0000000 --- a/html/bayesnet/ensembles/AODE.cc.gcov.overview.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/AODE.cc.gcov.png b/html/bayesnet/ensembles/AODE.cc.gcov.png deleted file mode 100644 index 682ccab2a66cd7a5a31f4c362faecaa3be4c04a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$A!VDxAx-dEcDTx4|5ZC|z|E~gqGjn;>j-4uk;PsTJ3JS(VXMI zQHHNb#FT9}0w>?hjx(P#yJxfD`bRfB=FjBaE4VUGsrRXyrI>|TOxJJebIJEqJ&mh0 v3w(~7ODY=1XRO$zZfu|DZlV=cUoOAu; - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODE::~AODE()28
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.h.func.html b/html/bayesnet/ensembles/AODE.h.func.html deleted file mode 100644 index f9dcc65..0000000 --- a/html/bayesnet/ensembles/AODE.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODE::~AODE()28
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.h.gcov.frameset.html b/html/bayesnet/ensembles/AODE.h.gcov.frameset.html deleted file mode 100644 index b3184e8..0000000 --- a/html/bayesnet/ensembles/AODE.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/AODE.h.gcov.html b/html/bayesnet/ensembles/AODE.h.gcov.html deleted file mode 100644 index 505e06d..0000000 --- a/html/bayesnet/ensembles/AODE.h.gcov.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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"
-      11              : namespace bayesnet {
-      12              :     class AODE : public Ensemble {
-      13              :     public:
-      14              :         AODE(bool predict_voting = false);
-      15           28 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODE.h.gcov.overview.html b/html/bayesnet/ensembles/AODE.h.gcov.overview.html deleted file mode 100644 index 44ca0dd..0000000 --- a/html/bayesnet/ensembles/AODE.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODE.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/AODE.h.gcov.png b/html/bayesnet/ensembles/AODE.h.gcov.png deleted file mode 100644 index 335f3bc0d96657c35e9cb0c00b3eff576713a3d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIq!VDyr+OfR{QW60^A+G=b|6c_J%iqVwzWUF= zunH&+rp|e9UJ7J$7I;J!GcfQS0b$0e+I-SL!4^*!#}JK)Qzy0a9#G(6`N(#jD}{N_ z|GbSaEJU8WPJB>s_}pas)1tl#PgyrDl5=R3kkdDfbg8aq^f#Q9%K6@W#o-wBD+g;2 z@%kK9Z7yc)eD~+>>+5^ZFPm=4p_JB_d2B-{qx`$Btn<^)e!Y^pHNnX1^unZTDX;D) lY~cRO?UsE_$SS)=Kjg3c@*Q0J!+`E#@O1TaS?83{1OOYtUP%A| diff --git a/html/bayesnet/ensembles/AODELd.cc.func-c.html b/html/bayesnet/ensembles/AODELd.cc.func-c.html deleted file mode 100644 index 9649bd0..0000000 --- a/html/bayesnet/ensembles/AODELd.cc.func-c.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2424
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODELd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::AODELd::buildModel(at::Tensor const&)20
bayesnet::AODELd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::AODELd::trainModel(at::Tensor const&)20
bayesnet::AODELd::AODELd(bool)68
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.cc.func.html b/html/bayesnet/ensembles/AODELd.cc.func.html deleted file mode 100644 index 1480bb3..0000000 --- a/html/bayesnet/ensembles/AODELd.cc.func.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2424
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODELd::AODELd(bool)68
bayesnet::AODELd::buildModel(at::Tensor const&)20
bayesnet::AODELd::fit(at::Tensor&, at::Tensor&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > >&)20
bayesnet::AODELd::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::AODELd::trainModel(at::Tensor const&)20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.cc.gcov.frameset.html b/html/bayesnet/ensembles/AODELd.cc.gcov.frameset.html deleted file mode 100644 index 6ad9c56..0000000 --- a/html/bayesnet/ensembles/AODELd.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/AODELd.cc.gcov.html b/html/bayesnet/ensembles/AODELd.cc.gcov.html deleted file mode 100644 index ec90eb3..0000000 --- a/html/bayesnet/ensembles/AODELd.cc.gcov.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2424
Test Date:2024-05-06 17:54:04Functions:100.0 %55
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10           68 :     AODELd::AODELd(bool predict_voting) : Ensemble(predict_voting), Proposal(dataset, features, className)
-      11              :     {
-      12           68 :     }
-      13           20 :     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           20 :         checkInput(X_, y_);
-      16           20 :         features = features_;
-      17           20 :         className = className_;
-      18           20 :         Xf = X_;
-      19           20 :         y = y_;
-      20              :         // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y
-      21           20 :         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           20 :         Ensemble::fit(dataset, features, className, states);
-      25           20 :         return *this;
-      26              : 
-      27              :     }
-      28           20 :     void AODELd::buildModel(const torch::Tensor& weights)
-      29              :     {
-      30           20 :         models.clear();
-      31          168 :         for (int i = 0; i < features.size(); ++i) {
-      32          148 :             models.push_back(std::make_unique<SPODELd>(i));
-      33              :         }
-      34           20 :         n_models = models.size();
-      35           20 :         significanceModels = std::vector<double>(n_models, 1.0);
-      36           20 :     }
-      37           20 :     void AODELd::trainModel(const torch::Tensor& weights)
-      38              :     {
-      39          168 :         for (const auto& model : models) {
-      40          148 :             model->fit(Xf, y, features, className, states);
-      41              :         }
-      42           20 :     }
-      43            4 :     std::vector<std::string> AODELd::graph(const std::string& name) const
-      44              :     {
-      45            4 :         return Ensemble::graph(name);
-      46              :     }
-      47              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.cc.gcov.overview.html b/html/bayesnet/ensembles/AODELd.cc.gcov.overview.html deleted file mode 100644 index 4a5392b..0000000 --- a/html/bayesnet/ensembles/AODELd.cc.gcov.overview.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/AODELd.cc.gcov.png b/html/bayesnet/ensembles/AODELd.cc.gcov.png deleted file mode 100644 index 820461b51d180a7ebdb0acbd2bb4e8974bae5b5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$J!VDzayaT#`lth3}i0l9V|5pLQ^7pZ^ul_SI ztOAOIsdL_&mjc0@5}EJR zZ(p!r(bxZRp4qd%>^Us_=5f#LSy_P*up%DRWcdNqWGWPD`ecuzy?}%4%K--}nr|CKR@5b=-TnXga59mdyR4gIR}X z8uA)$53~Ab7XM@OCfBDsZt6HjL^o?i&OH-4(>L9~;D>K@_^vLU<9r*6iZ)D+u~oNR zwo1Zx)%Fc57e1KCB=_a3JdgV_hLb{W2Z~q{0`s@{*VtH|edQN$|A)z8=VMol=X&ip eRrvk=Q)W}!hczr>PkDer#^CAd=d#Wzp$PzE(VT+- diff --git a/html/bayesnet/ensembles/AODELd.h.func-c.html b/html/bayesnet/ensembles/AODELd.h.func-c.html deleted file mode 100644 index 1efbbbd..0000000 --- a/html/bayesnet/ensembles/AODELd.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODELd::~AODELd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.h.func.html b/html/bayesnet/ensembles/AODELd.h.func.html deleted file mode 100644 index ac31416..0000000 --- a/html/bayesnet/ensembles/AODELd.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::AODELd::~AODELd()20
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.h.gcov.frameset.html b/html/bayesnet/ensembles/AODELd.h.gcov.frameset.html deleted file mode 100644 index 05a17d3..0000000 --- a/html/bayesnet/ensembles/AODELd.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/AODELd.h.gcov.html b/html/bayesnet/ensembles/AODELd.h.gcov.html deleted file mode 100644 index eddb474..0000000 --- a/html/bayesnet/ensembles/AODELd.h.gcov.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - AODELd.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      13              : namespace bayesnet {
-      14              :     class AODELd : public Ensemble, public Proposal {
-      15              :     public:
-      16              :         AODELd(bool predict_voting = true);
-      17           20 :         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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/AODELd.h.gcov.overview.html b/html/bayesnet/ensembles/AODELd.h.gcov.overview.html deleted file mode 100644 index 2494af7..0000000 --- a/html/bayesnet/ensembles/AODELd.h.gcov.overview.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/AODELd.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/AODELd.h.gcov.png b/html/bayesnet/ensembles/AODELd.h.gcov.png deleted file mode 100644 index afba66b475d0f1cc70adadfe0748e5da9e975c7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIt!VDxsGPYO&DTx4|5ZC|z|E~gqp4A73i}<5*i=1p73UHm0cDFu_Kt@eR;*OI^^?Egd7$pMzuG%)U1@rB z)%wRjqx45BBZ3xis;puU*qgAiC}DkW>(fh2PZl|G*e#i`SlF~NGW^e`8n10N`L^%$ z_U9N*s+YVR*Vf*#Q14oyrekXKSFI&>O|xCiRcckFe17K(0-eX;>FVdQ&MBb@01gIa Ag#Z8m diff --git a/html/bayesnet/ensembles/BoostAODE.cc.func-c.html b/html/bayesnet/ensembles/BoostAODE.cc.func-c.html deleted file mode 100644 index b1c0a6e..0000000 --- a/html/bayesnet/ensembles/BoostAODE.cc.func-c.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.3 %237233
Test Date:2024-05-06 17:54:04Functions:100.0 %99
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::BoostAODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::BoostAODE::update_weights_block(int, at::Tensor&, at::Tensor&)28
bayesnet::BoostAODE::initializeModels()32
bayesnet::BoostAODE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)88
bayesnet::BoostAODE::buildModel(at::Tensor const&)92
bayesnet::BoostAODE::trainModel(at::Tensor const&)92
bayesnet::BoostAODE::BoostAODE(bool)168
bayesnet::update_weights(at::Tensor&, at::Tensor&, at::Tensor&)544
auto bayesnet::BoostAODE::trainModel(at::Tensor const&)::{lambda(auto:1)#1}::operator()<int>(int) const9700
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.cc.func.html b/html/bayesnet/ensembles/BoostAODE.cc.func.html deleted file mode 100644 index 3684782..0000000 --- a/html/bayesnet/ensembles/BoostAODE.cc.func.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.3 %237233
Test Date:2024-05-06 17:54:04Functions:100.0 %99
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
auto bayesnet::BoostAODE::trainModel(at::Tensor const&)::{lambda(auto:1)#1}::operator()<int>(int) const9700
bayesnet::BoostAODE::BoostAODE(bool)168
bayesnet::BoostAODE::buildModel(at::Tensor const&)92
bayesnet::BoostAODE::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const4
bayesnet::BoostAODE::initializeModels()32
bayesnet::BoostAODE::setHyperparameters(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&)88
bayesnet::BoostAODE::trainModel(at::Tensor const&)92
bayesnet::BoostAODE::update_weights_block(int, at::Tensor&, at::Tensor&)28
bayesnet::update_weights(at::Tensor&, at::Tensor&, at::Tensor&)544
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.cc.gcov.frameset.html b/html/bayesnet/ensembles/BoostAODE.cc.gcov.frameset.html deleted file mode 100644 index e7b9ea6..0000000 --- a/html/bayesnet/ensembles/BoostAODE.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/BoostAODE.cc.gcov.html b/html/bayesnet/ensembles/BoostAODE.cc.gcov.html deleted file mode 100644 index bfbb152..0000000 --- a/html/bayesnet/ensembles/BoostAODE.cc.gcov.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.3 %237233
Test Date:2024-05-06 17:54:04Functions:100.0 %99
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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 "BoostAODE.h"
-      16              : #include "lib/log/loguru.cpp"
-      17              : 
-      18              : namespace bayesnet {
-      19              : 
-      20          168 :     BoostAODE::BoostAODE(bool predict_voting) : Ensemble(predict_voting)
-      21              :     {
-      22         1848 :         validHyperparameters = {
-      23              :             "maxModels", "bisection", "order", "convergence", "convergence_best", "threshold",
-      24              :             "select_features", "maxTolerance", "predict_voting", "block_update"
-      25         1848 :         };
-      26              : 
-      27          504 :     }
-      28           92 :     void BoostAODE::buildModel(const torch::Tensor& weights)
-      29              :     {
-      30              :         // Models shall be built in trainModel
-      31           92 :         models.clear();
-      32           92 :         significanceModels.clear();
-      33           92 :         n_models = 0;
-      34              :         // Prepare the validation dataset
-      35          276 :         auto y_ = dataset.index({ -1, "..." });
-      36           92 :         if (convergence) {
-      37              :             // Prepare train & validation sets from train data
-      38           76 :             auto fold = folding::StratifiedKFold(5, y_, 271);
-      39           76 :             auto [train, test] = fold.getFold(0);
-      40           76 :             auto train_t = torch::tensor(train);
-      41           76 :             auto test_t = torch::tensor(test);
-      42              :             // Get train and validation sets
-      43          380 :             X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), train_t });
-      44          228 :             y_train = dataset.index({ -1, train_t });
-      45          380 :             X_test = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), test_t });
-      46          228 :             y_test = dataset.index({ -1, test_t });
-      47           76 :             dataset = X_train;
-      48           76 :             m = X_train.size(1);
-      49           76 :             auto n_classes = states.at(className).size();
-      50              :             // Build dataset with train data
-      51           76 :             buildDataset(y_train);
-      52           76 :             metrics = Metrics(dataset, features, className, n_classes);
-      53           76 :         } else {
-      54              :             // Use all data to train
-      55           64 :             X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." });
-      56           16 :             y_train = y_;
-      57              :         }
-      58          900 :     }
-      59           88 :     void BoostAODE::setHyperparameters(const nlohmann::json& hyperparameters_)
-      60              :     {
-      61           88 :         auto hyperparameters = hyperparameters_;
-      62           88 :         if (hyperparameters.contains("order")) {
-      63          100 :             std::vector<std::string> algos = { Orders.ASC, Orders.DESC, Orders.RAND };
-      64           20 :             order_algorithm = hyperparameters["order"];
-      65           20 :             if (std::find(algos.begin(), algos.end(), order_algorithm) == algos.end()) {
-      66            4 :                 throw std::invalid_argument("Invalid order algorithm, valid values [" + Orders.ASC + ", " + Orders.DESC + ", " + Orders.RAND + "]");
-      67              :             }
-      68           16 :             hyperparameters.erase("order");
-      69           20 :         }
-      70           84 :         if (hyperparameters.contains("convergence")) {
-      71           36 :             convergence = hyperparameters["convergence"];
-      72           36 :             hyperparameters.erase("convergence");
-      73              :         }
-      74           84 :         if (hyperparameters.contains("convergence_best")) {
-      75           12 :             convergence_best = hyperparameters["convergence_best"];
-      76           12 :             hyperparameters.erase("convergence_best");
-      77              :         }
-      78           84 :         if (hyperparameters.contains("bisection")) {
-      79           32 :             bisection = hyperparameters["bisection"];
-      80           32 :             hyperparameters.erase("bisection");
-      81              :         }
-      82           84 :         if (hyperparameters.contains("threshold")) {
-      83           24 :             threshold = hyperparameters["threshold"];
-      84           24 :             hyperparameters.erase("threshold");
-      85              :         }
-      86           84 :         if (hyperparameters.contains("maxTolerance")) {
-      87           44 :             maxTolerance = hyperparameters["maxTolerance"];
-      88           44 :             if (maxTolerance < 1 || maxTolerance > 4)
-      89           12 :                 throw std::invalid_argument("Invalid maxTolerance value, must be greater in [1, 4]");
-      90           32 :             hyperparameters.erase("maxTolerance");
-      91              :         }
-      92           72 :         if (hyperparameters.contains("predict_voting")) {
-      93            4 :             predict_voting = hyperparameters["predict_voting"];
-      94            4 :             hyperparameters.erase("predict_voting");
-      95              :         }
-      96           72 :         if (hyperparameters.contains("select_features")) {
-      97           36 :             auto selectedAlgorithm = hyperparameters["select_features"];
-      98          180 :             std::vector<std::string> algos = { SelectFeatures.IWSS, SelectFeatures.CFS, SelectFeatures.FCBF };
-      99           36 :             selectFeatures = true;
-     100           36 :             select_features_algorithm = selectedAlgorithm;
-     101           36 :             if (std::find(algos.begin(), algos.end(), selectedAlgorithm) == algos.end()) {
-     102            4 :                 throw std::invalid_argument("Invalid selectFeatures value, valid values [" + SelectFeatures.IWSS + ", " + SelectFeatures.CFS + ", " + SelectFeatures.FCBF + "]");
-     103              :             }
-     104           32 :             hyperparameters.erase("select_features");
-     105           40 :         }
-     106           68 :         if (hyperparameters.contains("block_update")) {
-     107            8 :             block_update = hyperparameters["block_update"];
-     108            8 :             hyperparameters.erase("block_update");
-     109              :         }
-     110           68 :         Classifier::setHyperparameters(hyperparameters);
-     111          144 :     }
-     112          544 :     std::tuple<torch::Tensor&, double, bool> update_weights(torch::Tensor& ytrain, torch::Tensor& ypred, torch::Tensor& weights)
-     113              :     {
-     114          544 :         bool terminate = false;
-     115          544 :         double alpha_t = 0;
-     116          544 :         auto mask_wrong = ypred != ytrain;
-     117          544 :         auto mask_right = ypred == ytrain;
-     118          544 :         auto masked_weights = weights * mask_wrong.to(weights.dtype());
-     119          544 :         double epsilon_t = masked_weights.sum().item<double>();
-     120          544 :         if (epsilon_t > 0.5) {
-     121              :             // Inverse the weights policy (plot ln(wt))
-     122              :             // "In each round of AdaBoost, there is a sanity check to ensure that the current base 
-     123              :             // learner is better than random guess" (Zhi-Hua Zhou, 2012)
-     124           16 :             terminate = true;
-     125              :         } else {
-     126          528 :             double wt = (1 - epsilon_t) / epsilon_t;
-     127          528 :             alpha_t = epsilon_t == 0 ? 1 : 0.5 * log(wt);
-     128              :             // Step 3.2: Update weights for next classifier
-     129              :             // Step 3.2.1: Update weights of wrong samples
-     130          528 :             weights += mask_wrong.to(weights.dtype()) * exp(alpha_t) * weights;
-     131              :             // Step 3.2.2: Update weights of right samples
-     132          528 :             weights += mask_right.to(weights.dtype()) * exp(-alpha_t) * weights;
-     133              :             // Step 3.3: Normalise the weights
-     134          528 :             double totalWeights = torch::sum(weights).item<double>();
-     135          528 :             weights = weights / totalWeights;
-     136              :         }
-     137         1088 :         return { weights, alpha_t, terminate };
-     138          544 :     }
-     139           28 :     std::tuple<torch::Tensor&, double, bool> BoostAODE::update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights)
-     140              :     {
-     141              :         /* Update Block algorithm
-     142              :             k = # of models in block
-     143              :             n_models = # of models in ensemble to make predictions
-     144              :             n_models_bak = # models saved
-     145              :             models = vector of models to make predictions
-     146              :             models_bak = models not used to make predictions
-     147              :             significances_bak = backup of significances vector
-     148              : 
-     149              :             Case list
-     150              :             A) k = 1, n_models = 1              => n = 0 , n_models = n + k
-     151              :             B) k = 1, n_models = n + 1  => n_models = n + k
-     152              :             C) k > 1, n_models = k + 1       => n= 1, n_models = n + k
-     153              :             D) k > 1, n_models = k           => n = 0, n_models = n + k
-     154              :             E) k > 1, n_models = k + n       => n_models = n + k
-     155              : 
-     156              :             A, D) n=0, k > 0, n_models == k
-     157              :             1. n_models_bak <- n_models
-     158              :             2. significances_bak <- significances
-     159              :             3. significances = vector(k, 1)
-     160              :             4. Don’t move any classifiers out of models
-     161              :             5. n_models <- k
-     162              :             6. Make prediction, compute alpha, update weights
-     163              :             7. Don’t restore any classifiers to models
-     164              :             8. significances <- significances_bak
-     165              :             9. Update last k significances
-     166              :             10. n_models <- n_models_bak
-     167              : 
-     168              :             B, C, E) n > 0, k > 0, n_models == n + k
-     169              :             1. n_models_bak <- n_models
-     170              :             2. significances_bak <- significances
-     171              :             3. significances = vector(k, 1)
-     172              :             4. Move first n classifiers to models_bak
-     173              :             5. n_models <- k
-     174              :             6. Make prediction, compute alpha, update weights
-     175              :             7. Insert classifiers in models_bak to be the first n models
-     176              :             8. significances <- significances_bak
-     177              :             9. Update last k significances
-     178              :             10. n_models <- n_models_bak
-     179              :         */
-     180              :         //
-     181              :         // Make predict with only the last k models
-     182              :         //
-     183           28 :         std::unique_ptr<Classifier> model;
-     184           28 :         std::vector<std::unique_ptr<Classifier>> models_bak;
-     185              :         // 1. n_models_bak <- n_models 2. significances_bak <- significances
-     186           28 :         auto significance_bak = significanceModels;
-     187           28 :         auto n_models_bak = n_models;
-     188              :         // 3. significances = vector(k, 1)
-     189           28 :         significanceModels = std::vector<double>(k, 1.0);
-     190              :         // 4. Move first n classifiers to models_bak
-     191              :         // backup the first n_models - k models (if n_models == k, don't backup any)
-     192          148 :         for (int i = 0; i < n_models - k; ++i) {
-     193          120 :             model = std::move(models[0]);
-     194          120 :             models.erase(models.begin());
-     195          120 :             models_bak.push_back(std::move(model));
-     196              :         }
-     197           28 :         assert(models.size() == k);
-     198              :         // 5. n_models <- k
-     199           28 :         n_models = k;
-     200              :         // 6. Make prediction, compute alpha, update weights
-     201           28 :         auto ypred = predict(X_train);
-     202              :         //
-     203              :         // Update weights
-     204              :         //
-     205              :         double alpha_t;
-     206              :         bool terminate;
-     207           28 :         std::tie(weights, alpha_t, terminate) = update_weights(y_train, ypred, weights);
-     208              :         //
-     209              :         // Restore the models if needed
-     210              :         //
-     211              :         // 7. Insert classifiers in models_bak to be the first n models
-     212              :         // if n_models_bak == k, don't restore any, because none of them were moved
-     213           28 :         if (k != n_models_bak) {
-     214              :             // Insert in the same order as they were extracted
-     215           24 :             int bak_size = models_bak.size();
-     216          144 :             for (int i = 0; i < bak_size; ++i) {
-     217          120 :                 model = std::move(models_bak[bak_size - 1 - i]);
-     218          120 :                 models_bak.erase(models_bak.end() - 1);
-     219          120 :                 models.insert(models.begin(), std::move(model));
-     220              :             }
-     221              :         }
-     222              :         // 8. significances <- significances_bak
-     223           28 :         significanceModels = significance_bak;
-     224              :         //
-     225              :         // Update the significance of the last k models
-     226              :         //
-     227              :         // 9. Update last k significances
-     228          104 :         for (int i = 0; i < k; ++i) {
-     229           76 :             significanceModels[n_models_bak - k + i] = alpha_t;
-     230              :         }
-     231              :         // 10. n_models <- n_models_bak
-     232           28 :         n_models = n_models_bak;
-     233           56 :         return { weights, alpha_t, terminate };
-     234           28 :     }
-     235           32 :     std::vector<int> BoostAODE::initializeModels()
-     236              :     {
-     237           32 :         std::vector<int> featuresUsed;
-     238           32 :         torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-     239           32 :         int maxFeatures = 0;
-     240           32 :         if (select_features_algorithm == SelectFeatures.CFS) {
-     241            8 :             featureSelector = new CFS(dataset, features, className, maxFeatures, states.at(className).size(), weights_);
-     242           24 :         } else if (select_features_algorithm == SelectFeatures.IWSS) {
-     243           12 :             if (threshold < 0 || threshold >0.5) {
-     244            8 :                 throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.IWSS + " [0, 0.5]");
-     245              :             }
-     246            4 :             featureSelector = new IWSS(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);
-     247           12 :         } else if (select_features_algorithm == SelectFeatures.FCBF) {
-     248           12 :             if (threshold < 1e-7 || threshold > 1) {
-     249            8 :                 throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.FCBF + " [1e-7, 1]");
-     250              :             }
-     251            4 :             featureSelector = new FCBF(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);
-     252              :         }
-     253           16 :         featureSelector->fit();
-     254           16 :         auto cfsFeatures = featureSelector->getFeatures();
-     255           16 :         auto scores = featureSelector->getScores();
-     256          100 :         for (const int& feature : cfsFeatures) {
-     257           84 :             featuresUsed.push_back(feature);
-     258           84 :             std::unique_ptr<Classifier> model = std::make_unique<SPODE>(feature);
-     259           84 :             model->fit(dataset, features, className, states, weights_);
-     260           84 :             models.push_back(std::move(model));
-     261           84 :             significanceModels.push_back(1.0); // They will be updated later in trainModel
-     262           84 :             n_models++;
-     263           84 :         }
-     264           16 :         notes.push_back("Used features in initialization: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()) + " with " + select_features_algorithm);
-     265           16 :         delete featureSelector;
-     266           32 :         return featuresUsed;
-     267           48 :     }
-     268           92 :     void BoostAODE::trainModel(const torch::Tensor& weights)
-     269              :     {
-     270              :         //
-     271              :         // Logging setup
-     272              :         //
-     273           92 :         loguru::set_thread_name("BoostAODE");
-     274           92 :         loguru::g_stderr_verbosity = loguru::Verbosity_OFF;
-     275           92 :         loguru::add_file("boostAODE.log", loguru::Truncate, loguru::Verbosity_MAX);
-     276              : 
-     277              :         // Algorithm based on the adaboost algorithm for classification
-     278              :         // as explained in Ensemble methods (Zhi-Hua Zhou, 2012)
-     279           92 :         fitted = true;
-     280           92 :         double alpha_t = 0;
-     281           92 :         torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);
-     282           92 :         bool finished = false;
-     283           92 :         std::vector<int> featuresUsed;
-     284           92 :         if (selectFeatures) {
-     285           32 :             featuresUsed = initializeModels();
-     286           16 :             auto ypred = predict(X_train);
-     287           16 :             std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-     288              :             // Update significance of the models
-     289          100 :             for (int i = 0; i < n_models; ++i) {
-     290           84 :                 significanceModels[i] = alpha_t;
-     291              :             }
-     292           16 :             if (finished) {
-     293            0 :                 return;
-     294              :             }
-     295           16 :         }
-     296           76 :         int numItemsPack = 0; // The counter of the models inserted in the current pack
-     297              :         // Variables to control the accuracy finish condition
-     298           76 :         double priorAccuracy = 0.0;
-     299           76 :         double improvement = 1.0;
-     300           76 :         double convergence_threshold = 1e-4;
-     301           76 :         int tolerance = 0; // number of times the accuracy is lower than the convergence_threshold
-     302              :         // Step 0: Set the finish condition
-     303              :         // epsilon sub t > 0.5 => inverse the weights policy
-     304              :         // validation error is not decreasing
-     305              :         // run out of features
-     306           76 :         bool ascending = order_algorithm == Orders.ASC;
-     307           76 :         std::mt19937 g{ 173 };
-     308          504 :         while (!finished) {
-     309              :             // Step 1: Build ranking with mutual information
-     310          428 :             auto featureSelection = metrics.SelectKBestWeighted(weights_, ascending, n); // Get all the features sorted
-     311          428 :             if (order_algorithm == Orders.RAND) {
-     312           36 :                 std::shuffle(featureSelection.begin(), featureSelection.end(), g);
-     313              :             }
-     314              :             // Remove used features
-     315          856 :             featureSelection.erase(remove_if(begin(featureSelection), end(featureSelection), [&](auto x)
-     316        38800 :                 { return std::find(begin(featuresUsed), end(featuresUsed), x) != end(featuresUsed);}),
-     317          428 :                 end(featureSelection)
-     318              :             );
-     319          428 :             int k = bisection ? pow(2, tolerance) : 1;
-     320          428 :             int counter = 0; // The model counter of the current pack
-     321          428 :             VLOG_SCOPE_F(1, "counter=%d k=%d featureSelection.size: %zu", counter, k, featureSelection.size());
-     322         1004 :             while (counter++ < k && featureSelection.size() > 0) {
-     323          576 :                 auto feature = featureSelection[0];
-     324          576 :                 featureSelection.erase(featureSelection.begin());
-     325          576 :                 std::unique_ptr<Classifier> model;
-     326          576 :                 model = std::make_unique<SPODE>(feature);
-     327          576 :                 model->fit(dataset, features, className, states, weights_);
-     328          576 :                 alpha_t = 0.0;
-     329          576 :                 if (!block_update) {
-     330          500 :                     auto ypred = model->predict(X_train);
-     331              :                     // Step 3.1: Compute the classifier amout of say
-     332          500 :                     std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);
-     333          500 :                 }
-     334              :                 // Step 3.4: Store classifier and its accuracy to weigh its future vote
-     335          576 :                 numItemsPack++;
-     336          576 :                 featuresUsed.push_back(feature);
-     337          576 :                 models.push_back(std::move(model));
-     338          576 :                 significanceModels.push_back(alpha_t);
-     339          576 :                 n_models++;
-     340          576 :                 VLOG_SCOPE_F(2, "numItemsPack: %d n_models: %d featuresUsed: %zu", numItemsPack, n_models, featuresUsed.size());
-     341          576 :             }
-     342          428 :             if (block_update) {
-     343           28 :                 std::tie(weights_, alpha_t, finished) = update_weights_block(k, y_train, weights_);
-     344              :             }
-     345          428 :             if (convergence && !finished) {
-     346          296 :                 auto y_val_predict = predict(X_test);
-     347          296 :                 double accuracy = (y_val_predict == y_test).sum().item<double>() / (double)y_test.size(0);
-     348          296 :                 if (priorAccuracy == 0) {
-     349           60 :                     priorAccuracy = accuracy;
-     350              :                 } else {
-     351          236 :                     improvement = accuracy - priorAccuracy;
-     352              :                 }
-     353          296 :                 if (improvement < convergence_threshold) {
-     354          176 :                     VLOG_SCOPE_F(3, "  (improvement<threshold) tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-     355          176 :                     tolerance++;
-     356          176 :                 } else {
-     357          120 :                     VLOG_SCOPE_F(3, "* (improvement>=threshold) Reset. tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);
-     358          120 :                     tolerance = 0; // Reset the counter if the model performs better
-     359          120 :                     numItemsPack = 0;
-     360          120 :                 }
-     361          296 :                 if (convergence_best) {
-     362              :                     // Keep the best accuracy until now as the prior accuracy
-     363           32 :                     priorAccuracy = std::max(accuracy, priorAccuracy);
-     364              :                 } else {
-     365              :                     // Keep the last accuray obtained as the prior accuracy
-     366          264 :                     priorAccuracy = accuracy;
-     367              :                 }
-     368          296 :             }
-     369          428 :             VLOG_SCOPE_F(1, "tolerance: %d featuresUsed.size: %zu features.size: %zu", tolerance, featuresUsed.size(), features.size());
-     370          428 :             finished = finished || tolerance > maxTolerance || featuresUsed.size() == features.size();
-     371          428 :         }
-     372           76 :         if (tolerance > maxTolerance) {
-     373            8 :             if (numItemsPack < n_models) {
-     374            8 :                 notes.push_back("Convergence threshold reached & " + std::to_string(numItemsPack) + " models eliminated");
-     375            8 :                 VLOG_SCOPE_F(4, "Convergence threshold reached & %d models eliminated of %d", numItemsPack, n_models);
-     376          104 :                 for (int i = 0; i < numItemsPack; ++i) {
-     377           96 :                     significanceModels.pop_back();
-     378           96 :                     models.pop_back();
-     379           96 :                     n_models--;
-     380              :                 }
-     381            8 :             } else {
-     382            0 :                 notes.push_back("Convergence threshold reached & 0 models eliminated");
-     383            0 :                 VLOG_SCOPE_F(4, "Convergence threshold reached & 0 models eliminated n_models=%d numItemsPack=%d", n_models, numItemsPack);
-     384            0 :             }
-     385              :         }
-     386           76 :         if (featuresUsed.size() != features.size()) {
-     387            4 :             notes.push_back("Used features in train: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()));
-     388            4 :             status = WARNING;
-     389              :         }
-     390           76 :         notes.push_back("Number of models: " + std::to_string(n_models));
-     391          108 :     }
-     392            4 :     std::vector<std::string> BoostAODE::graph(const std::string& title) const
-     393              :     {
-     394            4 :         return Ensemble::graph(title);
-     395              :     }
-     396              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.cc.gcov.overview.html b/html/bayesnet/ensembles/BoostAODE.cc.gcov.overview.html deleted file mode 100644 index 41fb2fd..0000000 --- a/html/bayesnet/ensembles/BoostAODE.cc.gcov.overview.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/BoostAODE.cc.gcov.png b/html/bayesnet/ensembles/BoostAODE.cc.gcov.png deleted file mode 100644 index 9690752107f1df8fbab54deb054c92b13f841980..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2128 zcmV-W2(R~vP)DhwWXfLjX*9gpUDu{SQd(3)BKKl7>PO$Tr=R@d9$*fijt!($|{N6FSk4 zCJ>I%<{e0y2sfr5O<*=QQL`Skkic%439t#1G6U%sWxQl@S?BQ)n8Xa45z@XB4@yFrZUcPJ?gJl%=W$K2eg)IOV*=< zgAELX{GL;oHBj6P#zAysWTCmJQ~!)wM>49KrthTzjAD2R;!~$+Uh&l!UP+C>-#s(q zvRJRn=qv@ik$kA_$cHvV-I@Ez$7LP&DO9Fb00D7M5z1YkM;kr{Hs`i)V=iNG6AJHv zFoTsfS2H&lRUcODTWyymY@MAoY{D<)ZwJy(4Uq7OR`E90Xq{NbJ9&7mN;9cHSY7Ag z7x)TMG-%Bf$ z#!}|r-s@#ASO?N{vYoHZK3QuN+wIEkaqIpMGW&XMY9LkL&_55JkPJ;gmQq-~W|?`| z*Ro`diQH5fo;HJ#?G=iBR*=p7vF%LV5sddc2EYvyzc#*t+M%c-mR5z|(d4<7J9g1~ zvkY_%{-E5;ZfBbBOon+WwLF!=yp=nj(!j7M?IacdipT7w)&R|*x(@d$%>aeLhZG6R*AHXT<4Li`}L=-zkmOJ{s~qC zhL{RmlaSvt&9~Yt5U9j%KQX7sGz_C!T)%qRJ?z}>$(yNpg3}by*+ONmBLYoU=wTn~ z=nIvpx{W$?iYz`}jh?NZe~bcFAjKhRRJ@n}u3=>sNae)0U0q{c$j*RcMFL_r?Bc}m zGvlp~{xCFMobDb!t%o=YN6)PXDcovU?mxZ4x>)4)hHubOaTyC$*gextq7ZE_tdJ5K ze6CCbVjLq0baBHQ8ucvTY@eq6dXn442cZ_oEyPqXi&}ss_)P11%X!L2doA!b(1`Xy z)5RR`&$C<(pc0mDwEHC~z2LLT+Rc0(vIaj1QOEUQ9_hYO*|W`VpT35p z0M0OAa9nTd!y|6^GLWW-lb1oCM@M1U4&z11uFMG)Hx};00GzVEtF`Q1^=XM_-I65W z7en>CfudKdJhr3bjbqpYItw6V^t`7V8%?`zN0Ff=%onf;yY=+JW*s?h#J2-)ce(U# zQ`d{PadPgUob@9&YXvc23b#*^q=BR=Y5?Xm)Q%!e#P+ixgK!fd2sZRsYzz89c-Q0000 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::BoostAODE::~BoostAODE()88
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.h.func.html b/html/bayesnet/ensembles/BoostAODE.h.func.html deleted file mode 100644 index 0d6e3e7..0000000 --- a/html/bayesnet/ensembles/BoostAODE.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::BoostAODE::~BoostAODE()88
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.h.gcov.frameset.html b/html/bayesnet/ensembles/BoostAODE.h.gcov.frameset.html deleted file mode 100644 index bf76400..0000000 --- a/html/bayesnet/ensembles/BoostAODE.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/BoostAODE.h.gcov.html b/html/bayesnet/ensembles/BoostAODE.h.gcov.html deleted file mode 100644 index f435ab1..0000000 --- a/html/bayesnet/ensembles/BoostAODE.h.gcov.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - BoostAODE.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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 <map>
-      10              : #include "bayesnet/classifiers/SPODE.h"
-      11              : #include "bayesnet/feature_selection/FeatureSelect.h"
-      12              : #include "Ensemble.h"
-      13              : namespace bayesnet {
-      14              :     const struct {
-      15              :         std::string CFS = "CFS";
-      16              :         std::string FCBF = "FCBF";
-      17              :         std::string IWSS = "IWSS";
-      18              :     }SelectFeatures;
-      19              :     const struct {
-      20              :         std::string ASC = "asc";
-      21              :         std::string DESC = "desc";
-      22              :         std::string RAND = "rand";
-      23              :     }Orders;
-      24              :     class BoostAODE : public Ensemble {
-      25              :     public:
-      26              :         explicit BoostAODE(bool predict_voting = false);
-      27           88 :         virtual ~BoostAODE() = default;
-      28              :         std::vector<std::string> graph(const std::string& title = "BoostAODE") const override;
-      29              :         void setHyperparameters(const nlohmann::json& hyperparameters_) override;
-      30              :     protected:
-      31              :         void buildModel(const torch::Tensor& weights) override;
-      32              :         void trainModel(const torch::Tensor& weights) override;
-      33              :     private:
-      34              :         std::tuple<torch::Tensor&, double, bool> update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights);
-      35              :         std::vector<int> initializeModels();
-      36              :         torch::Tensor X_train, y_train, X_test, y_test;
-      37              :         // Hyperparameters
-      38              :         bool bisection = true; // if true, use bisection stratety to add k models at once to the ensemble
-      39              :         int maxTolerance = 3;
-      40              :         std::string order_algorithm; // order to process the KBest features asc, desc, rand
-      41              :         bool convergence = true; //if true, stop when the model does not improve
-      42              :         bool convergence_best = false; // wether to keep the best accuracy to the moment or the last accuracy as prior accuracy
-      43              :         bool selectFeatures = false; // if true, use feature selection
-      44              :         std::string select_features_algorithm = Orders.DESC; // Selected feature selection algorithm
-      45              :         FeatureSelect* featureSelector = nullptr;
-      46              :         double threshold = -1;
-      47              :         bool block_update = false;
-      48              :     };
-      49              : }
-      50              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/BoostAODE.h.gcov.overview.html b/html/bayesnet/ensembles/BoostAODE.h.gcov.overview.html deleted file mode 100644 index b0556d7..0000000 --- a/html/bayesnet/ensembles/BoostAODE.h.gcov.overview.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/BoostAODE.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/BoostAODE.h.gcov.png b/html/bayesnet/ensembles/BoostAODE.h.gcov.png deleted file mode 100644 index 193c4ce28eb56d8ea14c98ca64eb1e537f64bd52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfT!VDxWnH|pqDTx4|5ZC|z|E~gq-c`z zZaCHAbpP|rV*iHXKMZ;*x$-=|p(5qA zhw|d;swqqbdumcs^!t{#nreNh$g1t!?I88#N?eITwmQT0Q!64Ab8Vb-R@J_cvo4hH zw#t1Jd3xum4FTI)pUe)HR|+Vc#(#8khg5F+q~8}78szdU`?`!wej3^bHOg?b0RxP|)78&qol`;+05!&;00000 diff --git a/html/bayesnet/ensembles/Ensemble.cc.func-c.html b/html/bayesnet/ensembles/Ensemble.cc.func-c.html deleted file mode 100644 index a883be2..0000000 --- a/html/bayesnet/ensembles/Ensemble.cc.func-c.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %155155
Test Date:2024-05-06 17:54:04Functions:100.0 %2525
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Ensemble::getNumberOfStates() const4
bayesnet::Ensemble::show[abi:cxx11]() const4
bayesnet::Ensemble::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const16
bayesnet::Ensemble::getNumberOfEdges() const28
bayesnet::Ensemble::getNumberOfNodes() const28
bayesnet::Ensemble::predict_average_voting(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)32
bayesnet::Ensemble::trainModel(at::Tensor const&)40
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)44
bayesnet::Ensemble::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&)52
bayesnet::Ensemble::compute_arg_max(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&)56
bayesnet::Ensemble::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)68
bayesnet::Ensemble::score(at::Tensor&, at::Tensor&)80
bayesnet::Ensemble::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)100
bayesnet::Ensemble::predict_average_voting(at::Tensor&)164
bayesnet::Ensemble::voting(at::Tensor&)164
bayesnet::Ensemble::predict_average_proba(at::Tensor&)296
bayesnet::Ensemble::Ensemble(bool)324
bayesnet::Ensemble::compute_arg_max(at::Tensor&)424
bayesnet::Ensemble::predict(at::Tensor&)436
bayesnet::Ensemble::predict_proba(at::Tensor&)452
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda()#1}::operator()() const532
bayesnet::Ensemble::predict_average_voting(at::Tensor&)::{lambda()#1}::operator()() const1216
bayesnet::Ensemble::predict_average_proba(at::Tensor&)::{lambda()#1}::operator()() const1468
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda(double)#1}::operator()(double) const43152
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda()#1}::operator()() const::{lambda(double, double)#1}::operator()(double, double) const629712
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.cc.func.html b/html/bayesnet/ensembles/Ensemble.cc.func.html deleted file mode 100644 index 4a8acaf..0000000 --- a/html/bayesnet/ensembles/Ensemble.cc.func.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %155155
Test Date:2024-05-06 17:54:04Functions:100.0 %2525
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Ensemble::Ensemble(bool)324
bayesnet::Ensemble::compute_arg_max(at::Tensor&)424
bayesnet::Ensemble::compute_arg_max(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&)56
bayesnet::Ensemble::getNumberOfEdges() const28
bayesnet::Ensemble::getNumberOfNodes() const28
bayesnet::Ensemble::getNumberOfStates() const4
bayesnet::Ensemble::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const16
bayesnet::Ensemble::predict(at::Tensor&)436
bayesnet::Ensemble::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)68
bayesnet::Ensemble::predict_average_proba(at::Tensor&)296
bayesnet::Ensemble::predict_average_proba(at::Tensor&)::{lambda()#1}::operator()() const1468
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)44
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda()#1}::operator()() const532
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda()#1}::operator()() const::{lambda(double, double)#1}::operator()(double, double) const629712
bayesnet::Ensemble::predict_average_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)::{lambda(double)#1}::operator()(double) const43152
bayesnet::Ensemble::predict_average_voting(at::Tensor&)164
bayesnet::Ensemble::predict_average_voting(at::Tensor&)::{lambda()#1}::operator()() const1216
bayesnet::Ensemble::predict_average_voting(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)32
bayesnet::Ensemble::predict_proba(at::Tensor&)452
bayesnet::Ensemble::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&)100
bayesnet::Ensemble::score(at::Tensor&, at::Tensor&)80
bayesnet::Ensemble::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<int, std::allocator<int> >&)52
bayesnet::Ensemble::show[abi:cxx11]() const4
bayesnet::Ensemble::trainModel(at::Tensor const&)40
bayesnet::Ensemble::voting(at::Tensor&)164
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.cc.gcov.frameset.html b/html/bayesnet/ensembles/Ensemble.cc.gcov.frameset.html deleted file mode 100644 index 0a30b16..0000000 --- a/html/bayesnet/ensembles/Ensemble.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/Ensemble.cc.gcov.html b/html/bayesnet/ensembles/Ensemble.cc.gcov.html deleted file mode 100644 index 9113988..0000000 --- a/html/bayesnet/ensembles/Ensemble.cc.gcov.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %155155
Test Date:2024-05-06 17:54:04Functions:100.0 %2525
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10              : 
-      11          324 :     Ensemble::Ensemble(bool predict_voting) : Classifier(Network()), n_models(0), predict_voting(predict_voting)
-      12              :     {
-      13              : 
-      14          324 :     };
-      15              :     const std::string ENSEMBLE_NOT_FITTED = "Ensemble has not been fitted";
-      16           40 :     void Ensemble::trainModel(const torch::Tensor& weights)
-      17              :     {
-      18           40 :         n_models = models.size();
-      19          660 :         for (auto i = 0; i < n_models; ++i) {
-      20              :             // fit with std::vectors
-      21          620 :             models[i]->fit(dataset, features, className, states);
-      22              :         }
-      23           40 :     }
-      24           56 :     std::vector<int> Ensemble::compute_arg_max(std::vector<std::vector<double>>& X)
-      25              :     {
-      26           56 :         std::vector<int> y_pred;
-      27        12400 :         for (auto i = 0; i < X.size(); ++i) {
-      28        12344 :             auto max = std::max_element(X[i].begin(), X[i].end());
-      29        24688 :             y_pred.push_back(std::distance(X[i].begin(), max));
-      30              :         }
-      31          112 :         return y_pred;
-      32           56 :     }
-      33          424 :     torch::Tensor Ensemble::compute_arg_max(torch::Tensor& X)
-      34              :     {
-      35          424 :         auto y_pred = torch::argmax(X, 1);
-      36          848 :         return y_pred;
-      37          424 :     }
-      38          164 :     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          164 :         auto y_pred_ = votes.accessor<int, 2>();
-      42          164 :         std::vector<int> y_pred_final;
-      43          164 :         int numClasses = states.at(className).size();
-      44              :         // votes is m x n_models with the prediction of every model for each sample
-      45          164 :         auto result = torch::zeros({ votes.size(0), numClasses }, torch::kFloat32);
-      46          164 :         auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-      47        42084 :         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        41920 :             std::vector<double> n_votes(numClasses, 0.0);
-      51       375272 :             for (int j = 0; j < n_models; ++j) {
-      52       333352 :                 n_votes[y_pred_[i][j]] += significanceModels.at(j);
-      53              :             }
-      54        41920 :             result[i] = torch::tensor(n_votes);
-      55        41920 :         }
-      56              :         // To only do one division and gain precision
-      57          164 :         result /= sum;
-      58          328 :         return result;
-      59          164 :     }
-      60          100 :     std::vector<std::vector<double>> Ensemble::predict_proba(std::vector<std::vector<int>>& X)
-      61              :     {
-      62          100 :         if (!fitted) {
-      63           24 :             throw std::logic_error(ENSEMBLE_NOT_FITTED);
-      64              :         }
-      65           76 :         return predict_voting ? predict_average_voting(X) : predict_average_proba(X);
-      66              :     }
-      67          452 :     torch::Tensor Ensemble::predict_proba(torch::Tensor& X)
-      68              :     {
-      69          452 :         if (!fitted) {
-      70           24 :             throw std::logic_error(ENSEMBLE_NOT_FITTED);
-      71              :         }
-      72          428 :         return predict_voting ? predict_average_voting(X) : predict_average_proba(X);
-      73              :     }
-      74           68 :     std::vector<int> Ensemble::predict(std::vector<std::vector<int>>& X)
-      75              :     {
-      76           68 :         auto res = predict_proba(X);
-      77          104 :         return compute_arg_max(res);
-      78           52 :     }
-      79          436 :     torch::Tensor Ensemble::predict(torch::Tensor& X)
-      80              :     {
-      81          436 :         auto res = predict_proba(X);
-      82          840 :         return compute_arg_max(res);
-      83          420 :     }
-      84          296 :     torch::Tensor Ensemble::predict_average_proba(torch::Tensor& X)
-      85              :     {
-      86          296 :         auto n_states = models[0]->getClassNumStates();
-      87          296 :         torch::Tensor y_pred = torch::zeros({ X.size(1), n_states }, torch::kFloat32);
-      88          296 :         auto threads{ std::vector<std::thread>() };
-      89          296 :         std::mutex mtx;
-      90         1764 :         for (auto i = 0; i < n_models; ++i) {
-      91         1468 :             threads.push_back(std::thread([&, i]() {
-      92         1468 :                 auto ypredict = models[i]->predict_proba(X);
-      93         1468 :                 std::lock_guard<std::mutex> lock(mtx);
-      94         1468 :                 y_pred += ypredict * significanceModels[i];
-      95         1468 :                 }));
-      96              :         }
-      97         1764 :         for (auto& thread : threads) {
-      98         1468 :             thread.join();
-      99              :         }
-     100          296 :         auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-     101          296 :         y_pred /= sum;
-     102          592 :         return y_pred;
-     103          296 :     }
-     104           44 :     std::vector<std::vector<double>> Ensemble::predict_average_proba(std::vector<std::vector<int>>& X)
-     105              :     {
-     106           44 :         auto n_states = models[0]->getClassNumStates();
-     107           44 :         std::vector<std::vector<double>> y_pred(X[0].size(), std::vector<double>(n_states, 0.0));
-     108           44 :         auto threads{ std::vector<std::thread>() };
-     109           44 :         std::mutex mtx;
-     110          576 :         for (auto i = 0; i < n_models; ++i) {
-     111          532 :             threads.push_back(std::thread([&, i]() {
-     112          532 :                 auto ypredict = models[i]->predict_proba(X);
-     113          532 :                 assert(ypredict.size() == y_pred.size());
-     114          532 :                 assert(ypredict[0].size() == y_pred[0].size());
-     115          532 :                 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       110284 :                 for (auto j = 0; j < ypredict.size(); ++j) {
-     118       109752 :                     std::transform(y_pred[j].begin(), y_pred[j].end(), ypredict[j].begin(), y_pred[j].begin(),
-     119       739464 :                         [significanceModels = significanceModels[i]](double x, double y) { return x + y * significanceModels; });
-     120              :                 }
-     121          532 :                 }));
-     122              :         }
-     123          576 :         for (auto& thread : threads) {
-     124          532 :             thread.join();
-     125              :         }
-     126           44 :         auto sum = std::reduce(significanceModels.begin(), significanceModels.end());
-     127              :         //Divide each element of the prediction by the sum of the significances
-     128         8436 :         for (auto j = 0; j < y_pred.size(); ++j) {
-     129        51544 :             std::transform(y_pred[j].begin(), y_pred[j].end(), y_pred[j].begin(), [sum](double x) { return x / sum; });
-     130              :         }
-     131           88 :         return y_pred;
-     132           44 :     }
-     133           32 :     std::vector<std::vector<double>> Ensemble::predict_average_voting(std::vector<std::vector<int>>& X)
-     134              :     {
-     135           32 :         torch::Tensor Xt = bayesnet::vectorToTensor(X, false);
-     136           32 :         auto y_pred = predict_average_voting(Xt);
-     137           32 :         std::vector<std::vector<double>> result = tensorToVectorDouble(y_pred);
-     138           64 :         return result;
-     139           32 :     }
-     140          164 :     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          164 :         torch::Tensor y_pred = torch::zeros({ X.size(1), n_models }, torch::kInt32);
-     144          164 :         auto threads{ std::vector<std::thread>() };
-     145          164 :         std::mutex mtx;
-     146         1380 :         for (auto i = 0; i < n_models; ++i) {
-     147         1216 :             threads.push_back(std::thread([&, i]() {
-     148         1216 :                 auto ypredict = models[i]->predict(X);
-     149         1216 :                 std::lock_guard<std::mutex> lock(mtx);
-     150         3648 :                 y_pred.index_put_({ "...", i }, ypredict);
-     151         2432 :                 }));
-     152              :         }
-     153         1380 :         for (auto& thread : threads) {
-     154         1216 :             thread.join();
-     155              :         }
-     156          328 :         return voting(y_pred);
-     157          164 :     }
-     158           80 :     float Ensemble::score(torch::Tensor& X, torch::Tensor& y)
-     159              :     {
-     160           80 :         auto y_pred = predict(X);
-     161           72 :         int correct = 0;
-     162        22584 :         for (int i = 0; i < y_pred.size(0); ++i) {
-     163        22512 :             if (y_pred[i].item<int>() == y[i].item<int>()) {
-     164        19668 :                 correct++;
-     165              :             }
-     166              :         }
-     167          144 :         return (double)correct / y_pred.size(0);
-     168           72 :     }
-     169           52 :     float Ensemble::score(std::vector<std::vector<int>>& X, std::vector<int>& y)
-     170              :     {
-     171           52 :         auto y_pred = predict(X);
-     172           44 :         int correct = 0;
-     173        11164 :         for (int i = 0; i < y_pred.size(); ++i) {
-     174        11120 :             if (y_pred[i] == y[i]) {
-     175         9276 :                 correct++;
-     176              :             }
-     177              :         }
-     178           88 :         return (double)correct / y_pred.size();
-     179           44 :     }
-     180            4 :     std::vector<std::string> Ensemble::show() const
-     181              :     {
-     182            4 :         auto result = std::vector<std::string>();
-     183           20 :         for (auto i = 0; i < n_models; ++i) {
-     184           16 :             auto res = models[i]->show();
-     185           16 :             result.insert(result.end(), res.begin(), res.end());
-     186           16 :         }
-     187            8 :         return result;
-     188            4 :     }
-     189           16 :     std::vector<std::string> Ensemble::graph(const std::string& title) const
-     190              :     {
-     191           16 :         auto result = std::vector<std::string>();
-     192          108 :         for (auto i = 0; i < n_models; ++i) {
-     193           92 :             auto res = models[i]->graph(title + "_" + std::to_string(i));
-     194           92 :             result.insert(result.end(), res.begin(), res.end());
-     195           92 :         }
-     196           32 :         return result;
-     197           16 :     }
-     198           28 :     int Ensemble::getNumberOfNodes() const
-     199              :     {
-     200           28 :         int nodes = 0;
-     201          348 :         for (auto i = 0; i < n_models; ++i) {
-     202          320 :             nodes += models[i]->getNumberOfNodes();
-     203              :         }
-     204           28 :         return nodes;
-     205              :     }
-     206           28 :     int Ensemble::getNumberOfEdges() const
-     207              :     {
-     208           28 :         int edges = 0;
-     209          348 :         for (auto i = 0; i < n_models; ++i) {
-     210          320 :             edges += models[i]->getNumberOfEdges();
-     211              :         }
-     212           28 :         return edges;
-     213              :     }
-     214            4 :     int Ensemble::getNumberOfStates() const
-     215              :     {
-     216            4 :         int nstates = 0;
-     217           20 :         for (auto i = 0; i < n_models; ++i) {
-     218           16 :             nstates += models[i]->getNumberOfStates();
-     219              :         }
-     220            4 :         return nstates;
-     221              :     }
-     222              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.cc.gcov.overview.html b/html/bayesnet/ensembles/Ensemble.cc.gcov.overview.html deleted file mode 100644 index 8f27468..0000000 --- a/html/bayesnet/ensembles/Ensemble.cc.gcov.overview.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/Ensemble.cc.gcov.png b/html/bayesnet/ensembles/Ensemble.cc.gcov.png deleted file mode 100644 index 5c1d1c73604c53bb2263c6a49198665849939b4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 912 zcmV;B18@9^P)Mm;0KJEsX}~;$c6I zd;VeRL;1hsJTr?&eNI()hdMpAl=!FLu;-uKaw|F}K2wA&{#NIpD*+ak; zb1YW3&L0gsk6Gp%Xy7prDU@t!?RjJam`5!xEc8^(|lBl0=0 z=InNKKx@R6Zfx#e6LH~ssqks^j4J^232016HJU9MGX*~DYv{J?FE&QlbfHubE60m) z#*${hL7TRGN+X_SE~%y9n@NOWWzB$=vQXI3ZAzABG|N?BD^U8917pVGi5pem%w}@{ zK+nnwJqES(yl(2{D&?bcp>5A-lh><{-!r9%Q_8}2a;&uA6gc07iAu;K!LzGWhbt6y zmT&b^p@{jB0eMM`@);<=v&HteBSosIi|^tEl=l?WR=E0BF<#+f@;meZR8H8q(sV&d zdZV}2EQpVdB{rhEHU85r5})hQD_sT0x(e|%m+t80caM$Azft#$fUUrDU}UL-equB$ zdvpdgtZ=!yOV)fz6Y#Wq9f0Q&Wvgitad`z?Z?x>X58)z4DZh{yC1xI1UhOS}BVQ1T53lezhyU}qF!h^x?4zw!qA?e)m)9MU mN-=ER*JrN)i&n4xlgT&X@&!Q55^V+m0000 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %55
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Ensemble::dump_cpt[abi:cxx11]() const8
bayesnet::Ensemble::topological_order[abi:cxx11]()12
bayesnet::Ensemble::~Ensemble()124
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.h.func.html b/html/bayesnet/ensembles/Ensemble.h.func.html deleted file mode 100644 index d0e8f25..0000000 --- a/html/bayesnet/ensembles/Ensemble.h.func.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %55
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Ensemble::dump_cpt[abi:cxx11]() const8
bayesnet::Ensemble::topological_order[abi:cxx11]()12
bayesnet::Ensemble::~Ensemble()124
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.h.gcov.frameset.html b/html/bayesnet/ensembles/Ensemble.h.gcov.frameset.html deleted file mode 100644 index e552355..0000000 --- a/html/bayesnet/ensembles/Ensemble.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/ensembles/Ensemble.h.gcov.html b/html/bayesnet/ensembles/Ensemble.h.gcov.html deleted file mode 100644 index e0df189..0000000 --- a/html/bayesnet/ensembles/Ensemble.h.gcov.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensembles - Ensemble.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %55
Test Date:2024-05-06 17:54:04Functions:100.0 %33
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      14              : namespace bayesnet {
-      15              :     class Ensemble : public Classifier {
-      16              :     public:
-      17              :         Ensemble(bool predict_voting = true);
-      18          124 :         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           12 :         std::vector<std::string> topological_order()  override
-      31              :         {
-      32           12 :             return std::vector<std::string>();
-      33              :         }
-      34            8 :         std::string dump_cpt() const override
-      35              :         {
-      36           16 :             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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/Ensemble.h.gcov.overview.html b/html/bayesnet/ensembles/Ensemble.h.gcov.overview.html deleted file mode 100644 index 494a8f3..0000000 --- a/html/bayesnet/ensembles/Ensemble.h.gcov.overview.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles/Ensemble.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/ensembles/Ensemble.h.gcov.png b/html/bayesnet/ensembles/Ensemble.h.gcov.png deleted file mode 100644 index ade558642b87c9418ccc47436414358f255c8b3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfZ!VDx;*b2*mlth3}i0l9V|5pLQ^7pZ^ul_SI ztOAOIsdL_&mjcP!>K~bUJeTMGe-*yj zw~s8X@6Jd|5#%=#>?*yz!O>Nz$Mb{fU%uB*cgIY=wq&)!^FL4Y=T+_2DS7lj>D{l# z3yu_b3XfB8=Ix!HSZ*OwEItqZ+39?kuJ?Ol&y)~C?5 zZh_O6Y*kXpewpm5DL(D_tm_&_fAtnWiku@-Z@l+{`XuLP8chjKM*KJ4slUwS?znrs e{07I;N6Z3@MGikc=qv&T7=x#)pUXO@geCx1rlunR diff --git a/html/bayesnet/ensembles/index-detail-sort-f.html b/html/bayesnet/ensembles/index-detail-sort-f.html deleted file mode 100644 index dc31de1..0000000 --- a/html/bayesnet/ensembles/index-detail-sort-f.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/index-detail-sort-l.html b/html/bayesnet/ensembles/index-detail-sort-l.html deleted file mode 100644 index 3871cd2..0000000 --- a/html/bayesnet/ensembles/index-detail-sort-l.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/index-detail.html b/html/bayesnet/ensembles/index-detail.html deleted file mode 100644 index 2f18267..0000000 --- a/html/bayesnet/ensembles/index-detail.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/index-sort-f.html b/html/bayesnet/ensembles/index-sort-f.html deleted file mode 100644 index dc31de1..0000000 --- a/html/bayesnet/ensembles/index-sort-f.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/index-sort-l.html b/html/bayesnet/ensembles/index-sort-l.html deleted file mode 100644 index 3871cd2..0000000 --- a/html/bayesnet/ensembles/index-sort-l.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/ensembles/index.html b/html/bayesnet/ensembles/index.html deleted file mode 100644 index 2f18267..0000000 --- a/html/bayesnet/ensembles/index.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/ensembles - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/ensemblesCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.1 %468464
Test Date:2024-05-06 17:54:04Functions:100.0 %5454
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
A2DE.cc -
100.0%
-
100.0 %2323100.0 %44
A2DE.h -
100.0%
-
100.0 %11100.0 %11
AODE.cc -
100.0%
-
100.0 %2020100.0 %44
AODE.h -
100.0%
-
100.0 %11100.0 %11
AODELd.cc -
100.0%
-
100.0 %2424100.0 %55
AODELd.h -
100.0%
-
100.0 %11100.0 %11
BoostAODE.cc -
98.3%98.3%
-
98.3 %237233100.0 %99
BoostAODE.h -
100.0%
-
100.0 %11100.0 %11
Ensemble.cc -
100.0%
-
100.0 %155155100.0 %2525
Ensemble.h -
100.0%
-
100.0 %55100.0 %33
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.cc.func-c.html b/html/bayesnet/feature_selection/CFS.cc.func-c.html deleted file mode 100644 index f592051..0000000 --- a/html/bayesnet/feature_selection/CFS.cc.func-c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.8 %4544
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::CFS::fit()48
bayesnet::CFS::computeContinueCondition(std::vector<int, std::allocator<int> > const&)220
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.cc.func.html b/html/bayesnet/feature_selection/CFS.cc.func.html deleted file mode 100644 index 08a008e..0000000 --- a/html/bayesnet/feature_selection/CFS.cc.func.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.8 %4544
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::CFS::computeContinueCondition(std::vector<int, std::allocator<int> > const&)220
bayesnet::CFS::fit()48
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.cc.gcov.frameset.html b/html/bayesnet/feature_selection/CFS.cc.gcov.frameset.html deleted file mode 100644 index 588ad50..0000000 --- a/html/bayesnet/feature_selection/CFS.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/CFS.cc.gcov.html b/html/bayesnet/feature_selection/CFS.cc.gcov.html deleted file mode 100644 index 8b25468..0000000 --- a/html/bayesnet/feature_selection/CFS.cc.gcov.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:97.8 %4544
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include <limits>
-       8              : #include "bayesnet/utils/bayesnetUtils.h"
-       9              : #include "CFS.h"
-      10              : namespace bayesnet {
-      11           48 :     void CFS::fit()
-      12              :     {
-      13           48 :         initialize();
-      14           48 :         computeSuLabels();
-      15           48 :         auto featureOrder = argsort(suLabels); // sort descending order
-      16           48 :         auto continueCondition = true;
-      17           48 :         auto feature = featureOrder[0];
-      18           48 :         selectedFeatures.push_back(feature);
-      19           48 :         selectedScores.push_back(suLabels[feature]);
-      20           48 :         featureOrder.erase(featureOrder.begin());
-      21          268 :         while (continueCondition) {
-      22          220 :             double merit = std::numeric_limits<double>::lowest();
-      23          220 :             int bestFeature = -1;
-      24         1250 :             for (auto feature : featureOrder) {
-      25         1030 :                 selectedFeatures.push_back(feature);
-      26              :                 // Compute merit with selectedFeatures
-      27         1030 :                 auto meritNew = computeMeritCFS();
-      28         1030 :                 if (meritNew > merit) {
-      29          450 :                     merit = meritNew;
-      30          450 :                     bestFeature = feature;
-      31              :                 }
-      32         1030 :                 selectedFeatures.pop_back();
-      33              :             }
-      34          220 :             if (bestFeature == -1) {
-      35              :                 // meritNew has to be nan due to constant features
-      36            0 :                 break;
-      37              :             }
-      38          220 :             selectedFeatures.push_back(bestFeature);
-      39          220 :             selectedScores.push_back(merit);
-      40          220 :             featureOrder.erase(remove(featureOrder.begin(), featureOrder.end(), bestFeature), featureOrder.end());
-      41          220 :             continueCondition = computeContinueCondition(featureOrder);
-      42              :         }
-      43           48 :         fitted = true;
-      44           48 :     }
-      45          220 :     bool CFS::computeContinueCondition(const std::vector<int>& featureOrder)
-      46              :     {
-      47          220 :         if (selectedFeatures.size() == maxFeatures || featureOrder.size() == 0) {
-      48           10 :             return false;
-      49              :         }
-      50          210 :         if (selectedScores.size() >= 5) {
-      51              :             /*
-      52              :             "To prevent the best first search from exploring the entire
-      53              :             feature subset search space, a stopping criterion is imposed.
-      54              :             The search will terminate if five consecutive fully expanded
-      55              :             subsets show no improvement over the current best subset."
-      56              :             as stated in Mark A.Hall Thesis
-      57              :             */
-      58           76 :             double item_ant = std::numeric_limits<double>::lowest();
-      59           76 :             int num = 0;
-      60           76 :             std::vector<double> lastFive(selectedScores.end() - 5, selectedScores.end());
-      61          304 :             for (auto item : lastFive) {
-      62          266 :                 if (item_ant == std::numeric_limits<double>::lowest()) {
-      63           76 :                     item_ant = item;
-      64              :                 }
-      65          266 :                 if (item > item_ant) {
-      66           38 :                     break;
-      67              :                 } else {
-      68          228 :                     num++;
-      69          228 :                     item_ant = item;
-      70              :                 }
-      71              :             }
-      72           76 :             if (num == 5) {
-      73           38 :                 return false;
-      74              :             }
-      75           76 :         }
-      76          172 :         return true;
-      77              :     }
-      78              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.cc.gcov.overview.html b/html/bayesnet/feature_selection/CFS.cc.gcov.overview.html deleted file mode 100644 index dd09ca9..0000000 --- a/html/bayesnet/feature_selection/CFS.cc.gcov.overview.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/CFS.cc.gcov.png b/html/bayesnet/feature_selection/CFS.cc.gcov.png deleted file mode 100644 index c4f8398ccddb23303f3d917403ceabb0a6303591..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmV+$0_6RPP)%AsmBP?ne1kWI%LseiSmpKH5I51L$$q+28PxkN+azL)3D zOIZIi^XEgJdV71D`v27=FHk);4Nb}G@*7_ca%a}(R_75fDBKxwXC{@%N2KUt-}=Y0 zsLU02MunYXXb7ljmD7bnv@8qreqwZ`8?-6Z^aJVsZruHS4rDgpNz(yc-o)X^Jd dZzC~P{sBRYiLRJHW%d97002ovPDHLkV1nqN@4o;5 diff --git a/html/bayesnet/feature_selection/CFS.h.func-c.html b/html/bayesnet/feature_selection/CFS.h.func-c.html deleted file mode 100644 index 88141b1..0000000 --- a/html/bayesnet/feature_selection/CFS.h.func-c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::CFS::CFS(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&)29
bayesnet::CFS::~CFS()116
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.h.func.html b/html/bayesnet/feature_selection/CFS.h.func.html deleted file mode 100644 index 25055ab..0000000 --- a/html/bayesnet/feature_selection/CFS.h.func.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::CFS::CFS(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&)29
bayesnet::CFS::~CFS()116
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.h.gcov.frameset.html b/html/bayesnet/feature_selection/CFS.h.gcov.frameset.html deleted file mode 100644 index ee18ddb..0000000 --- a/html/bayesnet/feature_selection/CFS.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/CFS.h.gcov.html b/html/bayesnet/feature_selection/CFS.h.gcov.html deleted file mode 100644 index dcc0e27..0000000 --- a/html/bayesnet/feature_selection/CFS.h.gcov.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - CFS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %44
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef CFS_H
-       8              : #define CFS_H
-       9              : #include <torch/torch.h>
-      10              : #include <vector>
-      11              : #include "bayesnet/feature_selection/FeatureSelect.h"
-      12              : namespace bayesnet {
-      13              :     class CFS : public FeatureSelect {
-      14              :     public:
-      15              :         // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
-      16           29 :         CFS(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights) :
-      17           29 :             FeatureSelect(samples, features, className, maxFeatures, classNumStates, weights)
-      18              :         {
-      19           29 :         }
-      20          116 :         virtual ~CFS() {};
-      21              :         void fit() override;
-      22              :     private:
-      23              :         bool computeContinueCondition(const std::vector<int>& featureOrder);
-      24              :     };
-      25              : }
-      26              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/CFS.h.gcov.overview.html b/html/bayesnet/feature_selection/CFS.h.gcov.overview.html deleted file mode 100644 index 3eec86d..0000000 --- a/html/bayesnet/feature_selection/CFS.h.gcov.overview.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/CFS.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/CFS.h.gcov.png b/html/bayesnet/feature_selection/CFS.h.gcov.png deleted file mode 100644 index 7278b3e79d72bf74e141dc0236a79f1bdaba5672..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIp!VDxY{W&%TNJ#|vgt-3y|9=$_EPo#x`|3Xf z!z!RSm^$aZc`1<1S>O>_%)r2R1cVukWo) z_kC3w8knxud=ZGhEMwX(lRa|{pNQCzuA)Xpm&<=vofF(z&%DlP)zOO2o%;_+1+(Va zMjwx>Xv*YX - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FCBF::fit()56
bayesnet::FCBF::FCBF(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&, double)76
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.cc.func.html b/html/bayesnet/feature_selection/FCBF.cc.func.html deleted file mode 100644 index 268b9d7..0000000 --- a/html/bayesnet/feature_selection/FCBF.cc.func.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FCBF::FCBF(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&, double)76
bayesnet::FCBF::fit()56
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.cc.gcov.frameset.html b/html/bayesnet/feature_selection/FCBF.cc.gcov.frameset.html deleted file mode 100644 index 4878c98..0000000 --- a/html/bayesnet/feature_selection/FCBF.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/FCBF.cc.gcov.html b/html/bayesnet/feature_selection/FCBF.cc.gcov.html deleted file mode 100644 index 8d88c3f..0000000 --- a/html/bayesnet/feature_selection/FCBF.cc.gcov.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2626
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include "bayesnet/utils/bayesnetUtils.h"
-       8              : #include "FCBF.h"
-       9              : namespace bayesnet {
-      10              : 
-      11           76 :     FCBF::FCBF(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights, const double threshold) :
-      12           76 :         FeatureSelect(samples, features, className, maxFeatures, classNumStates, weights), threshold(threshold)
-      13              :     {
-      14           76 :         if (threshold < 1e-7) {
-      15           20 :             throw std::invalid_argument("Threshold cannot be less than 1e-7");
-      16              :         }
-      17           76 :     }
-      18           56 :     void FCBF::fit()
-      19              :     {
-      20           56 :         initialize();
-      21           56 :         computeSuLabels();
-      22           56 :         auto featureOrder = argsort(suLabels); // sort descending order
-      23           56 :         auto featureOrderCopy = featureOrder;
-      24          419 :         for (const auto& feature : featureOrder) {
-      25              :             // Don't self compare
-      26          372 :             featureOrderCopy.erase(featureOrderCopy.begin());
-      27          372 :             if (suLabels.at(feature) == 0.0) {
-      28              :                 // The feature has been removed from the list
-      29          153 :                 continue;
-      30              :             }
-      31          219 :             if (suLabels.at(feature) < threshold) {
-      32            5 :                 break;
-      33              :             }
-      34              :             // Remove redundant features
-      35         1220 :             for (const auto& featureCopy : featureOrderCopy) {
-      36         1006 :                 double value = computeSuFeatures(feature, featureCopy);
-      37         1006 :                 if (value >= suLabels.at(featureCopy)) {
-      38              :                     // Remove feature from list
-      39          333 :                     suLabels[featureCopy] = 0.0;
-      40              :                 }
-      41              :             }
-      42          214 :             selectedFeatures.push_back(feature);
-      43          214 :             selectedScores.push_back(suLabels[feature]);
-      44          214 :             if (selectedFeatures.size() == maxFeatures) {
-      45            4 :                 break;
-      46              :             }
-      47              :         }
-      48           56 :         fitted = true;
-      49           56 :     }
-      50              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.cc.gcov.overview.html b/html/bayesnet/feature_selection/FCBF.cc.gcov.overview.html deleted file mode 100644 index daa8e3d..0000000 --- a/html/bayesnet/feature_selection/FCBF.cc.gcov.overview.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/FCBF.cc.gcov.png b/html/bayesnet/feature_selection/FCBF.cc.gcov.png deleted file mode 100644 index 1a469dc7b3b25dd5cdec47ae6fae1ab771ad5f9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 397 zcmV;80doF{P);Zr z*tCboG|q3pmBwQmIcNnd&=;q`R*LvpjAJ<$HlRP`cPPrB+@PSHhH*gn8^nBKmx1^jA&o02oQZ=9e zZPfMD8bKpGIiqU2;O*AwduV3eQEtkVodzW&&b1ogu0Wjoc8vyi9-Ywk*jk{j3yw=^ rCG+2*ILJBll~S9$3w^lF&aj++;z;fA(iR;V00000NkvXXu0mjf@>H#( diff --git a/html/bayesnet/feature_selection/FCBF.h.func-c.html b/html/bayesnet/feature_selection/FCBF.h.func-c.html deleted file mode 100644 index 6966211..0000000 --- a/html/bayesnet/feature_selection/FCBF.h.func-c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FCBF::~FCBF()56
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.h.func.html b/html/bayesnet/feature_selection/FCBF.h.func.html deleted file mode 100644 index 137b177..0000000 --- a/html/bayesnet/feature_selection/FCBF.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FCBF::~FCBF()56
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.h.gcov.frameset.html b/html/bayesnet/feature_selection/FCBF.h.gcov.frameset.html deleted file mode 100644 index f36d486..0000000 --- a/html/bayesnet/feature_selection/FCBF.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/FCBF.h.gcov.html b/html/bayesnet/feature_selection/FCBF.h.gcov.html deleted file mode 100644 index 19d3186..0000000 --- a/html/bayesnet/feature_selection/FCBF.h.gcov.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FCBF.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef FCBF_H
-       8              : #define FCBF_H
-       9              : #include <torch/torch.h>
-      10              : #include <vector>
-      11              : #include "bayesnet/feature_selection/FeatureSelect.h"
-      12              : namespace bayesnet {
-      13              :     class FCBF : public FeatureSelect {
-      14              :     public:
-      15              :         // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
-      16              :         FCBF(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights, const double threshold);
-      17           56 :         virtual ~FCBF() {};
-      18              :         void fit() override;
-      19              :     private:
-      20              :         double threshold = -1;
-      21              :     };
-      22              : }
-      23              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FCBF.h.gcov.overview.html b/html/bayesnet/feature_selection/FCBF.h.gcov.overview.html deleted file mode 100644 index dab5a4c..0000000 --- a/html/bayesnet/feature_selection/FCBF.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FCBF.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/FCBF.h.gcov.png b/html/bayesnet/feature_selection/FCBF.h.gcov.png deleted file mode 100644 index 971e62c40ce7e1f59eb7ce89fbc7591af6049be2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIy!VDzylCF9IDTx4|5ZC|z|E~gq - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %4444
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FeatureSelect::computeSuLabels()151
bayesnet::FeatureSelect::initialize()151
bayesnet::FeatureSelect::getScores() const156
bayesnet::FeatureSelect::getFeatures() const171
bayesnet::FeatureSelect::FeatureSelect(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&)221
bayesnet::FeatureSelect::computeMeritCFS()1239
bayesnet::FeatureSelect::symmetricalUncertainty(int, int)3728
bayesnet::FeatureSelect::computeSuFeatures(int, int)7921
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.cc.func.html b/html/bayesnet/feature_selection/FeatureSelect.cc.func.html deleted file mode 100644 index 679b2f0..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.cc.func.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %4444
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FeatureSelect::FeatureSelect(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&)221
bayesnet::FeatureSelect::computeMeritCFS()1239
bayesnet::FeatureSelect::computeSuFeatures(int, int)7921
bayesnet::FeatureSelect::computeSuLabels()151
bayesnet::FeatureSelect::getFeatures() const171
bayesnet::FeatureSelect::getScores() const156
bayesnet::FeatureSelect::initialize()151
bayesnet::FeatureSelect::symmetricalUncertainty(int, int)3728
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.frameset.html b/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.frameset.html deleted file mode 100644 index 50030eb..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.html b/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.html deleted file mode 100644 index 66b3f08..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %4444
Test Date:2024-05-06 17:54:04Functions:100.0 %88
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include <limits>
-       8              : #include "bayesnet/utils/bayesnetUtils.h"
-       9              : #include "FeatureSelect.h"
-      10              : namespace bayesnet {
-      11          221 :     FeatureSelect::FeatureSelect(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights) :
-      12          221 :         Metrics(samples, features, className, classNumStates), maxFeatures(maxFeatures == 0 ? samples.size(0) - 1 : maxFeatures), weights(weights)
-      13              : 
-      14              :     {
-      15          221 :     }
-      16          151 :     void FeatureSelect::initialize()
-      17              :     {
-      18          151 :         selectedFeatures.clear();
-      19          151 :         selectedScores.clear();
-      20          151 :     }
-      21         3728 :     double FeatureSelect::symmetricalUncertainty(int a, int b)
-      22              :     {
-      23              :         /*
-      24              :         Compute symmetrical uncertainty. Normalize* information gain (mutual
-      25              :         information) with the entropies of the features in order to compensate
-      26              :         the bias due to high cardinality features. *Range [0, 1]
-      27              :         (https://www.sciencedirect.com/science/article/pii/S0020025519303603)
-      28              :         */
-      29        11184 :         auto x = samples.index({ a, "..." });
-      30        11184 :         auto y = samples.index({ b, "..." });
-      31         3728 :         auto mu = mutualInformation(x, y, weights);
-      32         3728 :         auto hx = entropy(x, weights);
-      33         3728 :         auto hy = entropy(y, weights);
-      34         3728 :         return 2.0 * mu / (hx + hy);
-      35        11184 :     }
-      36          151 :     void FeatureSelect::computeSuLabels()
-      37              :     {
-      38              :         // Compute Simmetrical Uncertainty between features and labels
-      39              :         // https://en.wikipedia.org/wiki/Symmetric_uncertainty
-      40         1258 :         for (int i = 0; i < features.size(); ++i) {
-      41         1107 :             suLabels.push_back(symmetricalUncertainty(i, -1));
-      42              :         }
-      43          151 :     }
-      44         7921 :     double FeatureSelect::computeSuFeatures(const int firstFeature, const int secondFeature)
-      45              :     {
-      46              :         // Compute Simmetrical Uncertainty between features
-      47              :         // https://en.wikipedia.org/wiki/Symmetric_uncertainty
-      48              :         try {
-      49         7921 :             return suFeatures.at({ firstFeature, secondFeature });
-      50              :         }
-      51         2621 :         catch (const std::out_of_range& e) {
-      52         2621 :             double result = symmetricalUncertainty(firstFeature, secondFeature);
-      53         2621 :             suFeatures[{firstFeature, secondFeature}] = result;
-      54         2621 :             return result;
-      55         2621 :         }
-      56              :     }
-      57         1239 :     double FeatureSelect::computeMeritCFS()
-      58              :     {
-      59         1239 :         double rcf = 0;
-      60         5693 :         for (auto feature : selectedFeatures) {
-      61         4454 :             rcf += suLabels[feature];
-      62              :         }
-      63         1239 :         double rff = 0;
-      64         1239 :         int n = selectedFeatures.size();
-      65         8154 :         for (const auto& item : doCombinations(selectedFeatures)) {
-      66         6915 :             rff += computeSuFeatures(item.first, item.second);
-      67         1239 :         }
-      68         1239 :         return rcf / sqrt(n + (n * n - n) * rff);
-      69              :     }
-      70          171 :     std::vector<int> FeatureSelect::getFeatures() const
-      71              :     {
-      72          171 :         if (!fitted) {
-      73           20 :             throw std::runtime_error("FeatureSelect not fitted");
-      74              :         }
-      75          151 :         return selectedFeatures;
-      76              :     }
-      77          156 :     std::vector<double> FeatureSelect::getScores() const
-      78              :     {
-      79          156 :         if (!fitted) {
-      80           20 :             throw std::runtime_error("FeatureSelect not fitted");
-      81              :         }
-      82          136 :         return selectedScores;
-      83              :     }
-      84              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.overview.html b/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.overview.html deleted file mode 100644 index 4498404..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.overview.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.png b/html/bayesnet/feature_selection/FeatureSelect.cc.gcov.png deleted file mode 100644 index e61c0b74e391fca1a86922ecdd7ce340e12aeee1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmV+f0{i`mP) z7}+EFB3?Tz8%Z_dD6RQ5?G4NA} zmm!~z0F6@FFMvomNK41xO}ulM^1H_>qcYzUs7x=;t zYW<>T`s&@3SvXXg%RQKhJ(;?ugp_JS)QlYJ5#E_-!m0*((s|#mBr}rLbp92Owp~3u zau+(LZs8FtdFu3l$15JS9MOpbpe)^X*r|7Nc4{r? zVp1xPwqq(i)D&hMaiiAmJ?bh?li}}?yDTKFPBKb0?~+MGVj4nsk~T%5v|Qv%2Dl>% z{wP}mr4P;8>IL?Io=N#KaGM^pP1Mo - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FeatureSelect::~FeatureSelect()111
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.h.func.html b/html/bayesnet/feature_selection/FeatureSelect.h.func.html deleted file mode 100644 index b72ffbf..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::FeatureSelect::~FeatureSelect()111
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.frameset.html b/html/bayesnet/feature_selection/FeatureSelect.h.gcov.frameset.html deleted file mode 100644 index 3302cc5..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.html b/html/bayesnet/feature_selection/FeatureSelect.h.gcov.html deleted file mode 100644 index a01bdf7..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - FeatureSelect.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef FEATURE_SELECT_H
-       8              : #define FEATURE_SELECT_H
-       9              : #include <torch/torch.h>
-      10              : #include <vector>
-      11              : #include "bayesnet/utils/BayesMetrics.h"
-      12              : namespace bayesnet {
-      13              :     class FeatureSelect : public Metrics {
-      14              :     public:
-      15              :         // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
-      16              :         FeatureSelect(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights);
-      17          111 :         virtual ~FeatureSelect() {};
-      18              :         virtual void fit() = 0;
-      19              :         std::vector<int> getFeatures() const;
-      20              :         std::vector<double> getScores() const;
-      21              :     protected:
-      22              :         void initialize();
-      23              :         void computeSuLabels();
-      24              :         double computeSuFeatures(const int a, const int b);
-      25              :         double symmetricalUncertainty(int a, int b);
-      26              :         double computeMeritCFS();
-      27              :         const torch::Tensor& weights;
-      28              :         int maxFeatures;
-      29              :         std::vector<int> selectedFeatures;
-      30              :         std::vector<double> selectedScores;
-      31              :         std::vector<double> suLabels;
-      32              :         std::map<std::pair<int, int>, double> suFeatures;
-      33              :         bool fitted = false;
-      34              :     };
-      35              : }
-      36              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.overview.html b/html/bayesnet/feature_selection/FeatureSelect.h.gcov.overview.html deleted file mode 100644 index 3a8b201..0000000 --- a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.overview.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/FeatureSelect.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/FeatureSelect.h.gcov.png b/html/bayesnet/feature_selection/FeatureSelect.h.gcov.png deleted file mode 100644 index da3566ccda6cf51de07d5f26fef01004fe4307cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$6!VDze^epfMQW60^A+G=b|6c_J%iqVwzWUF= zunH&+rp|e9UJ7J$7I;J!GcfQS0b$0e+I-SL!Bd_tjv*GkQ$soh4=8Y4<}GO5<#@M# z`>&#o29xWXuS*#um@Ju*)6&^1ah##FcFFbgX3bU?C2z1@dJy&?IMA!|w2NLp zhtrv_C)fL|cG*>OWO|V7{c1yBox~$@1gYUo3%yF$aANnEc4fDDSx&hyJJpKgq6@#a%pUXO@ GgeCxY^Mx<~ diff --git a/html/bayesnet/feature_selection/IWSS.cc.func-c.html b/html/bayesnet/feature_selection/IWSS.cc.func-c.html deleted file mode 100644 index 45a4ce3..0000000 --- a/html/bayesnet/feature_selection/IWSS.cc.func-c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.7 %3029
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::IWSS::fit()47
bayesnet::IWSS::IWSS(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&, double)87
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.cc.func.html b/html/bayesnet/feature_selection/IWSS.cc.func.html deleted file mode 100644 index 54a0e67..0000000 --- a/html/bayesnet/feature_selection/IWSS.cc.func.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.7 %3029
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::IWSS::IWSS(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, at::Tensor const&, double)87
bayesnet::IWSS::fit()47
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.cc.gcov.frameset.html b/html/bayesnet/feature_selection/IWSS.cc.gcov.frameset.html deleted file mode 100644 index 4d69b9c..0000000 --- a/html/bayesnet/feature_selection/IWSS.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/IWSS.cc.gcov.html b/html/bayesnet/feature_selection/IWSS.cc.gcov.html deleted file mode 100644 index b53a393..0000000 --- a/html/bayesnet/feature_selection/IWSS.cc.gcov.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:96.7 %3029
Test Date:2024-05-06 17:54:04Functions:100.0 %22
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include <limits>
-       8              : #include "bayesnet/utils/bayesnetUtils.h"
-       9              : #include "IWSS.h"
-      10              : namespace bayesnet {
-      11           87 :     IWSS::IWSS(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights, const double threshold) :
-      12           87 :         FeatureSelect(samples, features, className, maxFeatures, classNumStates, weights), threshold(threshold)
-      13              :     {
-      14           87 :         if (threshold < 0 || threshold > .5) {
-      15           40 :             throw std::invalid_argument("Threshold has to be in [0, 0.5]");
-      16              :         }
-      17           87 :     }
-      18           47 :     void IWSS::fit()
-      19              :     {
-      20           47 :         initialize();
-      21           47 :         computeSuLabels();
-      22           47 :         auto featureOrder = argsort(suLabels); // sort descending order
-      23           47 :         auto featureOrderCopy = featureOrder;
-      24              :         // Add first and second features to result
-      25              :         //     First with its own score
-      26           47 :         auto first_feature = pop_first(featureOrderCopy);
-      27           47 :         selectedFeatures.push_back(first_feature);
-      28           47 :         selectedScores.push_back(suLabels.at(first_feature));
-      29              :         //     Second with the score of the candidates
-      30           47 :         selectedFeatures.push_back(pop_first(featureOrderCopy));
-      31           47 :         auto merit = computeMeritCFS();
-      32           47 :         selectedScores.push_back(merit);
-      33          162 :         for (const auto feature : featureOrderCopy) {
-      34          162 :             selectedFeatures.push_back(feature);
-      35              :             // Compute merit with selectedFeatures
-      36          162 :             auto meritNew = computeMeritCFS();
-      37          162 :             double delta = merit != 0.0 ? std::abs(merit - meritNew) / merit : 0.0;
-      38          162 :             if (meritNew > merit || delta < threshold) {
-      39          117 :                 if (meritNew > merit) {
-      40            0 :                     merit = meritNew;
-      41              :                 }
-      42          117 :                 selectedScores.push_back(meritNew);
-      43              :             } else {
-      44           45 :                 selectedFeatures.pop_back();
-      45           47 :                 break;
-      46              :             }
-      47          117 :             if (selectedFeatures.size() == maxFeatures) {
-      48            2 :                 break;
-      49              :             }
-      50              :         }
-      51           47 :         fitted = true;
-      52           47 :     }
-      53              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.cc.gcov.overview.html b/html/bayesnet/feature_selection/IWSS.cc.gcov.overview.html deleted file mode 100644 index 276b9c5..0000000 --- a/html/bayesnet/feature_selection/IWSS.cc.gcov.overview.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/IWSS.cc.gcov.png b/html/bayesnet/feature_selection/IWSS.cc.gcov.png deleted file mode 100644 index 38463bcafe93a34d0973d454a8f8e7f96d7a0bfb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmV;g0Z{&lP) z1;8VLeHt`s$6@F;jgP@-R-vJqttx?b%tX`nbixL7j_RPIFpbh1N1>${DMZ~%)o~2Q zoPcII?;>IkYFVm|>GlG)9rls;rkEZ*$0u|uJa& - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::IWSS::~IWSS()48
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.h.func.html b/html/bayesnet/feature_selection/IWSS.h.func.html deleted file mode 100644 index d0ed2a5..0000000 --- a/html/bayesnet/feature_selection/IWSS.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::IWSS::~IWSS()48
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.h.gcov.frameset.html b/html/bayesnet/feature_selection/IWSS.h.gcov.frameset.html deleted file mode 100644 index 949a657..0000000 --- a/html/bayesnet/feature_selection/IWSS.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/feature_selection/IWSS.h.gcov.html b/html/bayesnet/feature_selection/IWSS.h.gcov.html deleted file mode 100644 index a31c3e2..0000000 --- a/html/bayesnet/feature_selection/IWSS.h.gcov.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selection - IWSS.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef IWSS_H
-       8              : #define IWSS_H
-       9              : #include <vector>
-      10              : #include <torch/torch.h>
-      11              : #include "FeatureSelect.h"
-      12              : namespace bayesnet {
-      13              :     class IWSS : public FeatureSelect {
-      14              :     public:
-      15              :         // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
-      16              :         IWSS(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights, const double threshold);
-      17           48 :         virtual ~IWSS() {};
-      18              :         void fit() override;
-      19              :     private:
-      20              :         double threshold = -1;
-      21              :     };
-      22              : }
-      23              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/IWSS.h.gcov.overview.html b/html/bayesnet/feature_selection/IWSS.h.gcov.overview.html deleted file mode 100644 index c38ee9d..0000000 --- a/html/bayesnet/feature_selection/IWSS.h.gcov.overview.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection/IWSS.h - - - - - - - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/feature_selection/IWSS.h.gcov.png b/html/bayesnet/feature_selection/IWSS.h.gcov.png deleted file mode 100644 index d7f9b0a8bc0de5ec0916110c264ea6ce818cbcf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0YEIy!VDzylCF9IDTx4|5ZC|z|E~gq - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.h -
100.0%
-
100.0 %11100.0 %11
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/index-detail-sort-l.html b/html/bayesnet/feature_selection/index-detail-sort-l.html deleted file mode 100644 index c644fe0..0000000 --- a/html/bayesnet/feature_selection/index-detail-sort-l.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.h -
100.0%
-
100.0 %11100.0 %11
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/index-detail.html b/html/bayesnet/feature_selection/index-detail.html deleted file mode 100644 index 5e03de6..0000000 --- a/html/bayesnet/feature_selection/index-detail.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
IWSS.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/index-sort-f.html b/html/bayesnet/feature_selection/index-sort-f.html deleted file mode 100644 index d0145d5..0000000 --- a/html/bayesnet/feature_selection/index-sort-f.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.h -
100.0%
-
100.0 %11100.0 %11
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/index-sort-l.html b/html/bayesnet/feature_selection/index-sort-l.html deleted file mode 100644 index c644fe0..0000000 --- a/html/bayesnet/feature_selection/index-sort-l.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.h -
100.0%
-
100.0 %11100.0 %11
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/feature_selection/index.html b/html/bayesnet/feature_selection/index.html deleted file mode 100644 index 5e03de6..0000000 --- a/html/bayesnet/feature_selection/index.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/feature_selection - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/feature_selectionCoverageTotalHit
Test:BayesNet Coverage ReportLines:98.7 %152150
Test Date:2024-05-06 17:54:04Functions:100.0 %1919
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
CFS.cc -
97.8%97.8%
-
97.8 %4544100.0 %22
CFS.h -
100.0%
-
100.0 %44100.0 %22
FCBF.cc -
100.0%
-
100.0 %2626100.0 %22
FCBF.h -
100.0%
-
100.0 %11100.0 %11
FeatureSelect.cc -
100.0%
-
100.0 %4444100.0 %88
FeatureSelect.h -
100.0%
-
100.0 %11100.0 %11
IWSS.cc -
96.7%96.7%
-
96.7 %3029100.0 %22
IWSS.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index-detail-sort-f.html b/html/bayesnet/index-detail-sort-f.html deleted file mode 100644 index 5fba070..0000000 --- a/html/bayesnet/index-detail-sort-f.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index-detail-sort-l.html b/html/bayesnet/index-detail-sort-l.html deleted file mode 100644 index 9283a50..0000000 --- a/html/bayesnet/index-detail-sort-l.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index-detail.html b/html/bayesnet/index-detail.html deleted file mode 100644 index c4bf771..0000000 --- a/html/bayesnet/index-detail.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index-sort-f.html b/html/bayesnet/index-sort-f.html deleted file mode 100644 index 5fba070..0000000 --- a/html/bayesnet/index-sort-f.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index-sort-l.html b/html/bayesnet/index-sort-l.html deleted file mode 100644 index 9283a50..0000000 --- a/html/bayesnet/index-sort-l.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/index.html b/html/bayesnet/index.html deleted file mode 100644 index c4bf771..0000000 --- a/html/bayesnet/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnetCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BaseClassifier.h -
100.0%
-
100.0 %11100.0 %11
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.cc.func-c.html b/html/bayesnet/network/Network.cc.func-c.html deleted file mode 100644 index 82785c8..0000000 --- a/html/bayesnet/network/Network.cc.func-c.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %295295
Test Date:2024-05-06 17:54:04Functions:100.0 %4040
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Network::fit(at::Tensor const&, at::Tensor const&, at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)4
bayesnet::Network::Network(float)8
bayesnet::Network::dump_cpt[abi:cxx11]() const8
bayesnet::Network::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&)20
bayesnet::Network::show[abi:cxx11]() const28
bayesnet::Network::getSamples()48
bayesnet::Network::getStates() const48
bayesnet::Network::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)48
bayesnet::Network::fit(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)92
bayesnet::Network::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const112
bayesnet::Network::topological_sort[abi:cxx11]()220
bayesnet::Network::getNumEdges() const364
bayesnet::Network::getFeatures[abi:cxx11]() const380
bayesnet::Network::getEdges[abi:cxx11]() const408
bayesnet::Network::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)552
bayesnet::Network::predict_proba(at::Tensor const&)1476
bayesnet::Network::initialize()1740
bayesnet::Network::fit(at::Tensor const&, at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)1792
bayesnet::Network::completeFit(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)1824
bayesnet::Network::setStates(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)1824
bayesnet::Network::predict(at::Tensor const&)1844
bayesnet::Network::checkFitData(int, int, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)1888
bayesnet::Network::Network(bayesnet::Network const&)2244
bayesnet::Network::getMaxThreads() const2256
bayesnet::Network::Network()2332
bayesnet::Network::getClassNumStates() const2616
bayesnet::Network::predict_tensor(at::Tensor const&, bool)3320
bayesnet::Network::addNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)31216
bayesnet::Network::completeFit(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)::{lambda()#1}::operator()() const32828
bayesnet::Network::setStates(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#1}::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const32828
bayesnet::Network::addEdge(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)59152
bayesnet::Network::isCyclic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)70324
bayesnet::Network::predict_sample(std::vector<int, std::allocator<int> > const&)114512
bayesnet::Network::predict_sample(at::Tensor const&)781712
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)896208
bayesnet::Network::computeFactor(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)3734984
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda()#1}::operator()() const3734984
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda(double const&)#1}::operator()(double const&) const3734984
bayesnet::Network::getClassName[abi:cxx11]() const3735008
bayesnet::Network::getNodes[abi:cxx11]()3735276
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.cc.func.html b/html/bayesnet/network/Network.cc.func.html deleted file mode 100644 index 7369fb0..0000000 --- a/html/bayesnet/network/Network.cc.func.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %295295
Test Date:2024-05-06 17:54:04Functions:100.0 %4040
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Network::Network()2332
bayesnet::Network::Network(bayesnet::Network const&)2244
bayesnet::Network::Network(float)8
bayesnet::Network::addEdge(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)59152
bayesnet::Network::addNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)31216
bayesnet::Network::checkFitData(int, int, int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)1888
bayesnet::Network::completeFit(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)1824
bayesnet::Network::completeFit(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&, at::Tensor const&)::{lambda()#1}::operator()() const32828
bayesnet::Network::computeFactor(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)3734984
bayesnet::Network::dump_cpt[abi:cxx11]() const8
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)896208
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda()#1}::operator()() const3734984
bayesnet::Network::exactInference(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda(double const&)#1}::operator()(double const&) const3734984
bayesnet::Network::fit(at::Tensor const&, at::Tensor const&, at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)4
bayesnet::Network::fit(at::Tensor const&, at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)1792
bayesnet::Network::fit(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)92
bayesnet::Network::getClassName[abi:cxx11]() const3735008
bayesnet::Network::getClassNumStates() const2616
bayesnet::Network::getEdges[abi:cxx11]() const408
bayesnet::Network::getFeatures[abi:cxx11]() const380
bayesnet::Network::getMaxThreads() const2256
bayesnet::Network::getNodes[abi:cxx11]()3735276
bayesnet::Network::getNumEdges() const364
bayesnet::Network::getSamples()48
bayesnet::Network::getStates() const48
bayesnet::Network::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const112
bayesnet::Network::initialize()1740
bayesnet::Network::isCyclic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)70324
bayesnet::Network::predict(at::Tensor const&)1844
bayesnet::Network::predict(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)48
bayesnet::Network::predict_proba(at::Tensor const&)1476
bayesnet::Network::predict_proba(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&)552
bayesnet::Network::predict_sample(at::Tensor const&)781712
bayesnet::Network::predict_sample(std::vector<int, std::allocator<int> > const&)114512
bayesnet::Network::predict_tensor(at::Tensor const&, bool)3320
bayesnet::Network::score(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&)20
bayesnet::Network::setStates(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)1824
bayesnet::Network::setStates(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<int, std::allocator<int> > > > > const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#1}::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const32828
bayesnet::Network::show[abi:cxx11]() const28
bayesnet::Network::topological_sort[abi:cxx11]()220
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.cc.gcov.frameset.html b/html/bayesnet/network/Network.cc.gcov.frameset.html deleted file mode 100644 index 4233619..0000000 --- a/html/bayesnet/network/Network.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/network/Network.cc.gcov.html b/html/bayesnet/network/Network.cc.gcov.html deleted file mode 100644 index 4ebb2a5..0000000 --- a/html/bayesnet/network/Network.cc.gcov.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %295295
Test Date:2024-05-06 17:54:04Functions:100.0 %4040
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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"
-      12              : namespace bayesnet {
-      13         2332 :     Network::Network() : fitted{ false }, maxThreads{ 0.95 }, classNumStates{ 0 }, laplaceSmoothing{ 0 }
-      14              :     {
-      15         2332 :     }
-      16            8 :     Network::Network(float maxT) : fitted{ false }, maxThreads{ maxT }, classNumStates{ 0 }, laplaceSmoothing{ 0 }
-      17              :     {
-      18              : 
-      19            8 :     }
-      20         2244 :     Network::Network(const Network& other) : laplaceSmoothing(other.laplaceSmoothing), features(other.features), className(other.className), classNumStates(other.getClassNumStates()),
-      21         4488 :         maxThreads(other.getMaxThreads()), fitted(other.fitted), samples(other.samples)
-      22              :     {
-      23         2244 :         if (samples.defined())
-      24            4 :             samples = samples.clone();
-      25         2264 :         for (const auto& node : other.nodes) {
-      26           20 :             nodes[node.first] = std::make_unique<Node>(*node.second);
-      27              :         }
-      28         2244 :     }
-      29         1740 :     void Network::initialize()
-      30              :     {
-      31         1740 :         features.clear();
-      32         1740 :         className = "";
-      33         1740 :         classNumStates = 0;
-      34         1740 :         fitted = false;
-      35         1740 :         nodes.clear();
-      36         1740 :         samples = torch::Tensor();
-      37         1740 :     }
-      38         2256 :     float Network::getMaxThreads() const
-      39              :     {
-      40         2256 :         return maxThreads;
-      41              :     }
-      42           48 :     torch::Tensor& Network::getSamples()
-      43              :     {
-      44           48 :         return samples;
-      45              :     }
-      46        31216 :     void Network::addNode(const std::string& name)
-      47              :     {
-      48        31216 :         if (name == "") {
-      49            8 :             throw std::invalid_argument("Node name cannot be empty");
-      50              :         }
-      51        31208 :         if (nodes.find(name) != nodes.end()) {
-      52            4 :             return;
-      53              :         }
-      54        31204 :         if (find(features.begin(), features.end(), name) == features.end()) {
-      55        31204 :             features.push_back(name);
-      56              :         }
-      57        31204 :         nodes[name] = std::make_unique<Node>(name);
-      58              :     }
-      59          380 :     std::vector<std::string> Network::getFeatures() const
-      60              :     {
-      61          380 :         return features;
-      62              :     }
-      63         2616 :     int Network::getClassNumStates() const
-      64              :     {
-      65         2616 :         return classNumStates;
-      66              :     }
-      67           48 :     int Network::getStates() const
-      68              :     {
-      69           48 :         int result = 0;
-      70          288 :         for (auto& node : nodes) {
-      71          240 :             result += node.second->getNumStates();
-      72              :         }
-      73           48 :         return result;
-      74              :     }
-      75      3735008 :     std::string Network::getClassName() const
-      76              :     {
-      77      3735008 :         return className;
-      78              :     }
-      79        70324 :     bool Network::isCyclic(const std::string& nodeId, std::unordered_set<std::string>& visited, std::unordered_set<std::string>& recStack)
-      80              :     {
-      81        70324 :         if (visited.find(nodeId) == visited.end()) // if node hasn't been visited yet
-      82              :         {
-      83        70324 :             visited.insert(nodeId);
-      84        70324 :             recStack.insert(nodeId);
-      85        81496 :             for (Node* child : nodes[nodeId]->getChildren()) {
-      86        11196 :                 if (visited.find(child->getName()) == visited.end() && isCyclic(child->getName(), visited, recStack))
-      87           24 :                     return true;
-      88        11180 :                 if (recStack.find(child->getName()) != recStack.end())
-      89            8 :                     return true;
-      90              :             }
-      91              :         }
-      92        70300 :         recStack.erase(nodeId); // remove node from recursion stack before function ends
-      93        70300 :         return false;
-      94              :     }
-      95        59152 :     void Network::addEdge(const std::string& parent, const std::string& child)
-      96              :     {
-      97        59152 :         if (nodes.find(parent) == nodes.end()) {
-      98            8 :             throw std::invalid_argument("Parent node " + parent + " does not exist");
-      99              :         }
-     100        59144 :         if (nodes.find(child) == nodes.end()) {
-     101            8 :             throw std::invalid_argument("Child node " + child + " does not exist");
-     102              :         }
-     103              :         // Temporarily add edge to check for cycles
-     104        59136 :         nodes[parent]->addChild(nodes[child].get());
-     105        59136 :         nodes[child]->addParent(nodes[parent].get());
-     106        59136 :         std::unordered_set<std::string> visited;
-     107        59136 :         std::unordered_set<std::string> recStack;
-     108        59136 :         if (isCyclic(nodes[child]->getName(), visited, recStack)) // if adding this edge forms a cycle
-     109              :         {
-     110              :             // remove problematic edge
-     111            8 :             nodes[parent]->removeChild(nodes[child].get());
-     112            8 :             nodes[child]->removeParent(nodes[parent].get());
-     113            8 :             throw std::invalid_argument("Adding this edge forms a cycle in the graph.");
-     114              :         }
-     115        59144 :     }
-     116      3735276 :     std::map<std::string, std::unique_ptr<Node>>& Network::getNodes()
-     117              :     {
-     118      3735276 :         return nodes;
-     119              :     }
-     120         1888 :     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         1888 :         if (weights.size(0) != n_samples) {
-     123            8 :             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         1880 :         if (n_samples != n_samples_y) {
-     126            8 :             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         1872 :         if (n_features != featureNames.size()) {
-     129            8 :             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         1864 :         if (features.size() == 0) {
-     132            8 :             throw std::invalid_argument("The network has not been initialized. You must call addNode() before calling fit()");
-     133              :         }
-     134         1856 :         if (n_features != features.size() - 1) {
-     135            8 :             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         1848 :         if (find(features.begin(), features.end(), className) == features.end()) {
-     138            8 :             throw std::invalid_argument("Class Name not found in Network::features");
-     139              :         }
-     140        32868 :         for (auto& feature : featureNames) {
-     141        31044 :             if (find(features.begin(), features.end(), feature) == features.end()) {
-     142            8 :                 throw std::invalid_argument("Feature " + feature + " not found in Network::features");
-     143              :             }
-     144        31036 :             if (states.find(feature) == states.end()) {
-     145            8 :                 throw std::invalid_argument("Feature " + feature + " not found in states");
-     146              :             }
-     147              :         }
-     148         1824 :     }
-     149         1824 :     void Network::setStates(const std::map<std::string, std::vector<int>>& states)
-     150              :     {
-     151              :         // Set states to every Node in the network
-     152         1824 :         for_each(features.begin(), features.end(), [this, &states](const std::string& feature) {
-     153        32828 :             nodes.at(feature)->setNumStates(states.at(feature).size());
-     154        32828 :             });
-     155         1824 :         classNumStates = nodes.at(className)->getNumStates();
-     156         1824 :     }
-     157              :     // X comes in nxm, where n is the number of features and m the number of samples
-     158            4 :     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            4 :         checkFitData(X.size(1), X.size(0), y.size(0), featureNames, className, states, weights);
-     161            4 :         this->className = className;
-     162            4 :         torch::Tensor ytmp = torch::transpose(y.view({ y.size(0), 1 }), 0, 1);
-     163           12 :         samples = torch::cat({ X , ytmp }, 0);
-     164           20 :         for (int i = 0; i < featureNames.size(); ++i) {
-     165           48 :             auto row_feature = X.index({ i, "..." });
-     166           16 :         }
-     167            4 :         completeFit(states, weights);
-     168           24 :     }
-     169         1792 :     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         1792 :         checkFitData(samples.size(1), samples.size(0) - 1, samples.size(1), featureNames, className, states, weights);
-     172         1792 :         this->className = className;
-     173         1792 :         this->samples = samples;
-     174         1792 :         completeFit(states, weights);
-     175         1792 :     }
-     176              :     // input_data comes in nxm, where n is the number of features and m the number of samples
-     177           92 :     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           92 :         const torch::Tensor weights = torch::tensor(weights_, torch::kFloat64);
-     180           92 :         checkFitData(input_data[0].size(), input_data.size(), labels.size(), featureNames, className, states, weights);
-     181           28 :         this->className = className;
-     182              :         // Build tensor of samples (nxm) (n+1 because of the class)
-     183           28 :         samples = torch::zeros({ static_cast<int>(input_data.size() + 1), static_cast<int>(input_data[0].size()) }, torch::kInt32);
-     184          140 :         for (int i = 0; i < featureNames.size(); ++i) {
-     185          448 :             samples.index_put_({ i, "..." }, torch::tensor(input_data[i], torch::kInt32));
-     186              :         }
-     187          112 :         samples.index_put_({ -1, "..." }, torch::tensor(labels, torch::kInt32));
-     188           28 :         completeFit(states, weights);
-     189          232 :     }
-     190         1824 :     void Network::completeFit(const std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights)
-     191              :     {
-     192         1824 :         setStates(states);
-     193         1824 :         laplaceSmoothing = 1.0 / samples.size(1); // To use in CPT computation
-     194         1824 :         std::vector<std::thread> threads;
-     195        34652 :         for (auto& node : nodes) {
-     196        32828 :             threads.emplace_back([this, &node, &weights]() {
-     197        32828 :                 node.second->computeCPT(samples, features, laplaceSmoothing, weights);
-     198        32828 :                 });
-     199              :         }
-     200        34652 :         for (auto& thread : threads) {
-     201        32828 :             thread.join();
-     202              :         }
-     203         1824 :         fitted = true;
-     204         1824 :     }
-     205         3320 :     torch::Tensor Network::predict_tensor(const torch::Tensor& samples, const bool proba)
-     206              :     {
-     207         3320 :         if (!fitted) {
-     208            8 :             throw std::logic_error("You must call fit() before calling predict()");
-     209              :         }
-     210         3312 :         torch::Tensor result;
-     211         3312 :         result = torch::zeros({ samples.size(1), classNumStates }, torch::kFloat64);
-     212       785016 :         for (int i = 0; i < samples.size(1); ++i) {
-     213      2345136 :             const torch::Tensor sample = samples.index({ "...", i });
-     214       781712 :             auto psample = predict_sample(sample);
-     215       781704 :             auto temp = torch::tensor(psample, torch::kFloat64);
-     216              :             //            result.index_put_({ i, "..." }, torch::tensor(predict_sample(sample), torch::kFloat64));
-     217      2345112 :             result.index_put_({ i, "..." }, temp);
-     218       781712 :         }
-     219         3304 :         if (proba)
-     220         1476 :             return result;
-     221         3656 :         return result.argmax(1);
-     222      1566728 :     }
-     223              :     // Return mxn tensor of probabilities
-     224         1476 :     torch::Tensor Network::predict_proba(const torch::Tensor& samples)
-     225              :     {
-     226         1476 :         return predict_tensor(samples, true);
-     227              :     }
-     228              : 
-     229              :     // Return mxn tensor of probabilities
-     230         1844 :     torch::Tensor Network::predict(const torch::Tensor& samples)
-     231              :     {
-     232         1844 :         return predict_tensor(samples, false);
-     233              :     }
-     234              : 
-     235              :     // Return mx1 std::vector of predictions
-     236              :     // tsamples is nxm std::vector of samples
-     237           48 :     std::vector<int> Network::predict(const std::vector<std::vector<int>>& tsamples)
-     238              :     {
-     239           48 :         if (!fitted) {
-     240           16 :             throw std::logic_error("You must call fit() before calling predict()");
-     241              :         }
-     242           32 :         std::vector<int> predictions;
-     243           32 :         std::vector<int> sample;
-     244         3564 :         for (int row = 0; row < tsamples[0].size(); ++row) {
-     245         3540 :             sample.clear();
-     246        26252 :             for (int col = 0; col < tsamples.size(); ++col) {
-     247        22712 :                 sample.push_back(tsamples[col][row]);
-     248              :             }
-     249         3540 :             std::vector<double> classProbabilities = predict_sample(sample);
-     250              :             // Find the class with the maximum posterior probability
-     251         3532 :             auto maxElem = max_element(classProbabilities.begin(), classProbabilities.end());
-     252         3532 :             int predictedClass = distance(classProbabilities.begin(), maxElem);
-     253         3532 :             predictions.push_back(predictedClass);
-     254         3532 :         }
-     255           48 :         return predictions;
-     256           40 :     }
-     257              :     // Return mxn std::vector of probabilities
-     258              :     // tsamples is nxm std::vector of samples
-     259          552 :     std::vector<std::vector<double>> Network::predict_proba(const std::vector<std::vector<int>>& tsamples)
-     260              :     {
-     261          552 :         if (!fitted) {
-     262            8 :             throw std::logic_error("You must call fit() before calling predict_proba()");
-     263              :         }
-     264          544 :         std::vector<std::vector<double>> predictions;
-     265          544 :         std::vector<int> sample;
-     266       111516 :         for (int row = 0; row < tsamples[0].size(); ++row) {
-     267       110972 :             sample.clear();
-     268      1055620 :             for (int col = 0; col < tsamples.size(); ++col) {
-     269       944648 :                 sample.push_back(tsamples[col][row]);
-     270              :             }
-     271       110972 :             predictions.push_back(predict_sample(sample));
-     272              :         }
-     273         1088 :         return predictions;
-     274          544 :     }
-     275           20 :     double Network::score(const std::vector<std::vector<int>>& tsamples, const std::vector<int>& labels)
-     276              :     {
-     277           20 :         std::vector<int> y_pred = predict(tsamples);
-     278           12 :         int correct = 0;
-     279         2324 :         for (int i = 0; i < y_pred.size(); ++i) {
-     280         2312 :             if (y_pred[i] == labels[i]) {
-     281         1944 :                 correct++;
-     282              :             }
-     283              :         }
-     284           24 :         return (double)correct / y_pred.size();
-     285           12 :     }
-     286              :     // Return 1xn std::vector of probabilities
-     287       114512 :     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       114512 :         if (sample.size() != features.size() - 1) {
-     291           16 :             throw std::invalid_argument("Sample size (" + std::to_string(sample.size()) +
-     292           24 :                 ") does not match the number of features (" + std::to_string(features.size() - 1) + ")");
-     293              :         }
-     294       114504 :         std::map<std::string, int> evidence;
-     295      1081840 :         for (int i = 0; i < sample.size(); ++i) {
-     296       967336 :             evidence[features[i]] = sample[i];
-     297              :         }
-     298       229008 :         return exactInference(evidence);
-     299       114504 :     }
-     300              :     // Return 1xn std::vector of probabilities
-     301       781712 :     std::vector<double> Network::predict_sample(const torch::Tensor& sample)
-     302              :     {
-     303              :         // Ensure the sample size is equal to the number of features
-     304       781712 :         if (sample.size(0) != features.size() - 1) {
-     305           16 :             throw std::invalid_argument("Sample size (" + std::to_string(sample.size(0)) +
-     306           24 :                 ") does not match the number of features (" + std::to_string(features.size() - 1) + ")");
-     307              :         }
-     308       781704 :         std::map<std::string, int> evidence;
-     309     18085136 :         for (int i = 0; i < sample.size(0); ++i) {
-     310     17303432 :             evidence[features[i]] = sample[i].item<int>();
-     311              :         }
-     312      1563408 :         return exactInference(evidence);
-     313       781704 :     }
-     314      3734984 :     double Network::computeFactor(std::map<std::string, int>& completeEvidence)
-     315              :     {
-     316      3734984 :         double result = 1.0;
-     317     72886736 :         for (auto& node : getNodes()) {
-     318     69151752 :             result *= node.second->getFactorValue(completeEvidence);
-     319              :         }
-     320      3734984 :         return result;
-     321              :     }
-     322       896208 :     std::vector<double> Network::exactInference(std::map<std::string, int>& evidence)
-     323              :     {
-     324       896208 :         std::vector<double> result(classNumStates, 0.0);
-     325       896208 :         std::vector<std::thread> threads;
-     326       896208 :         std::mutex mtx;
-     327      4631192 :         for (int i = 0; i < classNumStates; ++i) {
-     328      3734984 :             threads.emplace_back([this, &result, &evidence, i, &mtx]() {
-     329      3734984 :                 auto completeEvidence = std::map<std::string, int>(evidence);
-     330      3734984 :                 completeEvidence[getClassName()] = i;
-     331      3734984 :                 double factor = computeFactor(completeEvidence);
-     332      3734984 :                 std::lock_guard<std::mutex> lock(mtx);
-     333      3734984 :                 result[i] = factor;
-     334      3734984 :                 });
-     335              :         }
-     336      4631192 :         for (auto& thread : threads) {
-     337      3734984 :             thread.join();
-     338              :         }
-     339              :         // Normalize result
-     340       896208 :         double sum = accumulate(result.begin(), result.end(), 0.0);
-     341      4631192 :         transform(result.begin(), result.end(), result.begin(), [sum](const double& value) { return value / sum; });
-     342      1792416 :         return result;
-     343       896208 :     }
-     344           28 :     std::vector<std::string> Network::show() const
-     345              :     {
-     346           28 :         std::vector<std::string> result;
-     347              :         // Draw the network
-     348          160 :         for (auto& node : nodes) {
-     349          132 :             std::string line = node.first + " -> ";
-     350          308 :             for (auto child : node.second->getChildren()) {
-     351          176 :                 line += child->getName() + ", ";
-     352              :             }
-     353          132 :             result.push_back(line);
-     354          132 :         }
-     355           56 :         return result;
-     356           28 :     }
-     357          112 :     std::vector<std::string> Network::graph(const std::string& title) const
-     358              :     {
-     359          112 :         auto output = std::vector<std::string>();
-     360          112 :         auto prefix = "digraph BayesNet {\nlabel=<BayesNet ";
-     361          112 :         auto suffix = ">\nfontsize=30\nfontcolor=blue\nlabelloc=t\nlayout=circo\n";
-     362          112 :         std::string header = prefix + title + suffix;
-     363          112 :         output.push_back(header);
-     364          844 :         for (auto& node : nodes) {
-     365          732 :             auto result = node.second->graph(className);
-     366          732 :             output.insert(output.end(), result.begin(), result.end());
-     367          732 :         }
-     368          112 :         output.push_back("}\n");
-     369          224 :         return output;
-     370          112 :     }
-     371          408 :     std::vector<std::pair<std::string, std::string>> Network::getEdges() const
-     372              :     {
-     373          408 :         auto edges = std::vector<std::pair<std::string, std::string>>();
-     374         7396 :         for (const auto& node : nodes) {
-     375         6988 :             auto head = node.first;
-     376        20312 :             for (const auto& child : node.second->getChildren()) {
-     377        13324 :                 auto tail = child->getName();
-     378        13324 :                 edges.push_back({ head, tail });
-     379        13324 :             }
-     380         6988 :         }
-     381          816 :         return edges;
-     382          408 :     }
-     383          364 :     int Network::getNumEdges() const
-     384              :     {
-     385          364 :         return getEdges().size();
-     386              :     }
-     387          220 :     std::vector<std::string> Network::topological_sort()
-     388              :     {
-     389              :         /* Check if al the fathers of every node are before the node */
-     390          220 :         auto result = features;
-     391          220 :         result.erase(remove(result.begin(), result.end(), className), result.end());
-     392          220 :         bool ending{ false };
-     393          628 :         while (!ending) {
-     394          408 :             ending = true;
-     395         3804 :             for (auto feature : features) {
-     396         3396 :                 auto fathers = nodes[feature]->getParents();
-     397         9000 :                 for (const auto& father : fathers) {
-     398         5604 :                     auto fatherName = father->getName();
-     399         5604 :                     if (fatherName == className) {
-     400         2980 :                         continue;
-     401              :                     }
-     402              :                     // Check if father is placed before the actual feature
-     403         2624 :                     auto it = find(result.begin(), result.end(), fatherName);
-     404         2624 :                     if (it != result.end()) {
-     405         2624 :                         auto it2 = find(result.begin(), result.end(), feature);
-     406         2624 :                         if (it2 != result.end()) {
-     407         5248 :                             if (distance(it, it2) < 0) {
-     408              :                                 // if it is not, insert it before the feature
-     409          244 :                                 result.erase(remove(result.begin(), result.end(), fatherName), result.end());
-     410          244 :                                 result.insert(it2, fatherName);
-     411          244 :                                 ending = false;
-     412              :                             }
-     413              :                         }
-     414              :                     }
-     415         5604 :                 }
-     416         3396 :             }
-     417              :         }
-     418          440 :         return result;
-     419          220 :     }
-     420            8 :     std::string Network::dump_cpt() const
-     421              :     {
-     422            8 :         std::stringstream oss;
-     423           48 :         for (auto& node : nodes) {
-     424           40 :             oss << "* " << node.first << ": (" << node.second->getNumStates() << ") : " << node.second->getCPT().sizes() << std::endl;
-     425           40 :             oss << node.second->getCPT() << std::endl;
-     426              :         }
-     427           16 :         return oss.str();
-     428            8 :     }
-     429              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.cc.gcov.overview.html b/html/bayesnet/network/Network.cc.gcov.overview.html deleted file mode 100644 index 96bc96f..0000000 --- a/html/bayesnet/network/Network.cc.gcov.overview.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/network/Network.cc.gcov.png b/html/bayesnet/network/Network.cc.gcov.png deleted file mode 100644 index 9bc84fb5dd77f24063d419a8e099f69cdb3f9dcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1925 zcmV;02YUF4P)t_5&^kBVJC0vrZ_n_@WM;~+xC_gIqoMrbZcGn<8V z0tPI6D{*?jh&{qW)p2{|8${1<&UC#9QfGm*-ec17?YNTa3W6&-R^6sr#BFOv`1ath zoFFv^Qgx;(Owd3TBRN+k;-{}peCje2iYQ$;N^vd8T#GOJtx~W{ahKFq^_Fe8Y>C<9 zeEAy^dnu#oyMx586lWsKAhBo0b4`g^1Q0abzBDP=mKUR?p)A@~4lJG9(np;PTyug) zxiJlFS=hTgX50&xK(zEGK+T}7QaTo@WV1!a#8U+Hq*2M(6-IpXjn09|0Xk-uT?>n) z1eiH0kW^L@9GxVj4+VgxVH#7A`yK{>>V#g2Khn(GxJ)h#2Y|8jkC%okGga5m_Kjz; zhnGm3VGn5h0!8GZ*u$1CzPZZRQoK;t2d?XHaQ)U^gloz8J*^ba?vr4j&;a+BMiLzi zG~Kx#?Xs=is}$=DWpD^ZR{O<=UAmP}=m76rI#Bl<1}XGzAv#R03A&`}XZd8(QW1@> zKxAJn5>nYK6ZmSTpeJ!YF#_((5$dEN*WpNUF4gE)XDU+QtfA2NXM@T{6BzmW4F}dd zu%w7uKsD!NUd&h#a+C*4w)yoNfjkF+?=vK#vUZV(Q=7%6Gffo3dC!T@a7#sFxMwP4 zWU)t4l*a|zDs)R$f9bo#L)M3_5^N5TRY?iSk)trQlEtEOWM(hwopz6Y3*hK9C~#o2 zQ=m4Jn3n=a)T^exPMa!(e5L_J^6e}g`b;e*yv*=v=Msy_jCAN+yFh>*_;OQLwU|<} z?m9XSI2Zy-W~&nzpfz4-FHJlZc<+S0?yA_M&yHl~zNJe#SOJ3#r0re1Mz5cf=4_;8 z22@31YnfA<5S_Uz4lGdu$+FuH+Gk!h+t{Nck7WiK^=c<5fxNKy41@ti@CJ=1AmN)R zRj@MkV@G&P$2z1P;Lb3fjUQa8a9}76^Ez}Gq?9!%n@D|*dv=gRw(t#R0$1rgu3^~Y zIeF5>4mVs72 zW)~u|`I>&Y=GvhNVz4l*0Nm+yWT0WStm1T^eAM|)Es0p|p(vVQFSU>u*LFd+8ywF7 zJZ7S&q$|xFL|m3kE%3k#mEe@Bew`Oeb|%Lz|E(9wO9Ow-!np~$J$s#K9yDjIuh1;N zn659#nxZaUZRINGxRb*arR&wwA348n6*W~T&eC@WDK{g?k69hDa)woBbw12%HO{r} zNiKg}bRTSA@}#S)u;nf`o@LO}XogisBVfQDJI%qo=`aAKfudhOWIZLaf7p6vXJ^0H zdeCO?k@Xn;{IK;n^G;$(jA!Gg_Be~pW)e4u^}J)(*-gseNRBID{OO0mCXtQ{PG+R4 zB_0FQYV=tUdk;#6Eu41B5;!m*A0%^UXiH3nso)lI+|)di7?p)i92Y>GOzr-yIc^(3 zc+YRSb&u=_`;<|grZ@=pj^Y8o4|rkfre;Ufhh8|@ETuSH%zMucAdu?J%N_Mo&a6X1 z;|V;Zaxd&n6xibZ8y(WjXMR33C!XuDeNl`zY7{o?_|FzHr)F-DxE_ZT_0{c>#`=hE zw6b0}WhP>e-Y#7rUtPU-;L)671^k%xkj1dKa(7}qcC^;S+JQAI%#_14Lxt32X--pb z0VGhL`MAdg1Z*7S(s=;f3@O1#apU8mlS1o^qAai{Uii&urrjdm#XV^Fd9`j&dZIhu zJy`|N+k9V^N*puBd9<@|5Pb?XZE{()|FFfEfNapaIzrK|Q?57^zyt>wP@Emg|? zh>Zj5V+WWVf*e@O*E!eMweXpKRnwrC-tCv}UN9q{iD7T3nDHOa^q3L#CbuD!K - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Network::~Network()4024
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.h.func.html b/html/bayesnet/network/Network.h.func.html deleted file mode 100644 index 755cf34..0000000 --- a/html/bayesnet/network/Network.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Network::~Network()4024
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.h.gcov.frameset.html b/html/bayesnet/network/Network.h.gcov.frameset.html deleted file mode 100644 index 6fe326f..0000000 --- a/html/bayesnet/network/Network.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/network/Network.h.gcov.html b/html/bayesnet/network/Network.h.gcov.html deleted file mode 100644 index ac9673f..0000000 --- a/html/bayesnet/network/Network.h.gcov.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Network.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-      14              : namespace bayesnet {
-      15              :     class Network {
-      16              :     public:
-      17              :         Network();
-      18              :         explicit Network(float);
-      19              :         explicit Network(const Network&);
-      20         4024 :         ~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
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Network.h.gcov.overview.html b/html/bayesnet/network/Network.h.gcov.overview.html deleted file mode 100644 index bdda93e..0000000 --- a/html/bayesnet/network/Network.h.gcov.overview.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Network.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/network/Network.h.gcov.png b/html/bayesnet/network/Network.h.gcov.png deleted file mode 100644 index f815125982c91b9b2e01d7fe832f0292ddaea0cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 478 zcmV<40U`d0P)&DK@xsRu)ID^eHV@cf*u9R+K$H*5a@#Siu?c#5XI)u zlt=9QH^5blY2&!(oPPlCFjLe`PuAmJV%lTcxO@c?(AETd?iT^3YbsNe1;VtPXSMHb z*Htf{b7lirp>&%7i5h#0Z^|emTx81vVYWq{F1yAUD4hlY@aAoO+!0mT7uz|s{j?Yw z)>tJtmhk}B5|l@5KR`NY^$PUpzO}z^J%a3AU72SQ08!SuuS1~j3;H|KQ)~~37@$ZX zs#{AzY4RJ=1H&LtQyZLGg&rez20|!fX!q31p=yBhR`VXA#|k=+FlF-|-Rm?43P!lW zpx>p9EW_!<$Vm}IL7XX%kCNR>ag4`wj4T{`z - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Node.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Node.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %8888
Test Date:2024-05-06 17:54:04Functions:100.0 %2020
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Node::clear()9
bayesnet::Node::removeChild(bayesnet::Node*)17
bayesnet::Node::removeParent(bayesnet::Node*)17
bayesnet::Node::combinations(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)45
bayesnet::Node::minFill()45
bayesnet::Node::getCPT()429
bayesnet::Node::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)732
auto bayesnet::Node::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const1108
bayesnet::Node::getParents()5087
bayesnet::Node::Node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)31339
bayesnet::Node::setNumStates(int)32864
bayesnet::Node::computeCPT(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double, at::Tensor const&)32894
bayesnet::Node::addChild(bayesnet::Node*)59235
bayesnet::Node::addParent(bayesnet::Node*)59262
auto bayesnet::Node::computeCPT(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double, at::Tensor const&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const62020
bayesnet::Node::getNumStates() const64124
bayesnet::Node::getChildren()77571
bayesnet::Node::getFactorValue(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)69151761
auto bayesnet::Node::getFactorValue(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const129301512
bayesnet::Node::getName[abi:cxx11]() const150429643
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Node.cc.func.html b/html/bayesnet/network/Node.cc.func.html deleted file mode 100644 index d8e7bd8..0000000 --- a/html/bayesnet/network/Node.cc.func.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Node.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Node.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %8888
Test Date:2024-05-06 17:54:04Functions:100.0 %2020
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
auto bayesnet::Node::computeCPT(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double, at::Tensor const&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const62020
auto bayesnet::Node::getFactorValue(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const129301512
auto bayesnet::Node::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::{lambda(auto:1 const&)#1}::operator()<bayesnet::Node*>(bayesnet::Node* const&) const1108
bayesnet::Node::Node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)31339
bayesnet::Node::addChild(bayesnet::Node*)59235
bayesnet::Node::addParent(bayesnet::Node*)59262
bayesnet::Node::clear()9
bayesnet::Node::combinations(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)45
bayesnet::Node::computeCPT(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double, at::Tensor const&)32894
bayesnet::Node::getCPT()429
bayesnet::Node::getChildren()77571
bayesnet::Node::getFactorValue(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, int> > >&)69151761
bayesnet::Node::getName[abi:cxx11]() const150429643
bayesnet::Node::getNumStates() const64124
bayesnet::Node::getParents()5087
bayesnet::Node::graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)732
bayesnet::Node::minFill()45
bayesnet::Node::removeChild(bayesnet::Node*)17
bayesnet::Node::removeParent(bayesnet::Node*)17
bayesnet::Node::setNumStates(int)32864
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Node.cc.gcov.frameset.html b/html/bayesnet/network/Node.cc.gcov.frameset.html deleted file mode 100644 index 48cc9aa..0000000 --- a/html/bayesnet/network/Node.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Node.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/network/Node.cc.gcov.html b/html/bayesnet/network/Node.cc.gcov.html deleted file mode 100644 index 84aebe5..0000000 --- a/html/bayesnet/network/Node.cc.gcov.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Node.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/network - Node.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %8888
Test Date:2024-05-06 17:54:04Functions:100.0 %2020
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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              : 
-       9              : namespace bayesnet {
-      10              : 
-      11        31339 :     Node::Node(const std::string& name)
-      12        31339 :         : name(name)
-      13              :     {
-      14        31339 :     }
-      15            9 :     void Node::clear()
-      16              :     {
-      17            9 :         parents.clear();
-      18            9 :         children.clear();
-      19            9 :         cpTable = torch::Tensor();
-      20            9 :         dimensions.clear();
-      21            9 :         numStates = 0;
-      22            9 :     }
-      23    150429643 :     std::string Node::getName() const
-      24              :     {
-      25    150429643 :         return name;
-      26              :     }
-      27        59262 :     void Node::addParent(Node* parent)
-      28              :     {
-      29        59262 :         parents.push_back(parent);
-      30        59262 :     }
-      31           17 :     void Node::removeParent(Node* parent)
-      32              :     {
-      33           17 :         parents.erase(std::remove(parents.begin(), parents.end(), parent), parents.end());
-      34           17 :     }
-      35           17 :     void Node::removeChild(Node* child)
-      36              :     {
-      37           17 :         children.erase(std::remove(children.begin(), children.end(), child), children.end());
-      38           17 :     }
-      39        59235 :     void Node::addChild(Node* child)
-      40              :     {
-      41        59235 :         children.push_back(child);
-      42        59235 :     }
-      43         5087 :     std::vector<Node*>& Node::getParents()
-      44              :     {
-      45         5087 :         return parents;
-      46              :     }
-      47        77571 :     std::vector<Node*>& Node::getChildren()
-      48              :     {
-      49        77571 :         return children;
-      50              :     }
-      51        64124 :     int Node::getNumStates() const
-      52              :     {
-      53        64124 :         return numStates;
-      54              :     }
-      55        32864 :     void Node::setNumStates(int numStates)
-      56              :     {
-      57        32864 :         this->numStates = numStates;
-      58        32864 :     }
-      59          429 :     torch::Tensor& Node::getCPT()
-      60              :     {
-      61          429 :         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           45 :     unsigned Node::minFill()
-      71              :     {
-      72           45 :         std::unordered_set<std::string> neighbors;
-      73          117 :         for (auto child : children) {
-      74           72 :             neighbors.emplace(child->getName());
-      75              :         }
-      76          108 :         for (auto parent : parents) {
-      77           63 :             neighbors.emplace(parent->getName());
-      78              :         }
-      79           45 :         auto source = std::vector<std::string>(neighbors.begin(), neighbors.end());
-      80           90 :         return combinations(source).size();
-      81           45 :     }
-      82           45 :     std::vector<std::pair<std::string, std::string>> Node::combinations(const std::vector<std::string>& source)
-      83              :     {
-      84           45 :         std::vector<std::pair<std::string, std::string>> result;
-      85          180 :         for (int i = 0; i < source.size(); ++i) {
-      86          135 :             std::string temp = source[i];
-      87          279 :             for (int j = i + 1; j < source.size(); ++j) {
-      88          144 :                 result.push_back({ temp, source[j] });
-      89              :             }
-      90          135 :         }
-      91           90 :         return result;
-      92           45 :     }
-      93        32894 :     void Node::computeCPT(const torch::Tensor& dataset, const std::vector<std::string>& features, const double laplaceSmoothing, const torch::Tensor& weights)
-      94              :     {
-      95        32894 :         dimensions.clear();
-      96              :         // Get dimensions of the CPT
-      97        32894 :         dimensions.push_back(numStates);
-      98        94914 :         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        32894 :         cpTable = torch::zeros(dimensions, torch::kFloat) + laplaceSmoothing;
-     101              :         // Fill table with counts
-     102        32894 :         auto pos = find(features.begin(), features.end(), name);
-     103        32894 :         if (pos == features.end()) {
-     104            8 :             throw std::logic_error("Feature " + name + " not found in dataset");
-     105              :         }
-     106        32886 :         int name_index = pos - features.begin();
-     107     11221522 :         for (int n_sample = 0; n_sample < dataset.size(1); ++n_sample) {
-     108     11188649 :             c10::List<c10::optional<at::Tensor>> coordinates;
-     109     33565947 :             coordinates.push_back(dataset.index({ name_index, n_sample }));
-     110     32200749 :             for (auto parent : parents) {
-     111     21012113 :                 pos = find(features.begin(), features.end(), parent->getName());
-     112     21012113 :                 if (pos == features.end()) {
-     113           13 :                     throw std::logic_error("Feature parent " + parent->getName() + " not found in dataset");
-     114              :                 }
-     115     21012100 :                 int parent_index = pos - features.begin();
-     116     63036300 :                 coordinates.push_back(dataset.index({ parent_index, n_sample }));
-     117              :             }
-     118              :             // Increment the count of the corresponding coordinate
-     119     22377272 :             cpTable.index_put_({ coordinates }, cpTable.index({ coordinates }) + weights.index({ n_sample }).item<double>());
-     120     11188649 :         }
-     121              :         // Normalize the counts
-     122        32873 :         cpTable = cpTable / cpTable.sum(0);
-     123     43422258 :     }
-     124     69151761 :     float Node::getFactorValue(std::map<std::string, int>& evidence)
-     125              :     {
-     126     69151761 :         c10::List<c10::optional<at::Tensor>> coordinates;
-     127              :         // following predetermined order of indices in the cpTable (see Node.h)
-     128     69151761 :         coordinates.push_back(at::tensor(evidence[name]));
-     129    198453273 :         transform(parents.begin(), parents.end(), std::back_inserter(coordinates), [&evidence](const auto& parent) { return at::tensor(evidence[parent->getName()]); });
-     130    138303522 :         return cpTable.index({ coordinates }).item<float>();
-     131     69151761 :     }
-     132          732 :     std::vector<std::string> Node::graph(const std::string& className)
-     133              :     {
-     134          732 :         auto output = std::vector<std::string>();
-     135          732 :         auto suffix = name == className ? ", fontcolor=red, fillcolor=lightblue, style=filled " : "";
-     136          732 :         output.push_back(name + " [shape=circle" + suffix + "] \n");
-     137         1840 :         transform(children.begin(), children.end(), back_inserter(output), [this](const auto& child) { return name + " -> " + child->getName(); });
-     138         1464 :         return output;
-     139          732 :     }
-     140              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/Node.cc.gcov.overview.html b/html/bayesnet/network/Node.cc.gcov.overview.html deleted file mode 100644 index 59f204f..0000000 --- a/html/bayesnet/network/Node.cc.gcov.overview.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network/Node.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/network/Node.cc.gcov.png b/html/bayesnet/network/Node.cc.gcov.png deleted file mode 100644 index e5942a5a50347c02f60448a797b86826b1ac1422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmVN`)Bm`wxm9$6=8@^lh#nCRglVAs$C$fpo?5=P+cuE|^rTKUaz-z$-;z=i8n^ zEc+f-^sq${@d36%^dPh13F%Rs^dp7X4fVVq;mf4Rv6iI#hGUVhIVOi%ufE_|A4&?@ zxnAc8{d4`6W3~h7ca7C~r9$?=EqCs*mFw3pb}=tZ{rO&1+|- z+wGR}5xwTQ5NoLneZ@b^$8$~@9Y6LoAkm-~0*`2U_EVD+DTX{0UZdc3N#o&8%kWEz z;YYuMbv~yT126Y9J}E@zASlhmCMFuw%rLD&nhpndO(B#-`@-QILM>*tks?y-N6N}R zqE+rq#Sxa;bOcy1-KtNTP8|^Mu(1@)s-$%79*d<}1gaYoc-e*(X03>qvjOwQ;qG?r zaOBwZ#uE4ZPa3N|M1bM`61@b2$a{k$mL*oT@Q%`F%O^);)PjpOzC^3aY{~<5KdOJm<~)~ z+Et{AC%4K?P;qR9Kg;i%X$8v_E`4=e{hC{jYZXLj?(Cisr*CE1Iz5ulTf`@)D~{3i z`n~ov4iXQI*B%np{db;G - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/index-detail-sort-l.html b/html/bayesnet/network/index-detail-sort-l.html deleted file mode 100644 index b032e99..0000000 --- a/html/bayesnet/network/index-detail-sort-l.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/index-detail.html b/html/bayesnet/network/index-detail.html deleted file mode 100644 index 60f89a2..0000000 --- a/html/bayesnet/network/index-detail.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/index-sort-f.html b/html/bayesnet/network/index-sort-f.html deleted file mode 100644 index f5574a3..0000000 --- a/html/bayesnet/network/index-sort-f.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/index-sort-l.html b/html/bayesnet/network/index-sort-l.html deleted file mode 100644 index b032e99..0000000 --- a/html/bayesnet/network/index-sort-l.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/network/index.html b/html/bayesnet/network/index.html deleted file mode 100644 index 60f89a2..0000000 --- a/html/bayesnet/network/index.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/network - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/networkCoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %384384
Test Date:2024-05-06 17:54:04Functions:100.0 %6161
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Network.cc -
100.0%
-
100.0 %295295100.0 %4040
Network.h -
100.0%
-
100.0 %11100.0 %11
Node.cc -
100.0%
-
100.0 %8888100.0 %2020
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.cc.func-c.html b/html/bayesnet/utils/BayesMetrics.cc.func-c.html deleted file mode 100644 index 4a62b6f..0000000 --- a/html/bayesnet/utils/BayesMetrics.cc.func-c.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.2 %114112
Test Date:2024-05-06 17:54:04Functions:100.0 %1111
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Metrics::getScoresKBest() const48
bayesnet::Metrics::Metrics(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)96
bayesnet::Metrics::maximumSpanningTree(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, at::Tensor const&, int)148
bayesnet::Metrics::conditionalEdge(at::Tensor const&)152
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)478
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)::{lambda(int, int)#1}::operator()(int, int) const2088
bayesnet::Metrics::Metrics(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)2123
bayesnet::Metrics::conditionalEntropy(at::Tensor const&, at::Tensor const&, at::Tensor const&)34276
bayesnet::Metrics::mutualInformation(at::Tensor const&, at::Tensor const&, at::Tensor const&)34276
bayesnet::Metrics::entropy(at::Tensor const&, at::Tensor const&)41732
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)::{lambda(int, int)#2}::operator()(int, int) const64808
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.cc.func.html b/html/bayesnet/utils/BayesMetrics.cc.func.html deleted file mode 100644 index bd8292c..0000000 --- a/html/bayesnet/utils/BayesMetrics.cc.func.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.2 %114112
Test Date:2024-05-06 17:54:04Functions:100.0 %1111
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Metrics::Metrics(at::Tensor const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)2123
bayesnet::Metrics::Metrics(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<int, std::allocator<int> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)96
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)478
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)::{lambda(int, int)#1}::operator()(int, int) const2088
bayesnet::Metrics::SelectKBestWeighted(at::Tensor const&, bool, unsigned int)::{lambda(int, int)#2}::operator()(int, int) const64808
bayesnet::Metrics::conditionalEdge(at::Tensor const&)152
bayesnet::Metrics::conditionalEntropy(at::Tensor const&, at::Tensor const&, at::Tensor const&)34276
bayesnet::Metrics::entropy(at::Tensor const&, at::Tensor const&)41732
bayesnet::Metrics::getScoresKBest() const48
bayesnet::Metrics::maximumSpanningTree(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, at::Tensor const&, int)148
bayesnet::Metrics::mutualInformation(at::Tensor const&, at::Tensor const&, at::Tensor const&)34276
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.cc.gcov.frameset.html b/html/bayesnet/utils/BayesMetrics.cc.gcov.frameset.html deleted file mode 100644 index b487ab4..0000000 --- a/html/bayesnet/utils/BayesMetrics.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/utils/BayesMetrics.cc.gcov.html b/html/bayesnet/utils/BayesMetrics.cc.gcov.html deleted file mode 100644 index 9c67e25..0000000 --- a/html/bayesnet/utils/BayesMetrics.cc.gcov.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:98.2 %114112
Test Date:2024-05-06 17:54:04Functions:100.0 %1111
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #include "Mst.h"
-       8              : #include "BayesMetrics.h"
-       9              : namespace bayesnet {
-      10              :     //samples is n+1xm tensor used to fit the model
-      11         2123 :     Metrics::Metrics(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int classNumStates)
-      12         2123 :         : samples(samples)
-      13         2123 :         , className(className)
-      14         2123 :         , features(features)
-      15         2123 :         , classNumStates(classNumStates)
-      16              :     {
-      17         2123 :     }
-      18              :     //samples is n+1xm std::vector used to fit the model
-      19           96 :     Metrics::Metrics(const std::vector<std::vector<int>>& vsamples, const std::vector<int>& labels, const std::vector<std::string>& features, const std::string& className, const int classNumStates)
-      20           96 :         : samples(torch::zeros({ static_cast<int>(vsamples.size() + 1), static_cast<int>(vsamples[0].size()) }, torch::kInt32))
-      21           96 :         , className(className)
-      22           96 :         , features(features)
-      23           96 :         , classNumStates(classNumStates)
-      24              :     {
-      25          768 :         for (int i = 0; i < vsamples.size(); ++i) {
-      26         2688 :             samples.index_put_({ i,  "..." }, torch::tensor(vsamples[i], torch::kInt32));
-      27              :         }
-      28          384 :         samples.index_put_({ -1, "..." }, torch::tensor(labels, torch::kInt32));
-      29          864 :     }
-      30          478 :     std::vector<int> Metrics::SelectKBestWeighted(const torch::Tensor& weights, bool ascending, unsigned k)
-      31              :     {
-      32              :         // Return the K Best features 
-      33          478 :         auto n = features.size();
-      34          478 :         if (k == 0) {
-      35            6 :             k = n;
-      36              :         }
-      37              :         // compute scores
-      38          478 :         scoresKBest.clear();
-      39          478 :         featuresKBest.clear();
-      40         1434 :         auto label = samples.index({ -1, "..." });
-      41        10522 :         for (int i = 0; i < n; ++i) {
-      42        30132 :             scoresKBest.push_back(mutualInformation(label, samples.index({ i, "..." }), weights));
-      43        10044 :             featuresKBest.push_back(i);
-      44              :         }
-      45              :         // sort & reduce scores and features
-      46          478 :         if (ascending) {
-      47           94 :             sort(featuresKBest.begin(), featuresKBest.end(), [&](int i, int j)
-      48         2088 :                 { return scoresKBest[i] < scoresKBest[j]; });
-      49           94 :             sort(scoresKBest.begin(), scoresKBest.end(), std::less<double>());
-      50           94 :             if (k < n) {
-      51          154 :                 for (int i = 0; i < n - k; ++i) {
-      52          110 :                     featuresKBest.erase(featuresKBest.begin());
-      53          110 :                     scoresKBest.erase(scoresKBest.begin());
-      54              :                 }
-      55              :             }
-      56              :         } else {
-      57          384 :             sort(featuresKBest.begin(), featuresKBest.end(), [&](int i, int j)
-      58        64808 :                 { return scoresKBest[i] > scoresKBest[j]; });
-      59          384 :             sort(scoresKBest.begin(), scoresKBest.end(), std::greater<double>());
-      60          384 :             featuresKBest.resize(k);
-      61          384 :             scoresKBest.resize(k);
-      62              :         }
-      63          956 :         return featuresKBest;
-      64        11000 :     }
-      65           48 :     std::vector<double> Metrics::getScoresKBest() const
-      66              :     {
-      67           48 :         return scoresKBest;
-      68              :     }
-      69              : 
-      70          152 :     torch::Tensor Metrics::conditionalEdge(const torch::Tensor& weights)
-      71              :     {
-      72          152 :         auto result = std::vector<double>();
-      73          152 :         auto source = std::vector<std::string>(features);
-      74          152 :         source.push_back(className);
-      75          152 :         auto combinations = doCombinations(source);
-      76              :         // Compute class prior
-      77          152 :         auto margin = torch::zeros({ classNumStates }, torch::kFloat);
-      78          828 :         for (int value = 0; value < classNumStates; ++value) {
-      79         2704 :             auto mask = samples.index({ -1,  "..." }) == value;
-      80          676 :             margin[value] = mask.sum().item<double>() / samples.size(1);
-      81          676 :         }
-      82         4164 :         for (auto [first, second] : combinations) {
-      83         4012 :             int index_first = find(features.begin(), features.end(), first) - features.begin();
-      84         4012 :             int index_second = find(features.begin(), features.end(), second) - features.begin();
-      85         4012 :             double accumulated = 0;
-      86        23820 :             for (int value = 0; value < classNumStates; ++value) {
-      87        79232 :                 auto mask = samples.index({ -1, "..." }) == value;
-      88        59424 :                 auto first_dataset = samples.index({ index_first, mask });
-      89        59424 :                 auto second_dataset = samples.index({ index_second, mask });
-      90        39616 :                 auto weights_dataset = weights.index({ mask });
-      91        39616 :                 auto mi = mutualInformation(first_dataset, second_dataset, weights_dataset);
-      92        19808 :                 auto pb = margin[value].item<double>();
-      93        19808 :                 accumulated += pb * mi;
-      94        19808 :             }
-      95         4012 :             result.push_back(accumulated);
-      96         4012 :         }
-      97          152 :         long n_vars = source.size();
-      98          152 :         auto matrix = torch::zeros({ n_vars, n_vars });
-      99          152 :         auto indices = torch::triu_indices(n_vars, n_vars, 1);
-     100         4164 :         for (auto i = 0; i < result.size(); ++i) {
-     101         4012 :             auto x = indices[0][i];
-     102         4012 :             auto y = indices[1][i];
-     103         4012 :             matrix[x][y] = result[i];
-     104         4012 :             matrix[y][x] = result[i];
-     105         4012 :         }
-     106          304 :         return matrix;
-     107        99868 :     }
-     108        41732 :     double Metrics::entropy(const torch::Tensor& feature, const torch::Tensor& weights)
-     109              :     {
-     110        41732 :         torch::Tensor counts = feature.bincount(weights);
-     111        41732 :         double totalWeight = counts.sum().item<double>();
-     112        41732 :         torch::Tensor probs = counts.to(torch::kFloat) / totalWeight;
-     113        41732 :         torch::Tensor logProbs = torch::log(probs);
-     114        41732 :         torch::Tensor entropy = -probs * logProbs;
-     115        83464 :         return entropy.nansum().item<double>();
-     116        41732 :     }
-     117              :     // H(Y|X) = sum_{x in X} p(x) H(Y|X=x)
-     118        34276 :     double Metrics::conditionalEntropy(const torch::Tensor& firstFeature, const torch::Tensor& secondFeature, const torch::Tensor& weights)
-     119              :     {
-     120        34276 :         int numSamples = firstFeature.sizes()[0];
-     121        34276 :         torch::Tensor featureCounts = secondFeature.bincount(weights);
-     122        34276 :         std::unordered_map<int, std::unordered_map<int, double>> jointCounts;
-     123        34276 :         double totalWeight = 0;
-     124      6993324 :         for (auto i = 0; i < numSamples; i++) {
-     125      6959048 :             jointCounts[secondFeature[i].item<int>()][firstFeature[i].item<int>()] += weights[i].item<double>();
-     126      6959048 :             totalWeight += weights[i].item<float>();
-     127              :         }
-     128        34276 :         if (totalWeight == 0)
-     129            0 :             return 0;
-     130        34276 :         double entropyValue = 0;
-     131       168251 :         for (int value = 0; value < featureCounts.sizes()[0]; ++value) {
-     132       133975 :             double p_f = featureCounts[value].item<double>() / totalWeight;
-     133       133975 :             double entropy_f = 0;
-     134       454356 :             for (auto& [label, jointCount] : jointCounts[value]) {
-     135       320381 :                 double p_l_f = jointCount / featureCounts[value].item<double>();
-     136       320381 :                 if (p_l_f > 0) {
-     137       320381 :                     entropy_f -= p_l_f * log(p_l_f);
-     138              :                 } else {
-     139            0 :                     entropy_f = 0;
-     140              :                 }
-     141              :             }
-     142       133975 :             entropyValue += p_f * entropy_f;
-     143              :         }
-     144        34276 :         return entropyValue;
-     145        34276 :     }
-     146              :     // I(X;Y) = H(Y) - H(Y|X)
-     147        34276 :     double Metrics::mutualInformation(const torch::Tensor& firstFeature, const torch::Tensor& secondFeature, const torch::Tensor& weights)
-     148              :     {
-     149        34276 :         return entropy(firstFeature, weights) - conditionalEntropy(firstFeature, secondFeature, weights);
-     150              :     }
-     151              :     /*
-     152              :     Compute the maximum spanning tree considering the weights as distances
-     153              :     and the indices of the weights as nodes of this square matrix using
-     154              :     Kruskal algorithm
-     155              :     */
-     156          148 :     std::vector<std::pair<int, int>> Metrics::maximumSpanningTree(const std::vector<std::string>& features, const torch::Tensor& weights, const int root)
-     157              :     {
-     158          148 :         auto mst = MST(features, weights, root);
-     159          296 :         return mst.maximumSpanningTree();
-     160          148 :     }
-     161              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.cc.gcov.overview.html b/html/bayesnet/utils/BayesMetrics.cc.gcov.overview.html deleted file mode 100644 index 3c88dcb..0000000 --- a/html/bayesnet/utils/BayesMetrics.cc.gcov.overview.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/utils/BayesMetrics.cc.gcov.png b/html/bayesnet/utils/BayesMetrics.cc.gcov.png deleted file mode 100644 index 30f9de1091316dd69e9e517a0c9d6d999ab68f5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 965 zcmV;$13LVPP)H1FnLK=WcJZvsSG12o6K##}p>N13Zg~caeQNjIu9_Oo-nG|+(#z&OPv`~srG*>}LI5Yh&ellzkmpw?qw*uHSm^&h`qB{^K&c|YTces8AgRM!i)ROVbhvA4%O*tazJYOyB@RpcrBow)5#3doON)I! zSL#bn7&UAGFFw%=RRV?--i47_*bye^j}NXWfwzT$3{fJ|1hPNQjwpd@^U)EjlV%HO zlHAtg?Gep47R9A(+_H{K(c)1{19wvCz?uYlu19(TJ&LI4b&GW%+{zB{D6M1L=f#Jn zZ7>EzgW{8Qn%Z68=9MBv*x>KqSjKYPh13&prJjfm2`J?7fZM4#tD1oW`OV7Jd32uH zOZK7Fg&9k+?7qGc287Spc3c2wJB_K?_a0IsF31rOa&IhmgdxR%AQ!~U{#5s2VOj}+1;c`(uSw3~ zgC>h;}($JA<*qT0(VQ?6L6=*8PN=xX2){6 zUE&%oZAL5E_dKzT1x-;$4aiD5Y%OS-Re^xWj4p(kre#CwxWaoJlsbUMwjF4UgtA&! zee93Tqq@yzSno6Cv=J!L!UB!{XzL}zW?WnIls`&|C4s2*X;6$uVJ|6bSwSs7(=UCpczI1UDL=80J0IbM!n|Q*=YPkEvx~toaBa?3&lvj z02+lr16lW%bw0nppOt0$fp5SI7@p!-kUEB;AqWZc#o*%tx04irk?j=F$d273=x4ut z2%2E}&(4Gteuw_ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1313
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
int bayesnet::Metrics::pop_first<int>(std::vector<int, std::allocator<int> >&)94
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > bayesnet::Metrics::doCombinations<int>(std::vector<int, std::allocator<int> > const&)1391
std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > >, std::allocator, std::allocator >, std::__cxx11::basic_string, std::allocator > > > > bayesnet::Metrics::doCombinations, std::allocator > >(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)152
std::vector, std::allocator > > bayesnet::Metrics::doCombinations(std::vector > const&)1239
bayesnet::Metrics::Metrics()2240
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.h.func.html b/html/bayesnet/utils/BayesMetrics.h.func.html deleted file mode 100644 index 9e066cc..0000000 --- a/html/bayesnet/utils/BayesMetrics.h.func.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1313
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Metrics::Metrics()2240
int bayesnet::Metrics::pop_first<int>(std::vector<int, std::allocator<int> >&)94
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > bayesnet::Metrics::doCombinations<int>(std::vector<int, std::allocator<int> > const&)1391
std::vector, std::allocator > > bayesnet::Metrics::doCombinations(std::vector > const&)1239
std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > >, std::allocator, std::allocator >, std::__cxx11::basic_string, std::allocator > > > > bayesnet::Metrics::doCombinations, std::allocator > >(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)152
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.h.gcov.frameset.html b/html/bayesnet/utils/BayesMetrics.h.gcov.frameset.html deleted file mode 100644 index 81a526c..0000000 --- a/html/bayesnet/utils/BayesMetrics.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/utils/BayesMetrics.h.gcov.html b/html/bayesnet/utils/BayesMetrics.h.gcov.html deleted file mode 100644 index 1ac7634..0000000 --- a/html/bayesnet/utils/BayesMetrics.h.gcov.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - BayesMetrics.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %1313
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef BAYESNET_METRICS_H
-       8              : #define BAYESNET_METRICS_H
-       9              : #include <vector>
-      10              : #include <string>
-      11              : #include <torch/torch.h>
-      12              : namespace bayesnet {
-      13              :     class Metrics {
-      14              :     public:
-      15         2240 :         Metrics() = default;
-      16              :         Metrics(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int classNumStates);
-      17              :         Metrics(const std::vector<std::vector<int>>& vsamples, const std::vector<int>& labels, const std::vector<std::string>& features, const std::string& className, const int classNumStates);
-      18              :         std::vector<int> SelectKBestWeighted(const torch::Tensor& weights, bool ascending = false, unsigned k = 0);
-      19              :         std::vector<double> getScoresKBest() const;
-      20              :         double mutualInformation(const torch::Tensor& firstFeature, const torch::Tensor& secondFeature, const torch::Tensor& weights);
-      21              :         torch::Tensor conditionalEdge(const torch::Tensor& weights);
-      22              :         std::vector<std::pair<int, int>> maximumSpanningTree(const std::vector<std::string>& features, const torch::Tensor& weights, const int root);
-      23              :     protected:
-      24              :         torch::Tensor samples; // n+1xm torch::Tensor used to fit the model where samples[-1] is the y std::vector
-      25              :         std::string className;
-      26              :         double entropy(const torch::Tensor& feature, const torch::Tensor& weights);
-      27              :         std::vector<std::string> features;
-      28              :         template <class T>
-      29         1391 :         std::vector<std::pair<T, T>> doCombinations(const std::vector<T>& source)
-      30              :         {
-      31         1391 :             std::vector<std::pair<T, T>> result;
-      32         6981 :             for (int i = 0; i < source.size(); ++i) {
-      33         5590 :                 T temp = source[i];
-      34        16517 :                 for (int j = i + 1; j < source.size(); ++j) {
-      35        10927 :                     result.push_back({ temp, source[j] });
-      36              :                 }
-      37              :             }
-      38         2782 :             return result;
-      39         1391 :         }
-      40              :         template <class T>
-      41           94 :         T pop_first(std::vector<T>& v)
-      42              :         {
-      43           94 :             T temp = v[0];
-      44           94 :             v.erase(v.begin());
-      45           94 :             return temp;
-      46              :         }
-      47              :     private:
-      48              :         int classNumStates = 0;
-      49              :         std::vector<double> scoresKBest;
-      50              :         std::vector<int> featuresKBest; // sorted indices of the features
-      51              :         double conditionalEntropy(const torch::Tensor& firstFeature, const torch::Tensor& secondFeature, const torch::Tensor& weights);
-      52              :     };
-      53              : }
-      54              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/BayesMetrics.h.gcov.overview.html b/html/bayesnet/utils/BayesMetrics.h.gcov.overview.html deleted file mode 100644 index df94876..0000000 --- a/html/bayesnet/utils/BayesMetrics.h.gcov.overview.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/BayesMetrics.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/utils/BayesMetrics.h.gcov.png b/html/bayesnet/utils/BayesMetrics.h.gcov.png deleted file mode 100644 index e051d4ef66a1d22a8036d1f1885f42e82956c56f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 417 zcmeAS@N?(olHy`uVBq!ia0vp^0YGfV!VDxAO=7+Yq$C1-LR|m<|Gx?dmcNgUef6J# zVHHpuOr7)IycEdhEbxddW?X?_wfUqO7#Q_ET^vI^I@gBYl{~D#afP>_bw}gP z`t3;}bv;~f!{vM~$sKQ8pm?-o+XY|7X`}~If zGqqy-na;AfZw%g|;mq75X8T$>K-RnX(4%M@wID1j*Dnil1~SFxV^4~dh7YcH9W{NYZ~T - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:94.1 %6864
Test Date:2024-05-06 17:54:04Functions:100.0 %1010
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Graph::Graph(int)148
bayesnet::Graph::kruskal_algorithm()148
bayesnet::MST::MST(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, at::Tensor const&, int)148
bayesnet::MST::maximumSpanningTree()148
bayesnet::reorder(std::vector<std::pair<float, std::pair<int, int> >, std::allocator<std::pair<float, std::pair<int, int> > > >, int)148
bayesnet::Graph::union_set(int, int)828
bayesnet::insertElement(std::__cxx11::list<int, std::allocator<int> >&, int)828
bayesnet::Graph::addEdge(int, int, float)3032
auto bayesnet::Graph::kruskal_algorithm()::{lambda(auto:1 const&, auto:2 const&)#1}::operator()<std::pair<float, std::pair<int, int> >, std::pair<float, std::pair<int, int> > >(std::pair<float, std::pair<int, int> > const&, std::pair<float, std::pair<int, int> > const&) const11716
bayesnet::Graph::find_set(int)14076
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.cc.func.html b/html/bayesnet/utils/Mst.cc.func.html deleted file mode 100644 index 166f248..0000000 --- a/html/bayesnet/utils/Mst.cc.func.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:94.1 %6864
Test Date:2024-05-06 17:54:04Functions:100.0 %1010
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
auto bayesnet::Graph::kruskal_algorithm()::{lambda(auto:1 const&, auto:2 const&)#1}::operator()<std::pair<float, std::pair<int, int> >, std::pair<float, std::pair<int, int> > >(std::pair<float, std::pair<int, int> > const&, std::pair<float, std::pair<int, int> > const&) const11716
bayesnet::Graph::Graph(int)148
bayesnet::Graph::addEdge(int, int, float)3032
bayesnet::Graph::find_set(int)14076
bayesnet::Graph::kruskal_algorithm()148
bayesnet::Graph::union_set(int, int)828
bayesnet::MST::MST(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, at::Tensor const&, int)148
bayesnet::MST::maximumSpanningTree()148
bayesnet::insertElement(std::__cxx11::list<int, std::allocator<int> >&, int)828
bayesnet::reorder(std::vector<std::pair<float, std::pair<int, int> >, std::allocator<std::pair<float, std::pair<int, int> > > >, int)148
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.cc.gcov.frameset.html b/html/bayesnet/utils/Mst.cc.gcov.frameset.html deleted file mode 100644 index d702859..0000000 --- a/html/bayesnet/utils/Mst.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/utils/Mst.cc.gcov.html b/html/bayesnet/utils/Mst.cc.gcov.html deleted file mode 100644 index e567440..0000000 --- a/html/bayesnet/utils/Mst.cc.gcov.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:94.1 %6864
Test Date:2024-05-06 17:54:04Functions:100.0 %1010
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       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 <vector>
-       9              : #include <list>
-      10              : #include "Mst.h"
-      11              : /*
-      12              :     Based on the code from https://www.softwaretestinghelp.com/minimum-spanning-tree-tutorial/
-      13              : 
-      14              : */
-      15              : 
-      16              : namespace bayesnet {
-      17          296 :     Graph::Graph(int V) : V(V), parent(std::vector<int>(V))
-      18              :     {
-      19         1124 :         for (int i = 0; i < V; i++)
-      20          976 :             parent[i] = i;
-      21          148 :         G.clear();
-      22          148 :         T.clear();
-      23          148 :     }
-      24         3032 :     void Graph::addEdge(int u, int v, float wt)
-      25              :     {
-      26         3032 :         G.push_back({ wt, { u, v } });
-      27         3032 :     }
-      28        14076 :     int Graph::find_set(int i)
-      29              :     {
-      30              :         // If i is the parent of itself
-      31        14076 :         if (i == parent[i])
-      32         6064 :             return i;
-      33              :         else
-      34              :             //else recursively find the parent of i
-      35         8012 :             return find_set(parent[i]);
-      36              :     }
-      37          828 :     void Graph::union_set(int u, int v)
-      38              :     {
-      39          828 :         parent[u] = parent[v];
-      40          828 :     }
-      41          148 :     void Graph::kruskal_algorithm()
-      42              :     {
-      43              :         // sort the edges ordered on decreasing weight
-      44        11864 :         stable_sort(G.begin(), G.end(), [](const auto& left, const auto& right) {return left.first > right.first;});
-      45         3180 :         for (int i = 0; i < G.size(); i++) {
-      46              :             int uSt, vEd;
-      47         3032 :             uSt = find_set(G[i].second.first);
-      48         3032 :             vEd = find_set(G[i].second.second);
-      49         3032 :             if (uSt != vEd) {
-      50          828 :                 T.push_back(G[i]); // add to mst std::vector
-      51          828 :                 union_set(uSt, vEd);
-      52              :             }
-      53              :         }
-      54          148 :     }
-      55              : 
-      56          828 :     void insertElement(std::list<int>& variables, int variable)
-      57              :     {
-      58          828 :         if (std::find(variables.begin(), variables.end(), variable) == variables.end()) {
-      59          828 :             variables.push_front(variable);
-      60              :         }
-      61          828 :     }
-      62              : 
-      63          148 :     std::vector<std::pair<int, int>> reorder(std::vector<std::pair<float, std::pair<int, int>>> T, int root_original)
-      64              :     {
-      65              :         // Create the edges of a DAG from the MST
-      66              :         // replacing unordered_set with list because unordered_set cannot guarantee the order of the elements inserted
-      67          148 :         auto result = std::vector<std::pair<int, int>>();
-      68          148 :         auto visited = std::vector<int>();
-      69          148 :         auto nextVariables = std::list<int>();
-      70          148 :         nextVariables.push_front(root_original);
-      71         1124 :         while (nextVariables.size() > 0) {
-      72          976 :             int root = nextVariables.front();
-      73          976 :             nextVariables.pop_front();
-      74         3464 :             for (int i = 0; i < T.size(); ++i) {
-      75         2488 :                 auto [weight, edge] = T[i];
-      76         2488 :                 auto [from, to] = edge;
-      77         2488 :                 if (from == root || to == root) {
-      78          828 :                     visited.insert(visited.begin(), i);
-      79          828 :                     if (from == root) {
-      80          560 :                         result.push_back({ from, to });
-      81          560 :                         insertElement(nextVariables, to);
-      82              :                     } else {
-      83          268 :                         result.push_back({ to, from });
-      84          268 :                         insertElement(nextVariables, from);
-      85              :                     }
-      86              :                 }
-      87              :             }
-      88              :             // Remove visited
-      89         1804 :             for (int i = 0; i < visited.size(); ++i) {
-      90          828 :                 T.erase(T.begin() + visited[i]);
-      91              :             }
-      92          976 :             visited.clear();
-      93              :         }
-      94          148 :         if (T.size() > 0) {
-      95            0 :             for (int i = 0; i < T.size(); ++i) {
-      96            0 :                 auto [weight, edge] = T[i];
-      97            0 :                 auto [from, to] = edge;
-      98            0 :                 result.push_back({ from, to });
-      99              :             }
-     100              :         }
-     101          296 :         return result;
-     102          148 :     }
-     103              : 
-     104          148 :     MST::MST(const std::vector<std::string>& features, const torch::Tensor& weights, const int root) : features(features), weights(weights), root(root) {}
-     105          148 :     std::vector<std::pair<int, int>> MST::maximumSpanningTree()
-     106              :     {
-     107          148 :         auto num_features = features.size();
-     108          148 :         Graph g(num_features);
-     109              :         // Make a complete graph
-     110          976 :         for (int i = 0; i < num_features - 1; ++i) {
-     111         3860 :             for (int j = i + 1; j < num_features; ++j) {
-     112         3032 :                 g.addEdge(i, j, weights[i][j].item<float>());
-     113              :             }
-     114              :         }
-     115          148 :         g.kruskal_algorithm();
-     116          148 :         auto mst = g.get_mst();
-     117          296 :         return reorder(mst, root);
-     118          148 :     }
-     119              : 
-     120              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.cc.gcov.overview.html b/html/bayesnet/utils/Mst.cc.gcov.overview.html deleted file mode 100644 index a8e6cda..0000000 --- a/html/bayesnet/utils/Mst.cc.gcov.overview.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/utils/Mst.cc.gcov.png b/html/bayesnet/utils/Mst.cc.gcov.png deleted file mode 100644 index b6f615adea99d3ac0c13cc53b54663e7324b7569..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 733 zcmV<30wVp1P)Dr5gn$G{h`ndtJ*(Hx5W=58m(TjqZ6Raenl4+o zZuuWu18&vJLt`Gd^8N(WVl-QsgB6s6a2)5S9;2Ctwt?o!go%`Ngj>KQb#FgR z54nr!0T@U7D8_r)luX(^qJq{fi5#^q6dFzjTuPDR{9bF&L!k5+V?>>=pWGay;6v1d z7}L-rU9+Ko5e2E@zaC2=sPg?aMtOCfiXx>sZA9yM+sTv3eZ^B-0siOOPLVhm##m5I zWjDy%Sf5V`9Mv^~fXnRU!Iyk<&)X$wG!e8QNXt#&e04DC^NkQ!=7AoKU?VenbZN<5 z1wJW-k;^P2>NeH(p{pE0%iu4ihtH##8BOYO73MNrS1QTj`sZ_F>5zC|o>T2cx2Ygq z8!Sub4Tgf1ON)VwmB8Kvu!=A4oYK&_sc5Pgsb`$<+N0K{s=B6*hvzBLV@|q+)gWLu z!HpLEN?>0O+;a_*&v8p*3TN__J+^~GubyP%CO;b*l*#l%H%Hepv^?%!&J@OGYQ}QG zs=rof8cb#*rFHvEMuj{Ywh!)a0va1>?%{DR3iw64&g(jk<2=LXg%97xmV6VwOGsqT z7Hh#%!Wc*v_~Yzh0*6jGXqE(}8`Ny??`}wJAA(%nMRc>B>(`B)yxd!j2r2{vft-ow zsQxFZCuMehh*x0+w`fy^ARZ%MImEHGnWQInPH2J}gL!FWpD*aq+Cu*T - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Graph::get_mst()148
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.h.func.html b/html/bayesnet/utils/Mst.h.func.html deleted file mode 100644 index c1c0139..0000000 --- a/html/bayesnet/utils/Mst.h.func.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.h - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::Graph::get_mst()148
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.h.gcov.frameset.html b/html/bayesnet/utils/Mst.h.gcov.frameset.html deleted file mode 100644 index 1290886..0000000 --- a/html/bayesnet/utils/Mst.h.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.h - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/utils/Mst.h.gcov.html b/html/bayesnet/utils/Mst.h.gcov.html deleted file mode 100644 index de46cc2..0000000 --- a/html/bayesnet/utils/Mst.h.gcov.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.h - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - Mst.h (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %11
Test Date:2024-05-06 17:54:04Functions:100.0 %11
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : #ifndef MST_H
-       8              : #define MST_H
-       9              : #include <vector>
-      10              : #include <string>
-      11              : #include <torch/torch.h>
-      12              : namespace bayesnet {
-      13              :     class MST {
-      14              :     public:
-      15              :         MST() = default;
-      16              :         MST(const std::vector<std::string>& features, const torch::Tensor& weights, const int root);
-      17              :         std::vector<std::pair<int, int>> maximumSpanningTree();
-      18              :     private:
-      19              :         torch::Tensor weights;
-      20              :         std::vector<std::string> features;
-      21              :         int root = 0;
-      22              :     };
-      23              :     class Graph {
-      24              :     public:
-      25              :         explicit Graph(int V);
-      26              :         void addEdge(int u, int v, float wt);
-      27              :         int find_set(int i);
-      28              :         void union_set(int u, int v);
-      29              :         void kruskal_algorithm();
-      30          148 :         std::vector <std::pair<float, std::pair<int, int>>> get_mst() { return T; }
-      31              :     private:
-      32              :         int V;      // number of nodes in graph
-      33              :         std::vector <std::pair<float, std::pair<int, int>>> G; // std::vector for graph
-      34              :         std::vector <std::pair<float, std::pair<int, int>>> T; // std::vector for mst
-      35              :         std::vector<int> parent;
-      36              :     };
-      37              : }
-      38              : #endif
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/Mst.h.gcov.overview.html b/html/bayesnet/utils/Mst.h.gcov.overview.html deleted file mode 100644 index 606c327..0000000 --- a/html/bayesnet/utils/Mst.h.gcov.overview.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/Mst.h - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/utils/Mst.h.gcov.png b/html/bayesnet/utils/Mst.h.gcov.png deleted file mode 100644 index 142bae36adf0f57b64a30122cd69f09e37cbd804..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$A!VDxAx-dEcDTx4|5ZC|z|E~gqvBOMQ{aKip;;e;v=_OZskJisa8mT%DlY?((4s_(@^Y`+R_C~nXMQ-Fcl&WvdC;w} zL*0shcV=9?+-}#Vp8sXejqTztug_^6Ej__kBF9l{Air#)w)%VJ$0 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/bayesnetUtils.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - bayesnetUtils.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2525
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::tensorToVectorDouble(at::Tensor&)32
bayesnet::vectorToTensor(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, bool)40
bayesnet::argsort(std::vector<double, std::allocator<double> >&)203
bayesnet::argsort(std::vector<double, std::allocator<double> >&)::{lambda(int, int)#1}::operator()(int, int) const4041
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/bayesnetUtils.cc.func.html b/html/bayesnet/utils/bayesnetUtils.cc.func.html deleted file mode 100644 index c679cbf..0000000 --- a/html/bayesnet/utils/bayesnetUtils.cc.func.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/bayesnetUtils.cc - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - bayesnetUtils.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2525
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Function Name Sort by function nameHit count Sort by function hit count
bayesnet::argsort(std::vector<double, std::allocator<double> >&)203
bayesnet::argsort(std::vector<double, std::allocator<double> >&)::{lambda(int, int)#1}::operator()(int, int) const4041
bayesnet::tensorToVectorDouble(at::Tensor&)32
bayesnet::vectorToTensor(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, bool)40
-
-
- - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/bayesnetUtils.cc.gcov.frameset.html b/html/bayesnet/utils/bayesnetUtils.cc.gcov.frameset.html deleted file mode 100644 index 6364c79..0000000 --- a/html/bayesnet/utils/bayesnetUtils.cc.gcov.frameset.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/bayesnetUtils.cc - - - - - - - - <center>Frames not supported by your browser!<br></center> - - - - diff --git a/html/bayesnet/utils/bayesnetUtils.cc.gcov.html b/html/bayesnet/utils/bayesnetUtils.cc.gcov.html deleted file mode 100644 index b393109..0000000 --- a/html/bayesnet/utils/bayesnetUtils.cc.gcov.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/bayesnetUtils.cc - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utils - bayesnetUtils.cc (source / functions)CoverageTotalHit
Test:BayesNet Coverage ReportLines:100.0 %2525
Test Date:2024-05-06 17:54:04Functions:100.0 %44
Legend: Lines: - hit - not hit -
-
- - - - - - - - -

-
            Line data    Source code
-
-       1              : // ***************************************************************
-       2              : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
-       3              : // SPDX-FileType: SOURCE
-       4              : // SPDX-License-Identifier: MIT
-       5              : // ***************************************************************
-       6              : 
-       7              : 
-       8              : #include "bayesnetUtils.h"
-       9              : namespace bayesnet {
-      10              :     // Return the indices in descending order
-      11          203 :     std::vector<int> argsort(std::vector<double>& nums)
-      12              :     {
-      13          203 :         int n = nums.size();
-      14          203 :         std::vector<int> indices(n);
-      15          203 :         iota(indices.begin(), indices.end(), 0);
-      16         4244 :         sort(indices.begin(), indices.end(), [&nums](int i, int j) {return nums[i] > nums[j];});
-      17          406 :         return indices;
-      18          203 :     }
-      19           32 :     std::vector<std::vector<double>> tensorToVectorDouble(torch::Tensor& dtensor)
-      20              :     {
-      21              :         // convert mxn tensor to mxn std::vector
-      22           32 :         std::vector<std::vector<double>> result;
-      23              :         // Iterate over cols
-      24         8072 :         for (int i = 0; i < dtensor.size(0); ++i) {
-      25        24120 :             auto col_tensor = dtensor.index({ i, "..." });
-      26         8040 :             auto col = std::vector<double>(col_tensor.data_ptr<float>(), col_tensor.data_ptr<float>() + dtensor.size(1));
-      27         8040 :             result.push_back(col);
-      28         8040 :         }
-      29           64 :         return result;
-      30         8072 :     }
-      31           40 :     torch::Tensor vectorToTensor(std::vector<std::vector<int>>& vector, bool transpose)
-      32              :     {
-      33              :         // convert nxm std::vector to mxn tensor if transpose
-      34           40 :         long int m = transpose ? vector[0].size() : vector.size();
-      35           40 :         long int n = transpose ? vector.size() : vector[0].size();
-      36           40 :         auto tensor = torch::zeros({ m, n }, torch::kInt32);
-      37          276 :         for (int i = 0; i < m; ++i) {
-      38        57664 :             for (int j = 0; j < n; ++j) {
-      39        57428 :                 tensor[i][j] = transpose ? vector[j][i] : vector[i][j];
-      40              :             }
-      41              :         }
-      42           80 :         return tensor;
-      43           40 :     }
-      44              : }
-        
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/bayesnetUtils.cc.gcov.overview.html b/html/bayesnet/utils/bayesnetUtils.cc.gcov.overview.html deleted file mode 100644 index a1add40..0000000 --- a/html/bayesnet/utils/bayesnetUtils.cc.gcov.overview.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils/bayesnetUtils.cc - - - - - - - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - overview - - -
- Top

- Overview -
- - diff --git a/html/bayesnet/utils/bayesnetUtils.cc.gcov.png b/html/bayesnet/utils/bayesnetUtils.cc.gcov.png deleted file mode 100644 index 297b589ccc4a0d6c4b9bc65c7f81b45e58fc7a5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$7!VDxC?klMPNr?cT5ZC|z|E~gq#{F(FaH}IYrH*s<+6qVvDsm_Wy%<$1oxOsy;$^zamVV9)ybQdCrc%> zKcC}JqREhTr)kgkjZqz!4F2xfz!LJ?-MF%|BjVGXhF2fB6+*+D*EMcQDr(u3dtlGq zO;v}j_{7}UE8iJ!Q(MOFC7ft0KdaO}OV@uQ!}+=&2P}J?lo?IcJ9&NyRZMmuhYAbx;=UQ<}MZG?vuB&uL*BhZO>HQ zb){JDUf^*%k&RO4YwZ=gXfRUbv&V@;~#0LuWU}wEW%& P3?l|lS3j3^P6 - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Mst.h -
100.0%
-
100.0 %11100.0 %11
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/index-detail-sort-l.html b/html/bayesnet/utils/index-detail-sort-l.html deleted file mode 100644 index aa1a79c..0000000 --- a/html/bayesnet/utils/index-detail-sort-l.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
Mst.h -
100.0%
-
100.0 %11100.0 %11
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/index-detail.html b/html/bayesnet/utils/index-detail.html deleted file mode 100644 index 1afd44b..0000000 --- a/html/bayesnet/utils/index-detail.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
Mst.h -
100.0%
-
100.0 %11100.0 %11
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/index-sort-f.html b/html/bayesnet/utils/index-sort-f.html deleted file mode 100644 index df7670c..0000000 --- a/html/bayesnet/utils/index-sort-f.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Mst.h -
100.0%
-
100.0 %11100.0 %11
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/index-sort-l.html b/html/bayesnet/utils/index-sort-l.html deleted file mode 100644 index aa1a79c..0000000 --- a/html/bayesnet/utils/index-sort-l.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
Mst.h -
100.0%
-
100.0 %11100.0 %11
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/bayesnet/utils/index.html b/html/bayesnet/utils/index.html deleted file mode 100644 index 1afd44b..0000000 --- a/html/bayesnet/utils/index.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - bayesnet/utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - bayesnet/utilsCoverageTotalHit
Test:BayesNet Coverage ReportLines:97.3 %221215
Test Date:2024-05-06 17:54:04Functions:100.0 %3030
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by file nameLine Coverage ( show details ) Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
BayesMetrics.cc -
98.2%98.2%
-
98.2 %114112100.0 %1111
BayesMetrics.h -
100.0%
-
100.0 %1313100.0 %44
Mst.cc -
94.1%94.1%
-
94.1 %6864100.0 %1010
Mst.h -
100.0%
-
100.0 %11100.0 %11
bayesnetUtils.cc -
100.0%
-
100.0 %2525100.0 %44
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/cmd_line b/html/cmd_line deleted file mode 100644 index fc7e89b..0000000 --- a/html/cmd_line +++ /dev/null @@ -1 +0,0 @@ -genhtml build_debug/tests/coverage.info --demangle-cpp --output-directory html --title 'BayesNet Coverage Report' -s -k -f --legend diff --git a/html/emerald.png b/html/emerald.png deleted file mode 100644 index 38ad4f4068b935643d2486f323005fb294a9bd7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 diff --git a/html/gcov.css b/html/gcov.css deleted file mode 100644 index f329042..0000000 --- a/html/gcov.css +++ /dev/null @@ -1,1073 +0,0 @@ -/* All views: initial background and text color */ -body -{ - color: #000000; - background-color: #ffffff; -} - -/* All views: standard link format*/ -a:link -{ - color: #284fa8; - text-decoration: underline; -} - -/* All views: standard link - visited format */ -a:visited -{ - color: #00cb40; - text-decoration: underline; -} - -/* All views: standard link - activated format */ -a:active -{ - color: #ff0040; - text-decoration: underline; -} - -/* All views: main title format */ -td.title -{ - text-align: center; - padding-bottom: 10px; - font-family: sans-serif; - font-size: 20pt; - font-style: italic; - font-weight: bold; -} -/* "Line coverage date bins" leader */ -td.subTableHeader -{ - text-align: center; - padding-bottom: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: center; -} - -/* All views: header item format */ -td.headerItem -{ - text-align: right; - padding-right: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: top; - white-space: nowrap; -} - -/* All views: header item value format */ -td.headerValue -{ - text-align: left; - color: #284fa8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; -} - -/* All views: header item coverage table heading */ -td.headerCovTableHead -{ - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; -} - -/* All views: header item coverage table entry */ -td.headerCovTableEntry -{ - text-align: right; - color: #284fa8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #dae7fe; -} - -/* All views: header item coverage table entry for high coverage rate */ -td.headerCovTableEntryHi -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #a7fc9d; -} - -/* All views: header item coverage table entry for medium coverage rate */ -td.headerCovTableEntryMed -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #ffea20; -} - -/* All views: header item coverage table entry for ow coverage rate */ -td.headerCovTableEntryLo -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #ff0000; -} - -/* All views: header legend value for legend entry */ -td.headerValueLeg -{ - text-align: left; - color: #000000; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - padding-top: 4px; -} - -/* All views: color of horizontal ruler */ -td.ruler -{ - background-color: #6688d4; -} - -/* All views: version string format */ -td.versionInfo -{ - text-align: center; - padding-top: 2px; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all)/Test case descriptions: - table headline format */ -td.tableHead -{ - text-align: center; - color: #ffffff; - background-color: #6688d4; - font-family: sans-serif; - font-size: 120%; - font-weight: bold; - white-space: nowrap; - padding-left: 4px; - padding-right: 4px; -} - -span.tableHeadSort -{ - padding-right: 4px; -} - -/* Directory view/File view (all): filename entry format */ -td.coverFile -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - background-color: #dae7fe; - font-family: monospace; -} - -/* Directory view/File view (all): filename entry format */ -td.overallOwner -{ - text-align: center; - font-weight: bold; - font-family: sans-serif; - background-color: #dae7fe; - padding-right: 10px; - padding-left: 10px; -} - -/* Directory view/File view (all): filename entry format */ -td.ownerName -{ - text-align: right; - font-style: italic; - font-family: sans-serif; - background-color: #E5DBDB; - padding-right: 10px; - padding-left: 20px; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.owner_coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #E5DBDB; -} - -/* Directory view/File view (all): bar-graph outline color */ -td.coverBarOutline -{ - background-color: #000000; -} - -/* Directory view/File view (all): percentage entry for files with - high coverage rate */ -td.coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #a7fc9d; - font-weight: bold; - font-family: sans-serif; -} - -/* 'owner' entry: slightly lighter color than 'coverPerHi' */ -td.owner_coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #82E0AA; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry */ -td.coverNumDflt -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - white-space: nowrap; - font-family: sans-serif; -} - -/* td background color and font for the 'owner' section of the table */ -td.ownerTla -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #E5DBDB; - white-space: nowrap; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all): line count entry for files with - high coverage rate */ -td.coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #a7fc9d; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #82E0AA; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - medium coverage rate */ -td.coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ffea20; - font-weight: bold; - font-family: sans-serif; -} - -td.owner_coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #F9E79F; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - medium coverage rate */ -td.coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ffea20; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #F9E79F; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - low coverage rate */ -td.coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - font-weight: bold; - font-family: sans-serif; -} - -td.owner_coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - low coverage rate */ -td.coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - white-space: nowrap; - font-family: sans-serif; -} - -td.owner_coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; - white-space: nowrap; - font-family: sans-serif; -} - -/* File view (all): "show/hide details" link format */ -a.detail:link -{ - color: #b8d0ff; - font-size:80%; -} - -/* File view (all): "show/hide details" link - visited format */ -a.detail:visited -{ - color: #b8d0ff; - font-size:80%; -} - -/* File view (all): "show/hide details" link - activated format */ -a.detail:active -{ - color: #ffffff; - font-size:80%; -} - -/* File view (detail): test name entry */ -td.testName -{ - text-align: right; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* File view (detail): test percentage entry */ -td.testPer -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* File view (detail): test lines count entry */ -td.testNum -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-family: sans-serif; -} - -/* Test case descriptions: test name format*/ -dt -{ - font-family: sans-serif; - font-weight: bold; -} - -/* Test case descriptions: description table body */ -td.testDescription -{ - padding-top: 10px; - padding-left: 30px; - padding-bottom: 10px; - padding-right: 30px; - background-color: #dae7fe; -} - -/* Source code view: function entry */ -td.coverFn -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - background-color: #dae7fe; - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #ff0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-weight: bold; - font-family: sans-serif; -} - -td.coverFnAlias -{ - text-align: right; - padding-left: 10px; - padding-right: 20px; - color: #284fa8; - /* make this a slightly different color than the leader - otherwise, - otherwise the alias is hard to distinguish in the table */ - background-color: #E5DBDB; /* very light pale grey/blue */ - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnAliasLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #EC7063; /* lighter red */ - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnAliasHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #dae7fe; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: source code format */ -pre.source -{ - font-family: monospace; - white-space: pre; - margin-top: 2px; -} - -/* Source code view: line number format */ -span.lineNum -{ - background-color: #efe383; -} - -/* Source code view: format for Cov legend */ -span.coverLegendCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #cad7fe; -} - -/* Source code view: format for NoCov legend */ -span.coverLegendNoCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #ff6230; -} - -/* Source code view: format for the source code heading line */ -pre.sourceHeading -{ - white-space: pre; - font-family: monospace; - font-weight: bold; - margin: 0px; -} - -/* All views: header legend value for low rate */ -td.headerValueLegL -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 4px; - padding-right: 2px; - background-color: #ff0000; - font-size: 80%; -} - -/* All views: header legend value for med rate */ -td.headerValueLegM -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 2px; - background-color: #ffea20; - font-size: 80%; -} - -/* All views: header legend value for hi rate */ -td.headerValueLegH -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 4px; - background-color: #a7fc9d; - font-size: 80%; -} - -/* All views except source code view: legend format for low coverage */ -span.coverLegendCovLo -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #ff0000; -} - -/* All views except source code view: legend format for med coverage */ -span.coverLegendCovMed -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #ffea20; -} - -/* All views except source code view: legend format for hi coverage */ -span.coverLegendCovHi -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #a7fc9d; -} - -a.branchTla:link -{ - color: #000000; -} - -a.branchTla:visited -{ - color: #000000; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered New Code (+ => 0): -Newly added code is not tested" */ -td.tlaUNC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUNC { - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered New Code (+ => 0): -Newly added code is not tested" */ -span.tlaUNC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUNC { - background-color: #FF6230; -} -a.tlaBgUNC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUNC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Lost Baseline Coverage (1 => 0): -Unchanged code is no longer tested" */ -td.tlaLBC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgLBC { - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Lost Baseline Coverage (1 => 0): -Unchanged code is no longer tested" */ -span.tlaLBC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgLBC { - background-color: #FF6230; -} -a.tlaBgLBC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadLBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered Included Code (# => 0): -Previously unused code is untested" */ -td.tlaUIC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUIC { - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered Included Code (# => 0): -Previously unused code is untested" */ -span.tlaUIC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUIC { - background-color: #FF6230; -} -a.tlaBgUIC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUIC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered Baseline Code (0 => 0): -Unchanged code was untested before, is untested now" */ -td.tlaUBC -{ - text-align: right; - background-color: #FF6230; -} -td.tlaBgUBC { - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Uncovered Baseline Code (0 => 0): -Unchanged code was untested before, is untested now" */ -span.tlaUBC -{ - text-align: left; - background-color: #FF6230; -} -span.tlaBgUBC { - background-color: #FF6230; -} -a.tlaBgUBC { - background-color: #FF6230; - color: #000000; -} - -td.headerCovTableHeadUBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FF6230; -} - -/* Source code view/table entry backround: format for lines classified as "Gained Baseline Coverage (0 => 1): -Unchanged code is tested now" */ -td.tlaGBC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGBC { - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Gained Baseline Coverage (0 => 1): -Unchanged code is tested now" */ -span.tlaGBC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGBC { - background-color: #CAD7FE; -} -a.tlaBgGBC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Gained Included Coverage (# => 1): -Previously unused code is tested now" */ -td.tlaGIC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGIC { - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Gained Included Coverage (# => 1): -Previously unused code is tested now" */ -span.tlaGIC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGIC { - background-color: #CAD7FE; -} -a.tlaBgGIC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGIC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Gained New Coverage (+ => 1): -Newly added code is tested" */ -td.tlaGNC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgGNC { - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Gained New Coverage (+ => 1): -Newly added code is tested" */ -span.tlaGNC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgGNC { - background-color: #CAD7FE; -} -a.tlaBgGNC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadGNC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Covered Baseline Code (1 => 1): -Unchanged code was tested before and is still tested" */ -td.tlaCBC -{ - text-align: right; - background-color: #CAD7FE; -} -td.tlaBgCBC { - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Covered Baseline Code (1 => 1): -Unchanged code was tested before and is still tested" */ -span.tlaCBC -{ - text-align: left; - background-color: #CAD7FE; -} -span.tlaBgCBC { - background-color: #CAD7FE; -} -a.tlaBgCBC { - background-color: #CAD7FE; - color: #000000; -} - -td.headerCovTableHeadCBC { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #CAD7FE; -} - -/* Source code view/table entry backround: format for lines classified as "Excluded Uncovered Baseline (0 => #): -Previously untested code is unused now" */ -td.tlaEUB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgEUB { - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Excluded Uncovered Baseline (0 => #): -Previously untested code is unused now" */ -span.tlaEUB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgEUB { - background-color: #FFFFFF; -} -a.tlaBgEUB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadEUB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Excluded Covered Baseline (1 => #): -Previously tested code is unused now" */ -td.tlaECB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgECB { - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Excluded Covered Baseline (1 => #): -Previously tested code is unused now" */ -span.tlaECB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgECB { - background-color: #FFFFFF; -} -a.tlaBgECB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadECB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Deleted Uncovered Baseline (0 => -): -Previously untested code has been deleted" */ -td.tlaDUB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgDUB { - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Deleted Uncovered Baseline (0 => -): -Previously untested code has been deleted" */ -span.tlaDUB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgDUB { - background-color: #FFFFFF; -} -a.tlaBgDUB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadDUB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Deleted Covered Baseline (1 => -): -Previously tested code has been deleted" */ -td.tlaDCB -{ - text-align: right; - background-color: #FFFFFF; -} -td.tlaBgDCB { - background-color: #FFFFFF; -} - -/* Source code view/table entry backround: format for lines classified as "Deleted Covered Baseline (1 => -): -Previously tested code has been deleted" */ -span.tlaDCB -{ - text-align: left; - background-color: #FFFFFF; -} -span.tlaBgDCB { - background-color: #FFFFFF; -} -a.tlaBgDCB { - background-color: #FFFFFF; - color: #000000; -} - -td.headerCovTableHeadDCB { - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - white-space: nowrap; - background-color: #FFFFFF; -} - -/* Source code view: format for date/owner bin that is not hit */ -span.missBins -{ - background-color: #ff0000 /* red */ -} diff --git a/html/glass.png b/html/glass.png deleted file mode 100644 index e1abc00680a3093c49fdb775ae6bdb6764c95af2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv diff --git a/html/index-sort-f.html b/html/index-sort-f.html deleted file mode 100644 index 5c93be8..0000000 --- a/html/index-sort-f.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %16101594
Test Date:2024-05-06 17:54:04Functions:100.0 %237237
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
bayesnet -
100.0%
-
100.0 %11100.0 %11
bayesnet/feature_selection -
98.7%98.7%
-
98.7 %152150100.0 %1919
bayesnet/utils -
97.3%97.3%
-
97.3 %221215100.0 %3030
bayesnet/ensembles -
99.1%99.1%
-
99.1 %468464100.0 %5454
bayesnet/network -
100.0%
-
100.0 %384384100.0 %6161
bayesnet/classifiers -
99.0%99.0%
-
99.0 %384380100.0 %7272
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/index-sort-l.html b/html/index-sort-l.html deleted file mode 100644 index 6ae4f1b..0000000 --- a/html/index-sort-l.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %16101594
Test Date:2024-05-06 17:54:04Functions:100.0 %237237
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
bayesnet/utils -
97.3%97.3%
-
97.3 %221215100.0 %3030
bayesnet/feature_selection -
98.7%98.7%
-
98.7 %152150100.0 %1919
bayesnet/classifiers -
99.0%99.0%
-
99.0 %384380100.0 %7272
bayesnet/ensembles -
99.1%99.1%
-
99.1 %468464100.0 %5454
bayesnet -
100.0%
-
100.0 %11100.0 %11
bayesnet/network -
100.0%
-
100.0 %384384100.0 %6161
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/index.html b/html/index.html deleted file mode 100644 index cd28fc6..0000000 --- a/html/index.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - LCOV - BayesNet Coverage Report - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelCoverageTotalHit
Test:BayesNet Coverage ReportLines:99.0 %16101594
Test Date:2024-05-06 17:54:04Functions:100.0 %237237
Legend: Rating: - low: < 75 % - medium: >= 75 % - high: >= 90 % -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by file nameLine Coverage Sort by line coverageFunction Coverage Sort by function coverage
Rate Total Hit Rate Total Hit
bayesnet -
100.0%
-
100.0 %11100.0 %11
bayesnet/classifiers -
99.0%99.0%
-
99.0 %384380100.0 %7272
bayesnet/ensembles -
99.1%99.1%
-
99.1 %468464100.0 %5454
bayesnet/feature_selection -
98.7%98.7%
-
98.7 %152150100.0 %1919
bayesnet/network -
100.0%
-
100.0 %384384100.0 %6161
bayesnet/utils -
97.3%97.3%
-
97.3 %221215100.0 %3030
-
-
- - - - -
Generated by: LCOV version 2.0-1
-
- - - diff --git a/html/ruby.png b/html/ruby.png deleted file mode 100644 index 991b6d4ec9e78be165e3ef757eed1aada287364d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS diff --git a/html/snow.png b/html/snow.png deleted file mode 100644 index 2cdae107fceec6e7f02ac7acb4a34a82a540caa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< diff --git a/html/updown.png b/html/updown.png deleted file mode 100644 index aa56a238b3e6c435265250f9266cd1b8caba0f20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+