Enhance tests coverage and report output
This commit is contained in:
parent
b4a222b100
commit
3c7382a93a
@ -72,7 +72,7 @@ add_subdirectory(bayesnet)
|
||||
# -------
|
||||
if (ENABLE_TESTING)
|
||||
MESSAGE("Testing enabled")
|
||||
add_subdirectory("tests/lib/catch2")
|
||||
add_subdirectory(tests/lib/catch2)
|
||||
add_subdirectory(tests/lib/Files)
|
||||
include(CTest)
|
||||
add_subdirectory(tests)
|
||||
|
4
Makefile
4
Makefile
@ -122,13 +122,13 @@ coverage: ## Run tests and generate coverage report (build/index.html)
|
||||
@$(gcovr) $(f_debug)/tests
|
||||
@echo ">>> Building report..."
|
||||
@cd $(f_debug)/tests; \
|
||||
$(lcov) --directory . --capture --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --directory CMakeFiles --capture --ignore-errors source,source --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --remove coverage.info '/usr/*' --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --remove coverage.info 'lib/*' --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --remove coverage.info 'libtorch/*' --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --remove coverage.info 'tests/*' --output-file coverage.info >/dev/null 2>&1; \
|
||||
$(lcov) --remove coverage.info 'bayesnet/utils/loguru.*' --ignore-errors unused --output-file coverage.info >/dev/null 2>&1
|
||||
@$(genhtml) $(f_debug)/tests/coverage.info --output-directory html >/dev/null 2>&1;
|
||||
@$(genhtml) $(f_debug)/tests/coverage.info --demangle-cpp --output-directory html >/dev/null 2>&1;
|
||||
@$(MAKE) updatebadge
|
||||
@echo ">>> Done";
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=rmontanana_BayesNet&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=rmontanana_BayesNet)
|
||||
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=rmontanana_BayesNet&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=rmontanana_BayesNet)
|
||||
![Gitea Last Commit](https://img.shields.io/gitea/last-commit/rmontanana/bayesnet?gitea_url=https://gitea.rmontanana.es:3000&logo=gitea)
|
||||
[![Coverage Badge](https://img.shields.io/badge/Coverage-97,1%25-green)](html/index.html)
|
||||
[![Coverage Badge](https://img.shields.io/badge/Coverage-97,8%25-green)](html/index.html)
|
||||
|
||||
Bayesian Network Classifiers using libtorch from scratch
|
||||
|
||||
|
@ -410,11 +410,7 @@ namespace bayesnet {
|
||||
result.insert(it2, fatherName);
|
||||
ending = false;
|
||||
}
|
||||
} else {
|
||||
throw std::logic_error("Error in topological sort because of node " + feature + " is not in result");
|
||||
}
|
||||
} else {
|
||||
throw std::logic_error("Error in topological sort because of node father " + fatherName + " is not in result");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
96
html/BayesNet/bayesnet/BaseClassifier.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/BaseClassifier.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/BaseClassifier.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet</a> - BaseClassifier.h<span style="font-size: 80%;"> (<a href="BaseClassifier.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryLo">50.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="BaseClassifier.h.func.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/BaseClassifier.h.func.html
Normal file
96
html/BayesNet/bayesnet/BaseClassifier.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/BaseClassifier.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet</a> - BaseClassifier.h<span style="font-size: 80%;"> (<a href="BaseClassifier.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryLo">50.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="BaseClassifier.h.func-c.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BaseClassifier.h.gcov.html#L19">_ZN8bayesnet14BaseClassifierD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
121
html/BayesNet/bayesnet/BaseClassifier.h.gcov.html
Normal file
121
html/BayesNet/bayesnet/BaseClassifier.h.gcov.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/BaseClassifier.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet</a> - BaseClassifier.h<span style="font-size: 80%;"> (source / <a href="BaseClassifier.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryLo">50.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #pragma once</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include <vector></span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include <nlohmann/json.hpp></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : namespace bayesnet {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : enum status_t { NORMAL, WARNING, ERROR };</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class BaseClassifier {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : public:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : // X is nxm std::vector, y is nx1 std::vector</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : 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;</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : // X is nxm tensor, y is nx1 tensor</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : 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;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : 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;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : 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;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC tlaBgGNC"> 606 : virtual ~BaseClassifier() = default;</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : torch::Tensor virtual predict(torch::Tensor& X) = 0;</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : std::vector<int> virtual predict(std::vector<std::vector<int >>& X) = 0;</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : torch::Tensor virtual predict_proba(torch::Tensor& X) = 0;</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : std::vector<std::vector<double>> virtual predict_proba(std::vector<std::vector<int >>& X) = 0;</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : status_t virtual getStatus() const = 0;</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : float virtual score(std::vector<std::vector<int>>& X, std::vector<int>& y) = 0;</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : float virtual score(torch::Tensor& X, torch::Tensor& y) = 0;</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : int virtual getNumberOfNodes()const = 0;</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : int virtual getNumberOfEdges()const = 0;</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : int virtual getNumberOfStates() const = 0;</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> : int virtual getClassNumStates() const = 0;</span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : std::vector<std::string> virtual show() const = 0;</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : std::vector<std::string> virtual graph(const std::string& title = "") const = 0;</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : virtual std::string getVersion() = 0;</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : std::vector<std::string> virtual topological_order() = 0;</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : std::vector<std::string> virtual getNotes() const = 0;</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : std::string virtual dump_cpt()const = 0;</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : virtual void setHyperparameters(const nlohmann::json& hyperparameters) = 0;</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : std::vector<std::string>& getValidHyperparameters() { return validHyperparameters; }</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : protected:</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : virtual void trainModel(const torch::Tensor& weights) = 0;</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> : std::vector<std::string> validHyperparameters;</span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : };</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
243
html/BayesNet/bayesnet/classifiers/Classifier.cc.func-c.html
Normal file
243
html/BayesNet/bayesnet/classifiers/Classifier.cc.func-c.html
Normal file
@ -0,0 +1,243 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.cc<span style="font-size: 80%;"> (<a href="Classifier.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="Classifier.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L178">_ZN8bayesnet10Classifier17topological_orderB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L182">_ZNK8bayesnet10Classifier8dump_cptB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L142">_ZN8bayesnet10Classifier5scoreERSt6vectorIS1_IiSaIiEESaIS3_EERS3_</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L101">_ZN8bayesnet10Classifier7predictERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L170">_ZNK8bayesnet10Classifier17getNumberOfStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L149">_ZNK8bayesnet10Classifier4showB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L186">_ZN8bayesnet10Classifier18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">42</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L137">_ZN8bayesnet10Classifier5scoreERN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L55">_ZN8bayesnet10Classifier3fitERSt6vectorIS1_IiSaIiEESaIS3_EERS3_RKS1_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISD_EERKSD_RSt3mapISD_S3_St4lessISD_ESaISt4pairISI_S3_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">60</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L47">_ZN8bayesnet10Classifier3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">64</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L166">_ZNK8bayesnet10Classifier16getNumberOfEdgesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L161">_ZNK8bayesnet10Classifier16getNumberOfNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L122">_ZN8bayesnet10Classifier13predict_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">130</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L28">_ZN8bayesnet10Classifier12buildDatasetERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">162</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L174">_ZNK8bayesnet10Classifier17getClassNumStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">170</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L66">_ZN8bayesnet10Classifier3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">198</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L72">_ZN8bayesnet10Classifier3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEERKS2_</a></td>
|
||||
|
||||
<td class="coverFnHi">330</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L42">_ZN8bayesnet10Classifier10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">560</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L153">_ZN8bayesnet10Classifier8addNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">560</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L77">_ZN8bayesnet10Classifier18checkFitParametersEv</a></td>
|
||||
|
||||
<td class="coverFnHi">644</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L12">_ZN8bayesnet10Classifier5buildERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_RSt3mapIS7_S1_IiSaIiEESt4lessIS7_ESaISt4pairISC_SG_EEERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">644</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L115">_ZN8bayesnet10Classifier13predict_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">742</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L94">_ZN8bayesnet10Classifier7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">850</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L10">_ZN8bayesnet10ClassifierC2ENS_7NetworkE</a></td>
|
||||
|
||||
<td class="coverFnHi">886</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
243
html/BayesNet/bayesnet/classifiers/Classifier.cc.func.html
Normal file
243
html/BayesNet/bayesnet/classifiers/Classifier.cc.func.html
Normal file
@ -0,0 +1,243 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.cc<span style="font-size: 80%;"> (<a href="Classifier.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="Classifier.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L42">_ZN8bayesnet10Classifier10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">560</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L28">_ZN8bayesnet10Classifier12buildDatasetERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">162</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L115">_ZN8bayesnet10Classifier13predict_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">742</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L122">_ZN8bayesnet10Classifier13predict_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">130</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L178">_ZN8bayesnet10Classifier17topological_orderB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L77">_ZN8bayesnet10Classifier18checkFitParametersEv</a></td>
|
||||
|
||||
<td class="coverFnHi">644</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L186">_ZN8bayesnet10Classifier18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">42</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L66">_ZN8bayesnet10Classifier3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">198</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L72">_ZN8bayesnet10Classifier3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEERKS2_</a></td>
|
||||
|
||||
<td class="coverFnHi">330</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L47">_ZN8bayesnet10Classifier3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">64</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L55">_ZN8bayesnet10Classifier3fitERSt6vectorIS1_IiSaIiEESaIS3_EERS3_RKS1_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISD_EERKSD_RSt3mapISD_S3_St4lessISD_ESaISt4pairISI_S3_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">60</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L12">_ZN8bayesnet10Classifier5buildERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_RSt3mapIS7_S1_IiSaIiEESt4lessIS7_ESaISt4pairISC_SG_EEERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">644</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L137">_ZN8bayesnet10Classifier5scoreERN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L142">_ZN8bayesnet10Classifier5scoreERSt6vectorIS1_IiSaIiEESaIS3_EERS3_</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L94">_ZN8bayesnet10Classifier7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">850</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L101">_ZN8bayesnet10Classifier7predictERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L153">_ZN8bayesnet10Classifier8addNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">560</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L10">_ZN8bayesnet10ClassifierC2ENS_7NetworkE</a></td>
|
||||
|
||||
<td class="coverFnHi">886</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L166">_ZNK8bayesnet10Classifier16getNumberOfEdgesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L161">_ZNK8bayesnet10Classifier16getNumberOfNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L174">_ZNK8bayesnet10Classifier17getClassNumStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">170</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L170">_ZNK8bayesnet10Classifier17getNumberOfStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L149">_ZNK8bayesnet10Classifier4showB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.cc.gcov.html#L182">_ZNK8bayesnet10Classifier8dump_cptB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
270
html/BayesNet/bayesnet/classifiers/Classifier.cc.gcov.html
Normal file
270
html/BayesNet/bayesnet/classifiers/Classifier.cc.gcov.html
Normal file
@ -0,0 +1,270 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.cc<span style="font-size: 80%;"> (source / <a href="Classifier.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
<td class="headerCovTableEntry">126</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include <sstream></span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "Classifier.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : </span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : namespace bayesnet {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC tlaBgGNC"> 886 : Classifier::Classifier(Network model) : model(model), m(0), n(0), metrics(Metrics()), fitted(false) {}</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : const std::string CLASSIFIER_NOT_FITTED = "Classifier has not been fitted";</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 644 : 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)</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : {</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 644 : this->features = features;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 644 : this->className = className;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 644 : this->states = states;</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 644 : m = dataset.size(1);</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 644 : n = features.size();</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 644 : checkFitParameters();</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 628 : auto n_classes = states.at(className).size();</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 628 : metrics = Metrics(dataset, features, className, n_classes);</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 628 : model.initialize();</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 628 : buildModel(weights);</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 628 : trainModel(weights);</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 620 : fitted = true;</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 620 : return *this;</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : }</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 162 : void Classifier::buildDataset(torch::Tensor& ytmp)</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : {</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> : try {</span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 162 : auto yresized = torch::transpose(ytmp.view({ ytmp.size(0), 1 }), 0, 1);</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 502 : dataset = torch::cat({ dataset, yresized }, 0);</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 162 : }</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 8 : catch (const std::exception& e) {</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 8 : std::stringstream oss;</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 8 : oss << "* Error in X and y dimensions *\n";</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 8 : oss << "X dimensions: " << dataset.sizes() << "\n";</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 8 : oss << "y dimensions: " << ytmp.sizes();</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 8 : throw std::runtime_error(oss.str());</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> <span class="tlaGNC"> 16 : }</span></span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 324 : }</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 560 : void Classifier::trainModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : {</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> <span class="tlaGNC"> 560 : model.fit(dataset, weights, features, className, states);</span></span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> <span class="tlaGNC"> 560 : }</span></span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : // X is nxm where n is the number of features and m the number of samples</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> <span class="tlaGNC"> 64 : 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)</span></span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : {</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 64 : dataset = X;</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 64 : buildDataset(y);</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> <span class="tlaGNC"> 60 : const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);</span></span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> <span class="tlaGNC"> 104 : return build(features, className, states, weights);</span></span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> <span class="tlaGNC"> 60 : }</span></span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : // X is nxm where n is the number of features and m the number of samples</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> <span class="tlaGNC"> 60 : 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)</span></span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> : {</span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 60 : dataset = torch::zeros({ static_cast<int>(X.size()), static_cast<int>(X[0].size()) }, torch::kInt32);</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> <span class="tlaGNC"> 418 : for (int i = 0; i < X.size(); ++i) {</span></span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 1432 : dataset.index_put_({ i, "..." }, torch::tensor(X[i], torch::kInt32));</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> : }</span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 60 : auto ytmp = torch::tensor(y, torch::kInt32);</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> <span class="tlaGNC"> 60 : buildDataset(ytmp);</span></span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 56 : const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> <span class="tlaGNC"> 104 : return build(features, className, states, weights);</span></span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> <span class="tlaGNC"> 426 : }</span></span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 198 : Classifier& Classifier::fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states)</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> : {</span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> <span class="tlaGNC"> 198 : this->dataset = dataset;</span></span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> <span class="tlaGNC"> 198 : const torch::Tensor weights = torch::full({ dataset.size(1) }, 1.0 / dataset.size(1), torch::kDouble);</span></span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 396 : return build(features, className, states, weights);</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> <span class="tlaGNC"> 198 : }</span></span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> <span class="tlaGNC"> 330 : 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)</span></span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> : {</span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 330 : this->dataset = dataset;</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> <span class="tlaGNC"> 330 : return build(features, className, states, weights);</span></span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> : }</span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 644 : void Classifier::checkFitParameters()</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> : {</span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> <span class="tlaGNC"> 644 : if (torch::is_floating_point(dataset)) {</span></span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("dataset (X, y) must be of type Integer");</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> : }</span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> <span class="tlaGNC"> 640 : if (dataset.size(0) - 1 != features.size()) {</span></span>
|
||||
<span id="L85"><span class="lineNum"> 85</span> <span class="tlaGNC"> 4 : 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");</span></span>
|
||||
<span id="L86"><span class="lineNum"> 86</span> : }</span>
|
||||
<span id="L87"><span class="lineNum"> 87</span> <span class="tlaGNC"> 636 : if (states.find(className) == states.end()) {</span></span>
|
||||
<span id="L88"><span class="lineNum"> 88</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("class name not found in states");</span></span>
|
||||
<span id="L89"><span class="lineNum"> 89</span> : }</span>
|
||||
<span id="L90"><span class="lineNum"> 90</span> <span class="tlaGNC"> 14208 : for (auto feature : features) {</span></span>
|
||||
<span id="L91"><span class="lineNum"> 91</span> <span class="tlaGNC"> 13580 : if (states.find(feature) == states.end()) {</span></span>
|
||||
<span id="L92"><span class="lineNum"> 92</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("feature [" + feature + "] not found in states");</span></span>
|
||||
<span id="L93"><span class="lineNum"> 93</span> : }</span>
|
||||
<span id="L94"><span class="lineNum"> 94</span> <span class="tlaGNC"> 13580 : }</span></span>
|
||||
<span id="L95"><span class="lineNum"> 95</span> <span class="tlaGNC"> 628 : }</span></span>
|
||||
<span id="L96"><span class="lineNum"> 96</span> <span class="tlaGNC"> 850 : torch::Tensor Classifier::predict(torch::Tensor& X)</span></span>
|
||||
<span id="L97"><span class="lineNum"> 97</span> : {</span>
|
||||
<span id="L98"><span class="lineNum"> 98</span> <span class="tlaGNC"> 850 : if (!fitted) {</span></span>
|
||||
<span id="L99"><span class="lineNum"> 99</span> <span class="tlaGNC"> 8 : throw std::logic_error(CLASSIFIER_NOT_FITTED);</span></span>
|
||||
<span id="L100"><span class="lineNum"> 100</span> : }</span>
|
||||
<span id="L101"><span class="lineNum"> 101</span> <span class="tlaGNC"> 842 : return model.predict(X);</span></span>
|
||||
<span id="L102"><span class="lineNum"> 102</span> : }</span>
|
||||
<span id="L103"><span class="lineNum"> 103</span> <span class="tlaGNC"> 8 : std::vector<int> Classifier::predict(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L104"><span class="lineNum"> 104</span> : {</span>
|
||||
<span id="L105"><span class="lineNum"> 105</span> <span class="tlaGNC"> 8 : if (!fitted) {</span></span>
|
||||
<span id="L106"><span class="lineNum"> 106</span> <span class="tlaGNC"> 4 : throw std::logic_error(CLASSIFIER_NOT_FITTED);</span></span>
|
||||
<span id="L107"><span class="lineNum"> 107</span> : }</span>
|
||||
<span id="L108"><span class="lineNum"> 108</span> <span class="tlaGNC"> 4 : auto m_ = X[0].size();</span></span>
|
||||
<span id="L109"><span class="lineNum"> 109</span> <span class="tlaGNC"> 4 : auto n_ = X.size();</span></span>
|
||||
<span id="L110"><span class="lineNum"> 110</span> <span class="tlaGNC"> 4 : std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));</span></span>
|
||||
<span id="L111"><span class="lineNum"> 111</span> <span class="tlaGNC"> 20 : for (auto i = 0; i < n_; i++) {</span></span>
|
||||
<span id="L112"><span class="lineNum"> 112</span> <span class="tlaGNC"> 32 : Xd[i] = std::vector<int>(X[i].begin(), X[i].end());</span></span>
|
||||
<span id="L113"><span class="lineNum"> 113</span> : }</span>
|
||||
<span id="L114"><span class="lineNum"> 114</span> <span class="tlaGNC"> 4 : auto yp = model.predict(Xd);</span></span>
|
||||
<span id="L115"><span class="lineNum"> 115</span> <span class="tlaGNC"> 8 : return yp;</span></span>
|
||||
<span id="L116"><span class="lineNum"> 116</span> <span class="tlaGNC"> 4 : }</span></span>
|
||||
<span id="L117"><span class="lineNum"> 117</span> <span class="tlaGNC"> 742 : torch::Tensor Classifier::predict_proba(torch::Tensor& X)</span></span>
|
||||
<span id="L118"><span class="lineNum"> 118</span> : {</span>
|
||||
<span id="L119"><span class="lineNum"> 119</span> <span class="tlaGNC"> 742 : if (!fitted) {</span></span>
|
||||
<span id="L120"><span class="lineNum"> 120</span> <span class="tlaGNC"> 4 : throw std::logic_error(CLASSIFIER_NOT_FITTED);</span></span>
|
||||
<span id="L121"><span class="lineNum"> 121</span> : }</span>
|
||||
<span id="L122"><span class="lineNum"> 122</span> <span class="tlaGNC"> 738 : return model.predict_proba(X);</span></span>
|
||||
<span id="L123"><span class="lineNum"> 123</span> : }</span>
|
||||
<span id="L124"><span class="lineNum"> 124</span> <span class="tlaGNC"> 130 : std::vector<std::vector<double>> Classifier::predict_proba(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L125"><span class="lineNum"> 125</span> : {</span>
|
||||
<span id="L126"><span class="lineNum"> 126</span> <span class="tlaGNC"> 130 : if (!fitted) {</span></span>
|
||||
<span id="L127"><span class="lineNum"> 127</span> <span class="tlaGNC"> 4 : throw std::logic_error(CLASSIFIER_NOT_FITTED);</span></span>
|
||||
<span id="L128"><span class="lineNum"> 128</span> : }</span>
|
||||
<span id="L129"><span class="lineNum"> 129</span> <span class="tlaGNC"> 126 : auto m_ = X[0].size();</span></span>
|
||||
<span id="L130"><span class="lineNum"> 130</span> <span class="tlaGNC"> 126 : auto n_ = X.size();</span></span>
|
||||
<span id="L131"><span class="lineNum"> 131</span> <span class="tlaGNC"> 126 : std::vector<std::vector<int>> Xd(n_, std::vector<int>(m_, 0));</span></span>
|
||||
<span id="L132"><span class="lineNum"> 132</span> : // Convert to nxm vector</span>
|
||||
<span id="L133"><span class="lineNum"> 133</span> <span class="tlaGNC"> 1080 : for (auto i = 0; i < n_; i++) {</span></span>
|
||||
<span id="L134"><span class="lineNum"> 134</span> <span class="tlaGNC"> 1908 : Xd[i] = std::vector<int>(X[i].begin(), X[i].end());</span></span>
|
||||
<span id="L135"><span class="lineNum"> 135</span> : }</span>
|
||||
<span id="L136"><span class="lineNum"> 136</span> <span class="tlaGNC"> 126 : auto yp = model.predict_proba(Xd);</span></span>
|
||||
<span id="L137"><span class="lineNum"> 137</span> <span class="tlaGNC"> 252 : return yp;</span></span>
|
||||
<span id="L138"><span class="lineNum"> 138</span> <span class="tlaGNC"> 126 : }</span></span>
|
||||
<span id="L139"><span class="lineNum"> 139</span> <span class="tlaGNC"> 56 : float Classifier::score(torch::Tensor& X, torch::Tensor& y)</span></span>
|
||||
<span id="L140"><span class="lineNum"> 140</span> : {</span>
|
||||
<span id="L141"><span class="lineNum"> 141</span> <span class="tlaGNC"> 56 : torch::Tensor y_pred = predict(X);</span></span>
|
||||
<span id="L142"><span class="lineNum"> 142</span> <span class="tlaGNC"> 104 : return (y_pred == y).sum().item<float>() / y.size(0);</span></span>
|
||||
<span id="L143"><span class="lineNum"> 143</span> <span class="tlaGNC"> 52 : }</span></span>
|
||||
<span id="L144"><span class="lineNum"> 144</span> <span class="tlaGNC"> 8 : float Classifier::score(std::vector<std::vector<int>>& X, std::vector<int>& y)</span></span>
|
||||
<span id="L145"><span class="lineNum"> 145</span> : {</span>
|
||||
<span id="L146"><span class="lineNum"> 146</span> <span class="tlaGNC"> 8 : if (!fitted) {</span></span>
|
||||
<span id="L147"><span class="lineNum"> 147</span> <span class="tlaGNC"> 4 : throw std::logic_error(CLASSIFIER_NOT_FITTED);</span></span>
|
||||
<span id="L148"><span class="lineNum"> 148</span> : }</span>
|
||||
<span id="L149"><span class="lineNum"> 149</span> <span class="tlaGNC"> 4 : return model.score(X, y);</span></span>
|
||||
<span id="L150"><span class="lineNum"> 150</span> : }</span>
|
||||
<span id="L151"><span class="lineNum"> 151</span> <span class="tlaGNC"> 12 : std::vector<std::string> Classifier::show() const</span></span>
|
||||
<span id="L152"><span class="lineNum"> 152</span> : {</span>
|
||||
<span id="L153"><span class="lineNum"> 153</span> <span class="tlaGNC"> 12 : return model.show();</span></span>
|
||||
<span id="L154"><span class="lineNum"> 154</span> : }</span>
|
||||
<span id="L155"><span class="lineNum"> 155</span> <span class="tlaGNC"> 560 : void Classifier::addNodes()</span></span>
|
||||
<span id="L156"><span class="lineNum"> 156</span> : {</span>
|
||||
<span id="L157"><span class="lineNum"> 157</span> : // Add all nodes to the network</span>
|
||||
<span id="L158"><span class="lineNum"> 158</span> <span class="tlaGNC"> 13216 : for (const auto& feature : features) {</span></span>
|
||||
<span id="L159"><span class="lineNum"> 159</span> <span class="tlaGNC"> 12656 : model.addNode(feature);</span></span>
|
||||
<span id="L160"><span class="lineNum"> 160</span> : }</span>
|
||||
<span id="L161"><span class="lineNum"> 161</span> <span class="tlaGNC"> 560 : model.addNode(className);</span></span>
|
||||
<span id="L162"><span class="lineNum"> 162</span> <span class="tlaGNC"> 560 : }</span></span>
|
||||
<span id="L163"><span class="lineNum"> 163</span> <span class="tlaGNC"> 94 : int Classifier::getNumberOfNodes() const</span></span>
|
||||
<span id="L164"><span class="lineNum"> 164</span> : {</span>
|
||||
<span id="L165"><span class="lineNum"> 165</span> : // Features does not include class</span>
|
||||
<span id="L166"><span class="lineNum"> 166</span> <span class="tlaGNC"> 94 : return fitted ? model.getFeatures().size() : 0;</span></span>
|
||||
<span id="L167"><span class="lineNum"> 167</span> : }</span>
|
||||
<span id="L168"><span class="lineNum"> 168</span> <span class="tlaGNC"> 94 : int Classifier::getNumberOfEdges() const</span></span>
|
||||
<span id="L169"><span class="lineNum"> 169</span> : {</span>
|
||||
<span id="L170"><span class="lineNum"> 170</span> <span class="tlaGNC"> 94 : return fitted ? model.getNumEdges() : 0;</span></span>
|
||||
<span id="L171"><span class="lineNum"> 171</span> : }</span>
|
||||
<span id="L172"><span class="lineNum"> 172</span> <span class="tlaGNC"> 12 : int Classifier::getNumberOfStates() const</span></span>
|
||||
<span id="L173"><span class="lineNum"> 173</span> : {</span>
|
||||
<span id="L174"><span class="lineNum"> 174</span> <span class="tlaGNC"> 12 : return fitted ? model.getStates() : 0;</span></span>
|
||||
<span id="L175"><span class="lineNum"> 175</span> : }</span>
|
||||
<span id="L176"><span class="lineNum"> 176</span> <span class="tlaGNC"> 170 : int Classifier::getClassNumStates() const</span></span>
|
||||
<span id="L177"><span class="lineNum"> 177</span> : {</span>
|
||||
<span id="L178"><span class="lineNum"> 178</span> <span class="tlaGNC"> 170 : return fitted ? model.getClassNumStates() : 0;</span></span>
|
||||
<span id="L179"><span class="lineNum"> 179</span> : }</span>
|
||||
<span id="L180"><span class="lineNum"> 180</span> <span class="tlaGNC"> 2 : std::vector<std::string> Classifier::topological_order()</span></span>
|
||||
<span id="L181"><span class="lineNum"> 181</span> : {</span>
|
||||
<span id="L182"><span class="lineNum"> 182</span> <span class="tlaGNC"> 2 : return model.topological_sort();</span></span>
|
||||
<span id="L183"><span class="lineNum"> 183</span> : }</span>
|
||||
<span id="L184"><span class="lineNum"> 184</span> <span class="tlaGNC"> 2 : std::string Classifier::dump_cpt() const</span></span>
|
||||
<span id="L185"><span class="lineNum"> 185</span> : {</span>
|
||||
<span id="L186"><span class="lineNum"> 186</span> <span class="tlaGNC"> 2 : return model.dump_cpt();</span></span>
|
||||
<span id="L187"><span class="lineNum"> 187</span> : }</span>
|
||||
<span id="L188"><span class="lineNum"> 188</span> <span class="tlaGNC"> 42 : void Classifier::setHyperparameters(const nlohmann::json& hyperparameters)</span></span>
|
||||
<span id="L189"><span class="lineNum"> 189</span> : {</span>
|
||||
<span id="L190"><span class="lineNum"> 190</span> <span class="tlaGNC"> 42 : if (!hyperparameters.empty()) {</span></span>
|
||||
<span id="L191"><span class="lineNum"> 191</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("Invalid hyperparameters" + hyperparameters.dump());</span></span>
|
||||
<span id="L192"><span class="lineNum"> 192</span> : }</span>
|
||||
<span id="L193"><span class="lineNum"> 193</span> <span class="tlaGNC"> 38 : }</span></span>
|
||||
<span id="L194"><span class="lineNum"> 194</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
117
html/BayesNet/bayesnet/classifiers/Classifier.h.func-c.html
Normal file
117
html/BayesNet/bayesnet/classifiers/Classifier.h.func-c.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.h<span style="font-size: 80%;"> (<a href="Classifier.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">80.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="Classifier.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L31">_ZN8bayesnet10Classifier10getVersionB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">16</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L36">_ZNK8bayesnet10Classifier8getNotesB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L30">_ZNK8bayesnet10Classifier9getStatusEv</a></td>
|
||||
|
||||
<td class="coverFnHi">64</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
117
html/BayesNet/bayesnet/classifiers/Classifier.h.func.html
Normal file
117
html/BayesNet/bayesnet/classifiers/Classifier.h.func.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.h<span style="font-size: 80%;"> (<a href="Classifier.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">80.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="Classifier.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L31">_ZN8bayesnet10Classifier10getVersionB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">16</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Classifier.h.gcov.html#L16">_ZN8bayesnet10ClassifierD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">606</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L36">_ZNK8bayesnet10Classifier8getNotesB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Classifier.h.gcov.html#L30">_ZNK8bayesnet10Classifier9getStatusEv</a></td>
|
||||
|
||||
<td class="coverFnHi">64</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
141
html/BayesNet/bayesnet/classifiers/Classifier.h.gcov.html
Normal file
141
html/BayesNet/bayesnet/classifiers/Classifier.h.gcov.html
Normal file
@ -0,0 +1,141 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Classifier.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Classifier.h<span style="font-size: 80%;"> (source / <a href="Classifier.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">80.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef CLASSIFIER_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define CLASSIFIER_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "bayesnet/utils/BayesMetrics.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "bayesnet/network/Network.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : #include "bayesnet/BaseClassifier.h"</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : namespace bayesnet {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : class Classifier : public BaseClassifier {</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : public:</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : Classifier(Network model);</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC tlaBgGNC"> 606 : virtual ~Classifier() = default;</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : 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;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : 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;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : Classifier& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states) override;</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : 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;</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : void addNodes();</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : int getNumberOfNodes() const override;</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : int getNumberOfEdges() const override;</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : int getNumberOfStates() const override;</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : int getClassNumStates() const override;</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : torch::Tensor predict(torch::Tensor& X) override;</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : std::vector<int> predict(std::vector<std::vector<int>>& X) override;</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : torch::Tensor predict_proba(torch::Tensor& X) override;</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : std::vector<std::vector<double>> predict_proba(std::vector<std::vector<int>>& X) override;</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 64 : status_t getStatus() const override { return status; }</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 48 : std::string getVersion() override { return { project_version.begin(), project_version.end() }; };</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : float score(torch::Tensor& X, torch::Tensor& y) override;</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : float score(std::vector<std::vector<int>>& X, std::vector<int>& y) override;</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : std::vector<std::string> show() const override;</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : std::vector<std::string> topological_order() override;</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 38 : std::vector<std::string> getNotes() const override { return notes; }</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : std::string dump_cpt() const override;</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : void setHyperparameters(const nlohmann::json& hyperparameters) override; //For classifiers that don't have hyperparameters</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : protected:</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : bool fitted;</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> : unsigned int m, n; // m: number of samples, n: number of features</span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : Network model;</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : Metrics metrics;</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : std::vector<std::string> features;</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : std::string className;</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : std::map<std::string, std::vector<int>> states;</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : torch::Tensor dataset; // (n+1)xm tensor</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : status_t status = NORMAL;</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> : std::vector<std::string> notes; // Used to store messages occurred during the fit process</span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> : void checkFitParameters();</span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> : virtual void buildModel(const torch::Tensor& weights) = 0;</span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> : void trainModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> : void buildDataset(torch::Tensor& y);</span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : private:</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> : Classifier& build(const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const torch::Tensor& weights);</span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> : };</span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> : }</span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> : #endif</span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> : </span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> : </span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> : </span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> : </span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> : </span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/classifiers/KDB.cc.func-c.html
Normal file
110
html/BayesNet/bayesnet/classifiers/KDB.cc.func-c.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.cc<span style="font-size: 80%;"> (<a href="KDB.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">96.3 %</td>
|
||||
<td class="headerCovTableEntry">54</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="KDB.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L101">_ZNK8bayesnet3KDB5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L13">_ZN8bayesnet3KDB18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L26">_ZN8bayesnet3KDB10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">26</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L8">_ZN8bayesnet3KDBC2Eif</a></td>
|
||||
|
||||
<td class="coverFnHi">74</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L77">_ZN8bayesnet3KDB11add_m_edgesEiRSt6vectorIiSaIiEERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">172</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/classifiers/KDB.cc.func.html
Normal file
110
html/BayesNet/bayesnet/classifiers/KDB.cc.func.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.cc<span style="font-size: 80%;"> (<a href="KDB.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">96.3 %</td>
|
||||
<td class="headerCovTableEntry">54</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="KDB.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L26">_ZN8bayesnet3KDB10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">26</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L77">_ZN8bayesnet3KDB11add_m_edgesEiRSt6vectorIiSaIiEERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">172</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L13">_ZN8bayesnet3KDB18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L8">_ZN8bayesnet3KDBC2Eif</a></td>
|
||||
|
||||
<td class="coverFnHi">74</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.cc.gcov.html#L101">_ZNK8bayesnet3KDB5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
187
html/BayesNet/bayesnet/classifiers/KDB.cc.gcov.html
Normal file
187
html/BayesNet/bayesnet/classifiers/KDB.cc.gcov.html
Normal file
@ -0,0 +1,187 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.cc<span style="font-size: 80%;"> (source / <a href="KDB.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">96.3 %</td>
|
||||
<td class="headerCovTableEntry">54</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "KDB.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 74 : KDB::KDB(int k, float theta) : Classifier(Network()), k(k), theta(theta)</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 222 : validHyperparameters = { "k", "theta" };</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 222 : }</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 6 : void KDB::setHyperparameters(const nlohmann::json& hyperparameters_)</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : {</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 6 : auto hyperparameters = hyperparameters_;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 6 : if (hyperparameters.contains("k")) {</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 2 : k = hyperparameters["k"];</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 2 : hyperparameters.erase("k");</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : }</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 6 : if (hyperparameters.contains("theta")) {</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 2 : theta = hyperparameters["theta"];</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 2 : hyperparameters.erase("theta");</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : }</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 6 : Classifier::setHyperparameters(hyperparameters);</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 6 : }</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 26 : void KDB::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : {</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : /*</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : 1. For each feature Xi, compute mutual information, I(X;C),</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> : where C is the class.</span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : 2. Compute class conditional mutual information I(Xi;XjIC), f or each</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : pair of features Xi and Xj, where i#j.</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : 3. Let the used variable list, S, be empty.</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : 4. Let the DAG network being constructed, BN, begin with a single</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : class node, C.</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : 5. Repeat until S includes all domain features</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : 5.1. Select feature Xmax which is not in S and has the largest value</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : I(Xmax;C).</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : 5.2. Add a node to BN representing Xmax.</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : 5.3. Add an arc from C to Xmax in BN.</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> : 5.4. Add m = min(lSl,/c) arcs from m distinct features Xj in S with</span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : the highest value for I(Xmax;X,jC).</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : 5.5. Add Xmax to S.</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : Compute the conditional probabilility infered by the structure of BN by</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : using counts from DB, and output BN.</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : */</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : // 1. For each feature Xi, compute mutual information, I(X;C),</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : // where C is the class.</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 26 : addNodes();</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 78 : const torch::Tensor& y = dataset.index({ -1, "..." });</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> <span class="tlaGNC"> 26 : std::vector<double> mi;</span></span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> <span class="tlaGNC"> 198 : for (auto i = 0; i < features.size(); i++) {</span></span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> <span class="tlaGNC"> 516 : torch::Tensor firstFeature = dataset.index({ i, "..." });</span></span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> <span class="tlaGNC"> 172 : mi.push_back(metrics.mutualInformation(firstFeature, y, weights));</span></span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> <span class="tlaGNC"> 172 : }</span></span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> : // 2. Compute class conditional mutual information I(Xi;XjIC), f or each</span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 26 : auto conditionalEdgeWeights = metrics.conditionalEdge(weights);</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> : // 3. Let the used variable list, S, be empty.</span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 26 : std::vector<int> S;</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> : // 4. Let the DAG network being constructed, BN, begin with a single</span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> : // class node, C.</span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> : // 5. Repeat until S includes all domain features</span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> : // 5.1. Select feature Xmax which is not in S and has the largest value</span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> : // I(Xmax;C).</span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> <span class="tlaGNC"> 26 : auto order = argsort(mi);</span></span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 198 : for (auto idx : order) {</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> : // 5.2. Add a node to BN representing Xmax.</span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> : // 5.3. Add an arc from C to Xmax in BN.</span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> <span class="tlaGNC"> 172 : model.addEdge(className, features[idx]);</span></span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> : // 5.4. Add m = min(lSl,/c) arcs from m distinct features Xj in S with</span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> : // the highest value for I(Xmax;X,jC).</span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> <span class="tlaGNC"> 172 : add_m_edges(idx, S, conditionalEdgeWeights);</span></span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> : // 5.5. Add Xmax to S.</span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 172 : S.push_back(idx);</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> : }</span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> <span class="tlaGNC"> 224 : }</span></span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 172 : void KDB::add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights)</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> : {</span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> <span class="tlaGNC"> 172 : auto n_edges = std::min(k, static_cast<int>(S.size()));</span></span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC"> 172 : auto cond_w = clone(weights);</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> <span class="tlaGNC"> 172 : bool exit_cond = k == 0;</span></span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> <span class="tlaGNC"> 172 : int num = 0;</span></span>
|
||||
<span id="L85"><span class="lineNum"> 85</span> <span class="tlaGNC"> 502 : while (!exit_cond) {</span></span>
|
||||
<span id="L86"><span class="lineNum"> 86</span> <span class="tlaGNC"> 1320 : auto max_minfo = argmax(cond_w.index({ idx, "..." })).item<int>();</span></span>
|
||||
<span id="L87"><span class="lineNum"> 87</span> <span class="tlaGNC"> 330 : auto belongs = find(S.begin(), S.end(), max_minfo) != S.end();</span></span>
|
||||
<span id="L88"><span class="lineNum"> 88</span> <span class="tlaGNC"> 882 : if (belongs && cond_w.index({ idx, max_minfo }).item<float>() > theta) {</span></span>
|
||||
<span id="L89"><span class="lineNum"> 89</span> : try {</span>
|
||||
<span id="L90"><span class="lineNum"> 90</span> <span class="tlaGNC"> 160 : model.addEdge(features[max_minfo], features[idx]);</span></span>
|
||||
<span id="L91"><span class="lineNum"> 91</span> <span class="tlaGNC"> 160 : num++;</span></span>
|
||||
<span id="L92"><span class="lineNum"> 92</span> : }</span>
|
||||
<span id="L93"><span class="lineNum"> 93</span> <span class="tlaUNC tlaBgUNC"> 0 : catch (const std::invalid_argument& e) {</span></span>
|
||||
<span id="L94"><span class="lineNum"> 94</span> : // Loops are not allowed</span>
|
||||
<span id="L95"><span class="lineNum"> 95</span> <span class="tlaUNC"> 0 : }</span></span>
|
||||
<span id="L96"><span class="lineNum"> 96</span> : }</span>
|
||||
<span id="L97"><span class="lineNum"> 97</span> <span class="tlaGNC tlaBgGNC"> 1320 : cond_w.index_put_({ idx, max_minfo }, -1);</span></span>
|
||||
<span id="L98"><span class="lineNum"> 98</span> <span class="tlaGNC"> 990 : auto candidates_mask = cond_w.index({ idx, "..." }).gt(theta);</span></span>
|
||||
<span id="L99"><span class="lineNum"> 99</span> <span class="tlaGNC"> 330 : auto candidates = candidates_mask.nonzero();</span></span>
|
||||
<span id="L100"><span class="lineNum"> 100</span> <span class="tlaGNC"> 330 : exit_cond = num == n_edges || candidates.size(0) == 0;</span></span>
|
||||
<span id="L101"><span class="lineNum"> 101</span> <span class="tlaGNC"> 330 : }</span></span>
|
||||
<span id="L102"><span class="lineNum"> 102</span> <span class="tlaGNC"> 1346 : }</span></span>
|
||||
<span id="L103"><span class="lineNum"> 103</span> <span class="tlaGNC"> 4 : std::vector<std::string> KDB::graph(const std::string& title) const</span></span>
|
||||
<span id="L104"><span class="lineNum"> 104</span> : {</span>
|
||||
<span id="L105"><span class="lineNum"> 105</span> <span class="tlaGNC"> 4 : std::string header{ title };</span></span>
|
||||
<span id="L106"><span class="lineNum"> 106</span> <span class="tlaGNC"> 4 : if (title == "KDB") {</span></span>
|
||||
<span id="L107"><span class="lineNum"> 107</span> <span class="tlaGNC"> 4 : header += " (k=" + std::to_string(k) + ", theta=" + std::to_string(theta) + ")";</span></span>
|
||||
<span id="L108"><span class="lineNum"> 108</span> : }</span>
|
||||
<span id="L109"><span class="lineNum"> 109</span> <span class="tlaGNC"> 8 : return model.graph(header);</span></span>
|
||||
<span id="L110"><span class="lineNum"> 110</span> <span class="tlaGNC"> 4 : }</span></span>
|
||||
<span id="L111"><span class="lineNum"> 111</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/KDB.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/KDB.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.h<span style="font-size: 80%;"> (<a href="KDB.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="KDB.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">22</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/KDB.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/KDB.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.h<span style="font-size: 80%;"> (<a href="KDB.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="KDB.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">22</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDB.h.gcov.html#L20">_ZN8bayesnet3KDBD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/KDB.h.gcov.html
Normal file
103
html/BayesNet/bayesnet/classifiers/KDB.h.gcov.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDB.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDB.h<span style="font-size: 80%;"> (source / <a href="KDB.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef KDB_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define KDB_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "Classifier.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class KDB : public Classifier {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : private:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : int k;</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : float theta;</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : void add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights);</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : protected:</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : public:</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : explicit KDB(int k, float theta = 0.03);</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC tlaBgGNC"> 22 : virtual ~KDB() = default;</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : void setHyperparameters(const nlohmann::json& hyperparameters_) override;</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : std::vector<std::string> graph(const std::string& name = "KDB") const override;</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : };</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : }</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/KDBLd.cc.func-c.html
Normal file
103
html/BayesNet/bayesnet/classifiers/KDBLd.cc.func-c.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.cc<span style="font-size: 80%;"> (<a href="KDBLd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="KDBLd.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L29">_ZNK8bayesnet5KDBLd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L24">_ZN8bayesnet5KDBLd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L9">_ZN8bayesnet5KDBLd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L8">_ZN8bayesnet5KDBLdC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/KDBLd.cc.func.html
Normal file
103
html/BayesNet/bayesnet/classifiers/KDBLd.cc.func.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.cc<span style="font-size: 80%;"> (<a href="KDBLd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="KDBLd.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L9">_ZN8bayesnet5KDBLd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L24">_ZN8bayesnet5KDBLd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L8">_ZN8bayesnet5KDBLdC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.cc.gcov.html#L29">_ZNK8bayesnet5KDBLd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
111
html/BayesNet/bayesnet/classifiers/KDBLd.cc.gcov.html
Normal file
111
html/BayesNet/bayesnet/classifiers/KDBLd.cc.gcov.html
Normal file
@ -0,0 +1,111 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.cc<span style="font-size: 80%;"> (source / <a href="KDBLd.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "KDBLd.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 34 : KDBLd::KDBLd(int k) : KDB(k), Proposal(dataset, features, className) {}</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC"> 10 : 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_)</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 10 : checkInput(X_, y_);</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 10 : features = features_;</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 10 : className = className_;</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 10 : Xf = X_;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 10 : y = y_;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 10 : states = fit_local_discretization(y);</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : // We have discretized the input data</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : // 1st we need to fit the model to build the normal KDB structure, KDB::fit initializes the base Bayesian network</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 10 : KDB::fit(dataset, features, className, states);</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 10 : states = localDiscretizationProposal(states, model);</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 10 : return *this;</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : }</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 8 : torch::Tensor KDBLd::predict(torch::Tensor& X)</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : {</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 8 : auto Xt = prepareX(X);</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 16 : return KDB::predict(Xt);</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 8 : }</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 2 : std::vector<std::string> KDBLd::graph(const std::string& name) const</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> : {</span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 2 : return KDB::graph(name);</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : }</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/KDBLd.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/KDBLd.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.h<span style="font-size: 80%;"> (<a href="KDBLd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="KDBLd.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/KDBLd.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/KDBLd.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.h<span style="font-size: 80%;"> (<a href="KDBLd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="KDBLd.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="KDBLd.h.gcov.html#L15">_ZN8bayesnet5KDBLdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
100
html/BayesNet/bayesnet/classifiers/KDBLd.h.gcov.html
Normal file
100
html/BayesNet/bayesnet/classifiers/KDBLd.h.gcov.html
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/KDBLd.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - KDBLd.h<span style="font-size: 80%;"> (source / <a href="KDBLd.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef KDBLD_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define KDBLD_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "Proposal.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "KDB.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : </span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class KDBLd : public KDB, public Proposal {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : private:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : public:</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : explicit KDBLd(int k);</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC tlaBgGNC"> 10 : virtual ~KDBLd() = default;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : 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;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : std::vector<std::string> graph(const std::string& name = "KDB") const override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : torch::Tensor predict(torch::Tensor& X) override;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : static inline std::string version() { return "0.0.1"; };</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : };</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : }</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : #endif // !KDBLD_H</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
145
html/BayesNet/bayesnet/classifiers/Proposal.cc.func-c.html
Normal file
145
html/BayesNet/bayesnet/classifiers/Proposal.cc.func-c.html
Normal file
@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Proposal.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Proposal.cc<span style="font-size: 80%;"> (<a href="Proposal.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.7 %</td>
|
||||
<td class="headerCovTableEntry">86</td>
|
||||
<td class="headerCovTableEntry">84</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">88.9 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="Proposal.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L104">_ZN8bayesnet8Proposal8prepareXERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">100</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">100</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L25">_ZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkE</a></td>
|
||||
|
||||
<td class="coverFnHi">106</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L16">_ZN8bayesnet8Proposal10checkInputERKN2at6TensorES4_</a></td>
|
||||
|
||||
<td class="coverFnHi">114</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L77">_ZN8bayesnet8Proposal24fit_local_discretizationB5cxx11ERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">116</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L9">_ZN8bayesnet8ProposalC2ERN2at6TensorERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERSA_</a></td>
|
||||
|
||||
<td class="coverFnHi">212</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L47">_ZZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkEENKUlRKT_E0_clIS7_EEDaSO_</a></td>
|
||||
|
||||
<td class="coverFnHi">686</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L41">_ZZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkEENKUlRKT_E_clIPNS_4NodeEEEDaSO_</a></td>
|
||||
|
||||
<td class="coverFnHi">1348</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
145
html/BayesNet/bayesnet/classifiers/Proposal.cc.func.html
Normal file
145
html/BayesNet/bayesnet/classifiers/Proposal.cc.func.html
Normal file
@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Proposal.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Proposal.cc<span style="font-size: 80%;"> (<a href="Proposal.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.7 %</td>
|
||||
<td class="headerCovTableEntry">86</td>
|
||||
<td class="headerCovTableEntry">84</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">88.9 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="Proposal.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L16">_ZN8bayesnet8Proposal10checkInputERKN2at6TensorES4_</a></td>
|
||||
|
||||
<td class="coverFnHi">114</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L77">_ZN8bayesnet8Proposal24fit_local_discretizationB5cxx11ERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">116</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L25">_ZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkE</a></td>
|
||||
|
||||
<td class="coverFnHi">106</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L104">_ZN8bayesnet8Proposal8prepareXERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L9">_ZN8bayesnet8ProposalC2ERN2at6TensorERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERSA_</a></td>
|
||||
|
||||
<td class="coverFnHi">212</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">100</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Proposal.cc.gcov.html#L10">_ZN8bayesnet8ProposalD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">100</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L47">_ZZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkEENKUlRKT_E0_clIS7_EEDaSO_</a></td>
|
||||
|
||||
<td class="coverFnHi">686</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Proposal.cc.gcov.html#L41">_ZZN8bayesnet8Proposal27localDiscretizationProposalERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS7_ESaISt4pairIKS7_SA_EEERNS_7NetworkEENKUlRKT_E_clIPNS_4NodeEEEDaSO_</a></td>
|
||||
|
||||
<td class="coverFnHi">1348</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
192
html/BayesNet/bayesnet/classifiers/Proposal.cc.gcov.html
Normal file
192
html/BayesNet/bayesnet/classifiers/Proposal.cc.gcov.html
Normal file
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/Proposal.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - Proposal.cc<span style="font-size: 80%;"> (source / <a href="Proposal.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.7 %</td>
|
||||
<td class="headerCovTableEntry">86</td>
|
||||
<td class="headerCovTableEntry">84</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">88.9 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include <ArffFiles.h></span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include "Proposal.h"</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : </span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : namespace bayesnet {</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 212 : Proposal::Proposal(torch::Tensor& dataset_, std::vector<std::string>& features_, std::string& className_) : pDataset(dataset_), pFeatures(features_), pClassName(className_) {}</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 100 : Proposal::~Proposal()</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 948 : for (auto& [key, value] : discretizers) {</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 848 : delete value;</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : }</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 100 : }</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 114 : void Proposal::checkInput(const torch::Tensor& X, const torch::Tensor& y)</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : {</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 114 : if (!torch::is_floating_point(X)) {</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaUNC tlaBgUNC"> 0 : throw std::invalid_argument("X must be a floating point tensor");</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : }</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC tlaBgGNC"> 114 : if (torch::is_floating_point(y)) {</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaUNC tlaBgUNC"> 0 : throw std::invalid_argument("y must be an integer tensor");</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : }</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC tlaBgGNC"> 114 : }</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 106 : map<std::string, std::vector<int>> Proposal::localDiscretizationProposal(const map<std::string, std::vector<int>>& oldStates, Network& model)</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : {</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : // order of local discretization is important. no good 0, 1, 2...</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : // although we rediscretize features after the local discretization of every feature</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 106 : auto order = model.topological_sort();</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 106 : auto& nodes = model.getNodes();</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 106 : map<std::string, std::vector<int>> states = oldStates;</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 106 : std::vector<int> indicesToReDiscretize;</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 106 : bool upgrade = false; // Flag to check if we need to upgrade the model</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 888 : for (auto feature : order) {</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 782 : auto nodeParents = nodes[feature]->getParents();</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 782 : if (nodeParents.size() < 2) continue; // Only has class as parent</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 662 : upgrade = true;</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 662 : int index = find(pFeatures.begin(), pFeatures.end(), feature) - pFeatures.begin();</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 662 : indicesToReDiscretize.push_back(index); // We need to re-discretize this feature</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> <span class="tlaGNC"> 662 : std::vector<std::string> parents;</span></span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 2010 : transform(nodeParents.begin(), nodeParents.end(), back_inserter(parents), [](const auto& p) { return p->getName(); });</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : // Remove class as parent as it will be added later</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 662 : parents.erase(remove(parents.begin(), parents.end(), pClassName), parents.end());</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : // Get the indices of the parents</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> <span class="tlaGNC"> 662 : std::vector<int> indices;</span></span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> <span class="tlaGNC"> 662 : indices.push_back(-1); // Add class index</span></span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> <span class="tlaGNC"> 1348 : transform(parents.begin(), parents.end(), back_inserter(indices), [&](const auto& p) {return find(pFeatures.begin(), pFeatures.end(), p) - pFeatures.begin(); });</span></span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : // Now we fit the discretizer of the feature, conditioned on its parents and the class i.e. discretizer.fit(X[index], X[indices] + y)</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 662 : std::vector<std::string> yJoinParents(Xf.size(1));</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 2010 : for (auto idx : indices) {</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> <span class="tlaGNC"> 479320 : for (int i = 0; i < Xf.size(1); ++i) {</span></span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> <span class="tlaGNC"> 1433916 : yJoinParents[i] += to_string(pDataset.index({ idx, i }).item<int>());</span></span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> : }</span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : }</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> <span class="tlaGNC"> 662 : auto arff = ArffFiles();</span></span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> <span class="tlaGNC"> 662 : auto yxv = arff.factorize(yJoinParents);</span></span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 1324 : auto xvf_ptr = Xf.index({ index }).data_ptr<float>();</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> <span class="tlaGNC"> 662 : auto xvf = std::vector<mdlp::precision_t>(xvf_ptr, xvf_ptr + Xf.size(1));</span></span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 662 : discretizers[feature]->fit(xvf, yxv);</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> <span class="tlaGNC"> 902 : }</span></span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 106 : if (upgrade) {</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> : // Discretize again X (only the affected indices) with the new fitted discretizers</span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 768 : for (auto index : indicesToReDiscretize) {</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> <span class="tlaGNC"> 1324 : auto Xt_ptr = Xf.index({ index }).data_ptr<float>();</span></span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> <span class="tlaGNC"> 662 : auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));</span></span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 2648 : pDataset.index_put_({ index, "..." }, torch::tensor(discretizers[pFeatures[index]]->transform(Xt)));</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> <span class="tlaGNC"> 662 : auto xStates = std::vector<int>(discretizers[pFeatures[index]]->getCutPoints().size() + 1);</span></span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> <span class="tlaGNC"> 662 : iota(xStates.begin(), xStates.end(), 0);</span></span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> : //Update new states of the feature/node</span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 662 : states[pFeatures[index]] = xStates;</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> <span class="tlaGNC"> 662 : }</span></span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> <span class="tlaGNC"> 106 : const torch::Tensor weights = torch::full({ pDataset.size(1) }, 1.0 / pDataset.size(1), torch::kDouble);</span></span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> <span class="tlaGNC"> 106 : model.fit(pDataset, weights, pFeatures, pClassName, states);</span></span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 106 : }</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> <span class="tlaGNC"> 212 : return states;</span></span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> <span class="tlaGNC"> 480064 : }</span></span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 116 : map<std::string, std::vector<int>> Proposal::fit_local_discretization(const torch::Tensor& y)</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> : {</span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> : // Discretize the continuous input data and build pDataset (Classifier::dataset)</span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC"> 116 : int m = Xf.size(1);</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> <span class="tlaGNC"> 116 : int n = Xf.size(0);</span></span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> <span class="tlaGNC"> 116 : map<std::string, std::vector<int>> states;</span></span>
|
||||
<span id="L85"><span class="lineNum"> 85</span> <span class="tlaGNC"> 116 : pDataset = torch::zeros({ n + 1, m }, torch::kInt32);</span></span>
|
||||
<span id="L86"><span class="lineNum"> 86</span> <span class="tlaGNC"> 116 : auto yv = std::vector<int>(y.data_ptr<int>(), y.data_ptr<int>() + y.size(0));</span></span>
|
||||
<span id="L87"><span class="lineNum"> 87</span> : // discretize input data by feature(row)</span>
|
||||
<span id="L88"><span class="lineNum"> 88</span> <span class="tlaGNC"> 972 : for (auto i = 0; i < pFeatures.size(); ++i) {</span></span>
|
||||
<span id="L89"><span class="lineNum"> 89</span> <span class="tlaGNC"> 856 : auto* discretizer = new mdlp::CPPFImdlp();</span></span>
|
||||
<span id="L90"><span class="lineNum"> 90</span> <span class="tlaGNC"> 1712 : auto Xt_ptr = Xf.index({ i }).data_ptr<float>();</span></span>
|
||||
<span id="L91"><span class="lineNum"> 91</span> <span class="tlaGNC"> 856 : auto Xt = std::vector<float>(Xt_ptr, Xt_ptr + Xf.size(1));</span></span>
|
||||
<span id="L92"><span class="lineNum"> 92</span> <span class="tlaGNC"> 856 : discretizer->fit(Xt, yv);</span></span>
|
||||
<span id="L93"><span class="lineNum"> 93</span> <span class="tlaGNC"> 3424 : pDataset.index_put_({ i, "..." }, torch::tensor(discretizer->transform(Xt)));</span></span>
|
||||
<span id="L94"><span class="lineNum"> 94</span> <span class="tlaGNC"> 856 : auto xStates = std::vector<int>(discretizer->getCutPoints().size() + 1);</span></span>
|
||||
<span id="L95"><span class="lineNum"> 95</span> <span class="tlaGNC"> 856 : iota(xStates.begin(), xStates.end(), 0);</span></span>
|
||||
<span id="L96"><span class="lineNum"> 96</span> <span class="tlaGNC"> 856 : states[pFeatures[i]] = xStates;</span></span>
|
||||
<span id="L97"><span class="lineNum"> 97</span> <span class="tlaGNC"> 856 : discretizers[pFeatures[i]] = discretizer;</span></span>
|
||||
<span id="L98"><span class="lineNum"> 98</span> <span class="tlaGNC"> 856 : }</span></span>
|
||||
<span id="L99"><span class="lineNum"> 99</span> <span class="tlaGNC"> 116 : int n_classes = torch::max(y).item<int>() + 1;</span></span>
|
||||
<span id="L100"><span class="lineNum"> 100</span> <span class="tlaGNC"> 116 : auto yStates = std::vector<int>(n_classes);</span></span>
|
||||
<span id="L101"><span class="lineNum"> 101</span> <span class="tlaGNC"> 116 : iota(yStates.begin(), yStates.end(), 0);</span></span>
|
||||
<span id="L102"><span class="lineNum"> 102</span> <span class="tlaGNC"> 116 : states[pClassName] = yStates;</span></span>
|
||||
<span id="L103"><span class="lineNum"> 103</span> <span class="tlaGNC"> 348 : pDataset.index_put_({ n, "..." }, y);</span></span>
|
||||
<span id="L104"><span class="lineNum"> 104</span> <span class="tlaGNC"> 232 : return states;</span></span>
|
||||
<span id="L105"><span class="lineNum"> 105</span> <span class="tlaGNC"> 1944 : }</span></span>
|
||||
<span id="L106"><span class="lineNum"> 106</span> <span class="tlaGNC"> 84 : torch::Tensor Proposal::prepareX(torch::Tensor& X)</span></span>
|
||||
<span id="L107"><span class="lineNum"> 107</span> : {</span>
|
||||
<span id="L108"><span class="lineNum"> 108</span> <span class="tlaGNC"> 84 : auto Xtd = torch::zeros_like(X, torch::kInt32);</span></span>
|
||||
<span id="L109"><span class="lineNum"> 109</span> <span class="tlaGNC"> 688 : for (int i = 0; i < X.size(0); ++i) {</span></span>
|
||||
<span id="L110"><span class="lineNum"> 110</span> <span class="tlaGNC"> 604 : auto Xt = std::vector<float>(X[i].data_ptr<float>(), X[i].data_ptr<float>() + X.size(1));</span></span>
|
||||
<span id="L111"><span class="lineNum"> 111</span> <span class="tlaGNC"> 604 : auto Xd = discretizers[pFeatures[i]]->transform(Xt);</span></span>
|
||||
<span id="L112"><span class="lineNum"> 112</span> <span class="tlaGNC"> 1812 : Xtd.index_put_({ i }, torch::tensor(Xd, torch::kInt32));</span></span>
|
||||
<span id="L113"><span class="lineNum"> 113</span> <span class="tlaGNC"> 604 : }</span></span>
|
||||
<span id="L114"><span class="lineNum"> 114</span> <span class="tlaGNC"> 84 : return Xtd;</span></span>
|
||||
<span id="L115"><span class="lineNum"> 115</span> <span class="tlaGNC"> 604 : }</span></span>
|
||||
<span id="L116"><span class="lineNum"> 116</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODE.cc.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODE.cc.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.cc<span style="font-size: 80%;"> (<a href="SPODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="SPODE.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L24">_ZNK8bayesnet5SPODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L11">_ZN8bayesnet5SPODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">508</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L9">_ZN8bayesnet5SPODEC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">562</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODE.cc.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODE.cc.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.cc<span style="font-size: 80%;"> (<a href="SPODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="SPODE.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L11">_ZN8bayesnet5SPODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">508</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L9">_ZN8bayesnet5SPODEC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">562</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.cc.gcov.html#L24">_ZNK8bayesnet5SPODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
107
html/BayesNet/bayesnet/classifiers/SPODE.cc.gcov.html
Normal file
107
html/BayesNet/bayesnet/classifiers/SPODE.cc.gcov.html
Normal file
@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.cc<span style="font-size: 80%;"> (source / <a href="SPODE.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
<td class="headerCovTableEntry">10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "SPODE.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : </span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 562 : SPODE::SPODE(int root) : Classifier(Network()), root(root) {}</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : </span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 508 : void SPODE::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : // 0. Add all nodes to the model</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 508 : addNodes();</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : // 1. Add edges from the class node to all other nodes</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : // 2. Add edges from the root node to all other nodes</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 12840 : for (int i = 0; i < static_cast<int>(features.size()); ++i) {</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 12332 : model.addEdge(className, features[i]);</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 12332 : if (i != root) {</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 11824 : model.addEdge(features[root], features[i]);</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : }</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : }</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 508 : }</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 34 : std::vector<std::string> SPODE::graph(const std::string& name) const</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : {</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 34 : return model.graph(name);</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : }</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : </span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODE.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODE.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.h<span style="font-size: 80%;"> (<a href="SPODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="SPODE.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">918</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">418</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">500</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODE.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODE.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.h<span style="font-size: 80%;"> (<a href="SPODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="SPODE.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">918</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">418</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODE.h.gcov.html#L17">_ZN8bayesnet5SPODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">500</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
99
html/BayesNet/bayesnet/classifiers/SPODE.h.gcov.html
Normal file
99
html/BayesNet/bayesnet/classifiers/SPODE.h.gcov.html
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODE.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODE.h<span style="font-size: 80%;"> (source / <a href="SPODE.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef SPODE_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define SPODE_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "Classifier.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : </span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : namespace bayesnet {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : class SPODE : public Classifier {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : private:</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : int root;</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : protected:</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : public:</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : explicit SPODE(int root);</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC tlaBgGNC"> 918 : virtual ~SPODE() = default;</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : std::vector<std::string> graph(const std::string& name = "SPODE") const override;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : };</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : }</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
117
html/BayesNet/bayesnet/classifiers/SPODELd.cc.func-c.html
Normal file
117
html/BayesNet/bayesnet/classifiers/SPODELd.cc.func-c.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.cc<span style="font-size: 80%;"> (<a href="SPODELd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="SPODELd.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L17">_ZN8bayesnet7SPODELd3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L44">_ZNK8bayesnet7SPODELd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L39">_ZN8bayesnet7SPODELd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">68</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L9">_ZN8bayesnet7SPODELd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L27">_ZN8bayesnet7SPODELd9commonFitERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_RSt3mapIS7_S1_IiSaIiEESt4lessIS7_ESaISt4pairISC_SG_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">86</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L8">_ZN8bayesnet7SPODELdC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">110</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
117
html/BayesNet/bayesnet/classifiers/SPODELd.cc.func.html
Normal file
117
html/BayesNet/bayesnet/classifiers/SPODELd.cc.func.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.cc<span style="font-size: 80%;"> (<a href="SPODELd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="SPODELd.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L17">_ZN8bayesnet7SPODELd3fitERN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L9">_ZN8bayesnet7SPODELd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L39">_ZN8bayesnet7SPODELd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">68</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L27">_ZN8bayesnet7SPODELd9commonFitERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_RSt3mapIS7_S1_IiSaIiEESt4lessIS7_ESaISt4pairISC_SG_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">86</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L8">_ZN8bayesnet7SPODELdC2Ei</a></td>
|
||||
|
||||
<td class="coverFnHi">110</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.cc.gcov.html#L44">_ZNK8bayesnet7SPODELd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
126
html/BayesNet/bayesnet/classifiers/SPODELd.cc.gcov.html
Normal file
126
html/BayesNet/bayesnet/classifiers/SPODELd.cc.gcov.html
Normal file
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.cc<span style="font-size: 80%;"> (source / <a href="SPODELd.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
<td class="headerCovTableEntry">6</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "SPODELd.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 110 : SPODELd::SPODELd(int root) : SPODE(root), Proposal(dataset, features, className) {}</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC"> 84 : 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_)</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 84 : checkInput(X_, y_);</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 84 : Xf = X_;</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 84 : y = y_;</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 84 : return commonFit(features_, className_, states_);</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : }</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : </span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 4 : SPODELd& SPODELd::fit(torch::Tensor& dataset, const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : {</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 4 : if (!torch::is_floating_point(dataset)) {</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 2 : throw std::runtime_error("Dataset must be a floating point tensor");</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : }</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 8 : Xf = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." }).clone();</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 6 : y = dataset.index({ -1, "..." }).clone().to(torch::kInt32);</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 2 : return commonFit(features_, className_, states_);</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 6 : }</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : </span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 86 : SPODELd& SPODELd::commonFit(const std::vector<std::string>& features_, const std::string& className_, map<std::string, std::vector<int>>& states_)</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : {</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 86 : features = features_;</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 86 : className = className_;</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 86 : states = fit_local_discretization(y);</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : // We have discretized the input data</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : // 1st we need to fit the model to build the normal SPODE structure, SPODE::fit initializes the base Bayesian network</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 86 : SPODE::fit(dataset, features, className, states);</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 86 : states = localDiscretizationProposal(states, model);</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 86 : return *this;</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : }</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 68 : torch::Tensor SPODELd::predict(torch::Tensor& X)</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : {</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 68 : auto Xt = prepareX(X);</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 136 : return SPODE::predict(Xt);</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 68 : }</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> <span class="tlaGNC"> 18 : std::vector<std::string> SPODELd::graph(const std::string& name) const</span></span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : {</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> <span class="tlaGNC"> 18 : return SPODE::graph(name);</span></span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : }</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODELd.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODELd.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.h<span style="font-size: 80%;"> (<a href="SPODELd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="SPODELd.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">160</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">78</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">82</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/SPODELd.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/SPODELd.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.h<span style="font-size: 80%;"> (<a href="SPODELd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="SPODELd.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">160</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">78</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="SPODELd.h.gcov.html#L14">_ZN8bayesnet7SPODELdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">82</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
101
html/BayesNet/bayesnet/classifiers/SPODELd.h.gcov.html
Normal file
101
html/BayesNet/bayesnet/classifiers/SPODELd.h.gcov.html
Normal file
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/SPODELd.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - SPODELd.h<span style="font-size: 80%;"> (source / <a href="SPODELd.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef SPODELD_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define SPODELD_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "SPODE.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "Proposal.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : </span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class SPODELd : public SPODE, public Proposal {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : public:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : explicit SPODELd(int root);</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC tlaBgGNC"> 160 : virtual ~SPODELd() = default;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : 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;</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : SPODELd& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : SPODELd& commonFit(const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states);</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : std::vector<std::string> graph(const std::string& name = "SPODE") const override;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : torch::Tensor predict(torch::Tensor& X) override;</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : static inline std::string version() { return "0.0.1"; };</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : };</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : }</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : #endif // !SPODELD_H</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/TAN.cc.func-c.html
Normal file
103
html/BayesNet/bayesnet/classifiers/TAN.cc.func-c.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.cc<span style="font-size: 80%;"> (<a href="TAN.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="TAN.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L39">_ZNK8bayesnet3TAN5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L10">_ZN8bayesnet3TAN10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">26</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L8">_ZN8bayesnet3TANC2Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L23">_ZZN8bayesnet3TAN10buildModelERKN2at6TensorEENKUlRKT_RKT0_E_clISt4pairIifESE_EEDaS7_SA_</a></td>
|
||||
|
||||
<td class="coverFnHi">324</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/TAN.cc.func.html
Normal file
103
html/BayesNet/bayesnet/classifiers/TAN.cc.func.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.cc<span style="font-size: 80%;"> (<a href="TAN.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="TAN.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L10">_ZN8bayesnet3TAN10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">26</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L8">_ZN8bayesnet3TANC2Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">94</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L39">_ZNK8bayesnet3TAN5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.cc.gcov.html#L23">_ZZN8bayesnet3TAN10buildModelERKN2at6TensorEENKUlRKT_RKT0_E_clISt4pairIifESE_EEDaS7_SA_</a></td>
|
||||
|
||||
<td class="coverFnHi">324</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
121
html/BayesNet/bayesnet/classifiers/TAN.cc.gcov.html
Normal file
121
html/BayesNet/bayesnet/classifiers/TAN.cc.gcov.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.cc<span style="font-size: 80%;"> (source / <a href="TAN.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
<td class="headerCovTableEntry">23</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "TAN.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 94 : TAN::TAN() : Classifier(Network()) {}</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : </span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 26 : void TAN::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : // 0. Add all nodes to the model</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 26 : addNodes();</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : // 1. Compute mutual information between each feature and the class and set the root node</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : // as the highest mutual information with the class</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 26 : auto mi = std::vector <std::pair<int, float >>();</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 78 : torch::Tensor class_dataset = dataset.index({ -1, "..." });</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 178 : for (int i = 0; i < static_cast<int>(features.size()); ++i) {</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 456 : torch::Tensor feature_dataset = dataset.index({ i, "..." });</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 152 : auto mi_value = metrics.mutualInformation(class_dataset, feature_dataset, weights);</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 152 : mi.push_back({ i, mi_value });</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 152 : }</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 350 : sort(mi.begin(), mi.end(), [](const auto& left, const auto& right) {return left.second < right.second;});</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 26 : auto root = mi[mi.size() - 1].first;</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : // 2. Compute mutual information between each feature and the class</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 26 : auto weights_matrix = metrics.conditionalEdge(weights);</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : // 3. Compute the maximum spanning tree</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 26 : auto mst = metrics.maximumSpanningTree(features, weights_matrix, root);</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : // 4. Add edges from the maximum spanning tree to the model</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 152 : for (auto i = 0; i < mst.size(); ++i) {</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 126 : auto [from, to] = mst[i];</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 126 : model.addEdge(features[from], features[to]);</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : }</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : // 5. Add edges from the class to all features</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 178 : for (auto feature : features) {</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 152 : model.addEdge(className, feature);</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 152 : }</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 204 : }</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 4 : std::vector<std::string> TAN::graph(const std::string& title) const</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : {</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 4 : return model.graph(title);</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : }</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/TAN.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/TAN.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.h<span style="font-size: 80%;"> (<a href="TAN.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="TAN.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/TAN.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/TAN.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.h<span style="font-size: 80%;"> (<a href="TAN.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="TAN.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TAN.h.gcov.html#L15">_ZN8bayesnet3TAND2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
97
html/BayesNet/bayesnet/classifiers/TAN.h.gcov.html
Normal file
97
html/BayesNet/bayesnet/classifiers/TAN.h.gcov.html
Normal file
@ -0,0 +1,97 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TAN.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TAN.h<span style="font-size: 80%;"> (source / <a href="TAN.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef TAN_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define TAN_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "Classifier.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : namespace bayesnet {</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : class TAN : public Classifier {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : private:</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : protected:</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : public:</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : TAN();</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC tlaBgGNC"> 38 : virtual ~TAN() = default;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : std::vector<std::string> graph(const std::string& name = "TAN") const override;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : };</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : }</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/TANLd.cc.func-c.html
Normal file
103
html/BayesNet/bayesnet/classifiers/TANLd.cc.func-c.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.cc<span style="font-size: 80%;"> (<a href="TANLd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="TANLd.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L30">_ZNK8bayesnet5TANLd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L25">_ZN8bayesnet5TANLd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L9">_ZN8bayesnet5TANLd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L8">_ZN8bayesnet5TANLdC2Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/classifiers/TANLd.cc.func.html
Normal file
103
html/BayesNet/bayesnet/classifiers/TANLd.cc.func.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.cc<span style="font-size: 80%;"> (<a href="TANLd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="TANLd.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L9">_ZN8bayesnet5TANLd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L25">_ZN8bayesnet5TANLd7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">8</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L8">_ZN8bayesnet5TANLdC2Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.cc.gcov.html#L30">_ZNK8bayesnet5TANLd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
112
html/BayesNet/bayesnet/classifiers/TANLd.cc.gcov.html
Normal file
112
html/BayesNet/bayesnet/classifiers/TANLd.cc.gcov.html
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.cc<span style="font-size: 80%;"> (source / <a href="TANLd.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
<td class="headerCovTableEntry">17</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "TANLd.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 34 : TANLd::TANLd() : TAN(), Proposal(dataset, features, className) {}</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC"> 10 : 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_)</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 10 : checkInput(X_, y_);</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 10 : features = features_;</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 10 : className = className_;</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 10 : Xf = X_;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 10 : y = y_;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 10 : states = fit_local_discretization(y);</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : // We have discretized the input data</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : // 1st we need to fit the model to build the normal TAN structure, TAN::fit initializes the base Bayesian network</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 10 : TAN::fit(dataset, features, className, states);</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 10 : states = localDiscretizationProposal(states, model);</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 10 : return *this;</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : </span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : }</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 8 : torch::Tensor TANLd::predict(torch::Tensor& X)</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : {</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 8 : auto Xt = prepareX(X);</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 16 : return TAN::predict(Xt);</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 8 : }</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 2 : std::vector<std::string> TANLd::graph(const std::string& name) const</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : {</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 2 : return TAN::graph(name);</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : }</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/TANLd.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/classifiers/TANLd.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.h<span style="font-size: 80%;"> (<a href="TANLd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="TANLd.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/classifiers/TANLd.h.func.html
Normal file
96
html/BayesNet/bayesnet/classifiers/TANLd.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.h<span style="font-size: 80%;"> (<a href="TANLd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="TANLd.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="TANLd.h.gcov.html#L15">_ZN8bayesnet5TANLdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
100
html/BayesNet/bayesnet/classifiers/TANLd.h.gcov.html
Normal file
100
html/BayesNet/bayesnet/classifiers/TANLd.h.gcov.html
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers/TANLd.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/classifiers</a> - TANLd.h<span style="font-size: 80%;"> (source / <a href="TANLd.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef TANLD_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define TANLD_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "TAN.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "Proposal.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : </span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class TANLd : public TAN, public Proposal {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : private:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : public:</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : TANLd();</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC tlaBgGNC"> 10 : virtual ~TANLd() = default;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : 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;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : std::vector<std::string> graph(const std::string& name = "TAN") const override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : torch::Tensor predict(torch::Tensor& X) override;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : static inline std::string version() { return "0.0.1"; };</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : };</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : }</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : #endif // !TANLD_H</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
273
html/BayesNet/bayesnet/classifiers/index-sort-f.html
Normal file
273
html/BayesNet/bayesnet/classifiers/index-sort-f.html
Normal file
@ -0,0 +1,273 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/classifiers</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.9 %</td>
|
||||
<td class="headerCovTableEntry">369</td>
|
||||
<td class="headerCovTableEntry">365</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">97.4 %</td>
|
||||
<td class="headerCovTableEntry">76</td>
|
||||
<td class="headerCovTableEntry">74</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><a href="index.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><a href="index-sort-l.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.h.gcov.html">Classifier.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverPerMed">80.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Proposal.cc.gcov.html">Proposal.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="97.7%"><img src="../../../snow.png" width=2 height=10 alt="97.7%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">97.7 %</td>
|
||||
<td class="coverNumDflt">86</td>
|
||||
<td class="coverNumDflt">84</td>
|
||||
<td class="coverPerMed">88.9 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.h.gcov.html">KDB.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.h.gcov.html">KDBLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.h.gcov.html">SPODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.h.gcov.html">SPODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.h.gcov.html">TAN.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.h.gcov.html">TANLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.cc.gcov.html">SPODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.cc.gcov.html">KDBLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.cc.gcov.html">TAN.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.cc.gcov.html">TANLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.cc.gcov.html">KDB.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=96 height=10 alt="96.3%"><img src="../../../snow.png" width=4 height=10 alt="96.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">96.3 %</td>
|
||||
<td class="coverNumDflt">54</td>
|
||||
<td class="coverNumDflt">52</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.cc.gcov.html">SPODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.cc.gcov.html">Classifier.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
273
html/BayesNet/bayesnet/classifiers/index-sort-l.html
Normal file
273
html/BayesNet/bayesnet/classifiers/index-sort-l.html
Normal file
@ -0,0 +1,273 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/classifiers</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.9 %</td>
|
||||
<td class="headerCovTableEntry">369</td>
|
||||
<td class="headerCovTableEntry">365</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">97.4 %</td>
|
||||
<td class="headerCovTableEntry">76</td>
|
||||
<td class="headerCovTableEntry">74</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><a href="index.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><a href="index-sort-f.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.cc.gcov.html">KDB.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=96 height=10 alt="96.3%"><img src="../../../snow.png" width=4 height=10 alt="96.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">96.3 %</td>
|
||||
<td class="coverNumDflt">54</td>
|
||||
<td class="coverNumDflt">52</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Proposal.cc.gcov.html">Proposal.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="97.7%"><img src="../../../snow.png" width=2 height=10 alt="97.7%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">97.7 %</td>
|
||||
<td class="coverNumDflt">86</td>
|
||||
<td class="coverNumDflt">84</td>
|
||||
<td class="coverPerMed">88.9 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.h.gcov.html">KDB.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.h.gcov.html">KDBLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.h.gcov.html">SPODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.h.gcov.html">SPODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.h.gcov.html">TAN.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.h.gcov.html">TANLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.h.gcov.html">Classifier.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverPerMed">80.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.cc.gcov.html">SPODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.cc.gcov.html">KDBLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.cc.gcov.html">TANLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.cc.gcov.html">TAN.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.cc.gcov.html">SPODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.cc.gcov.html">Classifier.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
273
html/BayesNet/bayesnet/classifiers/index.html
Normal file
273
html/BayesNet/bayesnet/classifiers/index.html
Normal file
@ -0,0 +1,273 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/classifiers</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/classifiers</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.9 %</td>
|
||||
<td class="headerCovTableEntry">369</td>
|
||||
<td class="headerCovTableEntry">365</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">97.4 %</td>
|
||||
<td class="headerCovTableEntry">76</td>
|
||||
<td class="headerCovTableEntry">74</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><a href="index-sort-l.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><a href="index-sort-f.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.cc.gcov.html">Classifier.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverNumDflt">126</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Classifier.h.gcov.html">Classifier.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverPerMed">80.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.cc.gcov.html">KDB.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=96 height=10 alt="96.3%"><img src="../../../snow.png" width=4 height=10 alt="96.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">96.3 %</td>
|
||||
<td class="coverNumDflt">54</td>
|
||||
<td class="coverNumDflt">52</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDB.h.gcov.html">KDB.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.cc.gcov.html">KDBLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="KDBLd.h.gcov.html">KDBLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Proposal.cc.gcov.html">Proposal.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="97.7%"><img src="../../../snow.png" width=2 height=10 alt="97.7%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">97.7 %</td>
|
||||
<td class="coverNumDflt">86</td>
|
||||
<td class="coverNumDflt">84</td>
|
||||
<td class="coverPerMed">88.9 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.cc.gcov.html">SPODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverNumDflt">10</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODE.h.gcov.html">SPODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.cc.gcov.html">SPODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverNumDflt">26</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
<td class="coverNumDflt">6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="SPODELd.h.gcov.html">SPODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.cc.gcov.html">TAN.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverNumDflt">23</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TAN.h.gcov.html">TAN.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.cc.gcov.html">TANLd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverNumDflt">17</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="TANLd.h.gcov.html">TANLd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/ensembles/AODE.cc.func-c.html
Normal file
103
html/BayesNet/bayesnet/ensembles/AODE.cc.func-c.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.cc<span style="font-size: 80%;"> (<a href="AODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="AODE.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L13">_ZN8bayesnet4AODE18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L32">_ZNK8bayesnet4AODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L22">_ZN8bayesnet4AODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L8">_ZN8bayesnet4AODEC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/ensembles/AODE.cc.func.html
Normal file
103
html/BayesNet/bayesnet/ensembles/AODE.cc.func.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.cc<span style="font-size: 80%;"> (<a href="AODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="AODE.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L22">_ZN8bayesnet4AODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L13">_ZN8bayesnet4AODE18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L8">_ZN8bayesnet4AODEC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">38</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.cc.gcov.html#L32">_ZNK8bayesnet4AODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
114
html/BayesNet/bayesnet/ensembles/AODE.cc.gcov.html
Normal file
114
html/BayesNet/bayesnet/ensembles/AODE.cc.gcov.html
Normal file
@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.cc<span style="font-size: 80%;"> (source / <a href="AODE.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
<td class="headerCovTableEntry">20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "AODE.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 38 : AODE::AODE(bool predict_voting) : Ensemble(predict_voting)</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 76 : validHyperparameters = { "predict_voting" };</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 114 : }</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 2 : void AODE::setHyperparameters(const nlohmann::json& hyperparameters_)</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : {</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 2 : auto hyperparameters = hyperparameters_;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 2 : if (hyperparameters.contains("predict_voting")) {</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 2 : predict_voting = hyperparameters["predict_voting"];</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 2 : hyperparameters.erase("predict_voting");</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : }</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 2 : Classifier::setHyperparameters(hyperparameters);</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 2 : }</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 12 : void AODE::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : {</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 12 : models.clear();</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 12 : significanceModels.clear();</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 94 : for (int i = 0; i < features.size(); ++i) {</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 82 : models.push_back(std::make_unique<SPODE>(i));</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : }</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 12 : n_models = models.size();</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 12 : significanceModels = std::vector<double>(n_models, 1.0);</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 12 : }</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 2 : std::vector<std::string> AODE::graph(const std::string& title) const</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : {</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 2 : return Ensemble::graph(title);</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : }</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/AODE.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/ensembles/AODE.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.h<span style="font-size: 80%;"> (<a href="AODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="AODE.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/AODE.h.func.html
Normal file
96
html/BayesNet/bayesnet/ensembles/AODE.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.h<span style="font-size: 80%;"> (<a href="AODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="AODE.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODE.h.gcov.html#L13">_ZN8bayesnet4AODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
98
html/BayesNet/bayesnet/ensembles/AODE.h.gcov.html
Normal file
98
html/BayesNet/bayesnet/ensembles/AODE.h.gcov.html
Normal file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODE.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODE.h<span style="font-size: 80%;"> (source / <a href="AODE.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef AODE_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define AODE_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "bayesnet/classifiers/SPODE.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "Ensemble.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : namespace bayesnet {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : class AODE : public Ensemble {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : public:</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : AODE(bool predict_voting = false);</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC tlaBgGNC"> 14 : virtual ~AODE() {};</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : void setHyperparameters(const nlohmann::json& hyperparameters) override;</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : std::vector<std::string> graph(const std::string& title = "AODE") const override;</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : protected:</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : };</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : }</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/ensembles/AODELd.cc.func-c.html
Normal file
110
html/BayesNet/bayesnet/ensembles/AODELd.cc.func-c.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.cc<span style="font-size: 80%;"> (<a href="AODELd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="AODELd.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L41">_ZNK8bayesnet6AODELd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L26">_ZN8bayesnet6AODELd10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L35">_ZN8bayesnet6AODELd10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L11">_ZN8bayesnet6AODELd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L8">_ZN8bayesnet6AODELdC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/ensembles/AODELd.cc.func.html
Normal file
110
html/BayesNet/bayesnet/ensembles/AODELd.cc.func.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.cc<span style="font-size: 80%;"> (<a href="AODELd.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="AODELd.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L26">_ZN8bayesnet6AODELd10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L35">_ZN8bayesnet6AODELd10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L11">_ZN8bayesnet6AODELd3fitERN2at6TensorES3_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EERKSA_RSt3mapISA_S4_IiSaIiEESt4lessISA_ESaISt4pairISF_SJ_EEE</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L8">_ZN8bayesnet6AODELdC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">34</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.cc.gcov.html#L41">_ZNK8bayesnet6AODELd5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
123
html/BayesNet/bayesnet/ensembles/AODELd.cc.gcov.html
Normal file
123
html/BayesNet/bayesnet/ensembles/AODELd.cc.gcov.html
Normal file
@ -0,0 +1,123 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.cc<span style="font-size: 80%;"> (source / <a href="AODELd.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "AODELd.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> <span class="tlaGNC tlaBgGNC"> 34 : AODELd::AODELd(bool predict_voting) : Ensemble(predict_voting), Proposal(dataset, features, className)</span></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : {</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 34 : }</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 10 : 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_)</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 10 : checkInput(X_, y_);</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 10 : features = features_;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 10 : className = className_;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 10 : Xf = X_;</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 10 : y = y_;</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : // Fills std::vectors Xv & yv with the data from tensors X_ (discretized) & y</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 10 : states = fit_local_discretization(y);</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : // We have discretized the input data</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : // 1st we need to fit the model to build the normal TAN structure, TAN::fit initializes the base Bayesian network</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 10 : Ensemble::fit(dataset, features, className, states);</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 10 : return *this;</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : </span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : }</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 10 : void AODELd::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : {</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 10 : models.clear();</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 84 : for (int i = 0; i < features.size(); ++i) {</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 74 : models.push_back(std::make_unique<SPODELd>(i));</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : }</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 10 : n_models = models.size();</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 10 : significanceModels = std::vector<double>(n_models, 1.0);</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 10 : }</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 10 : void AODELd::trainModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : {</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 84 : for (const auto& model : models) {</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 74 : model->fit(Xf, y, features, className, states);</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : }</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> <span class="tlaGNC"> 10 : }</span></span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 2 : std::vector<std::string> AODELd::graph(const std::string& name) const</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : {</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 2 : return Ensemble::graph(name);</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : }</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/AODELd.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/ensembles/AODELd.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.h<span style="font-size: 80%;"> (<a href="AODELd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="AODELd.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/AODELd.h.func.html
Normal file
96
html/BayesNet/bayesnet/ensembles/AODELd.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.h<span style="font-size: 80%;"> (<a href="AODELd.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="AODELd.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="AODELd.h.gcov.html#L15">_ZN8bayesnet6AODELdD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
101
html/BayesNet/bayesnet/ensembles/AODELd.h.gcov.html
Normal file
101
html/BayesNet/bayesnet/ensembles/AODELd.h.gcov.html
Normal file
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/AODELd.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - AODELd.h<span style="font-size: 80%;"> (source / <a href="AODELd.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef AODELD_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define AODELD_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "bayesnet/classifiers/Proposal.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "bayesnet/classifiers/SPODELd.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "Ensemble.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : </span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : namespace bayesnet {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : class AODELd : public Ensemble, public Proposal {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : public:</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : AODELd(bool predict_voting = true);</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC tlaBgGNC"> 10 : virtual ~AODELd() = default;</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : 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;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : std::vector<std::string> graph(const std::string& name = "AODELd") const override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : protected:</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : void trainModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : };</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : }</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : #endif // !AODELD_H</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
138
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.func-c.html
Normal file
138
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.func-c.html
Normal file
@ -0,0 +1,138 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.cc<span style="font-size: 80%;"> (<a href="BoostAODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.3 %</td>
|
||||
<td class="headerCovTableEntry">237</td>
|
||||
<td class="headerCovTableEntry">233</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="BoostAODE.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L390">_ZNK8bayesnet9BoostAODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L137">_ZN8bayesnet9BoostAODE20update_weights_blockEiRN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L233">_ZN8bayesnet9BoostAODE16initializeModelsEv</a></td>
|
||||
|
||||
<td class="coverFnHi">16</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L57">_ZN8bayesnet9BoostAODE18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L26">_ZN8bayesnet9BoostAODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">46</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L266">_ZN8bayesnet9BoostAODE10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">46</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L18">_ZN8bayesnet9BoostAODEC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L110">_ZN8bayesnet14update_weightsERN2at6TensorES2_S2_</a></td>
|
||||
|
||||
<td class="coverFnHi">272</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L313">_ZZN8bayesnet9BoostAODE10trainModelERKN2at6TensorEENKUlT_E_clIiEEDaS5_</a></td>
|
||||
|
||||
<td class="coverFnHi">4850</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
138
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.func.html
Normal file
138
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.func.html
Normal file
@ -0,0 +1,138 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.cc<span style="font-size: 80%;"> (<a href="BoostAODE.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.3 %</td>
|
||||
<td class="headerCovTableEntry">237</td>
|
||||
<td class="headerCovTableEntry">233</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="BoostAODE.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L110">_ZN8bayesnet14update_weightsERN2at6TensorES2_S2_</a></td>
|
||||
|
||||
<td class="coverFnHi">272</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L26">_ZN8bayesnet9BoostAODE10buildModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">46</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L266">_ZN8bayesnet9BoostAODE10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">46</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L233">_ZN8bayesnet9BoostAODE16initializeModelsEv</a></td>
|
||||
|
||||
<td class="coverFnHi">16</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L57">_ZN8bayesnet9BoostAODE18setHyperparametersERKN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L137">_ZN8bayesnet9BoostAODE20update_weights_blockEiRN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L18">_ZN8bayesnet9BoostAODEC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">84</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L390">_ZNK8bayesnet9BoostAODE5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.cc.gcov.html#L313">_ZZN8bayesnet9BoostAODE10trainModelERKN2at6TensorEENKUlT_E_clIiEEDaS5_</a></td>
|
||||
|
||||
<td class="coverFnHi">4850</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
472
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.gcov.html
Normal file
472
html/BayesNet/bayesnet/ensembles/BoostAODE.cc.gcov.html
Normal file
@ -0,0 +1,472 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.cc<span style="font-size: 80%;"> (source / <a href="BoostAODE.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.3 %</td>
|
||||
<td class="headerCovTableEntry">237</td>
|
||||
<td class="headerCovTableEntry">233</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
<td class="headerCovTableEntry">9</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include <set></span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include <functional></span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <limits.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include <tuple></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include <folding.hpp></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : #include "bayesnet/feature_selection/CFS.h"</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : #include "bayesnet/feature_selection/FCBF.h"</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : #include "bayesnet/feature_selection/IWSS.h"</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : #include "BoostAODE.h"</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : #include "lib/log/loguru.cpp"</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : </span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : namespace bayesnet {</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : </span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC tlaBgGNC"> 84 : BoostAODE::BoostAODE(bool predict_voting) : Ensemble(predict_voting)</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : {</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 924 : validHyperparameters = {</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : "maxModels", "bisection", "order", "convergence", "convergence_best", "threshold",</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : "select_features", "maxTolerance", "predict_voting", "block_update"</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 924 : };</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : </span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 252 : }</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 46 : void BoostAODE::buildModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : {</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : // Models shall be built in trainModel</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 46 : models.clear();</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 46 : significanceModels.clear();</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 46 : n_models = 0;</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : // Prepare the validation dataset</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 138 : auto y_ = dataset.index({ -1, "..." });</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 46 : if (convergence) {</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : // Prepare train & validation sets from train data</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 38 : auto fold = folding::StratifiedKFold(5, y_, 271);</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 38 : auto [train, test] = fold.getFold(0);</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 38 : auto train_t = torch::tensor(train);</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 38 : auto test_t = torch::tensor(test);</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : // Get train and validation sets</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 190 : X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), train_t });</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 114 : y_train = dataset.index({ -1, train_t });</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 190 : X_test = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), test_t });</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> <span class="tlaGNC"> 114 : y_test = dataset.index({ -1, test_t });</span></span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> <span class="tlaGNC"> 38 : dataset = X_train;</span></span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> <span class="tlaGNC"> 38 : m = X_train.size(1);</span></span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> <span class="tlaGNC"> 38 : auto n_classes = states.at(className).size();</span></span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : // Build dataset with train data</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 38 : buildDataset(y_train);</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 38 : metrics = Metrics(dataset, features, className, n_classes);</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> <span class="tlaGNC"> 38 : } else {</span></span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> : // Use all data to train</span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> <span class="tlaGNC"> 32 : X_train = dataset.index({ torch::indexing::Slice(0, dataset.size(0) - 1), "..." });</span></span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> <span class="tlaGNC"> 8 : y_train = y_;</span></span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> : }</span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> <span class="tlaGNC"> 450 : }</span></span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 44 : void BoostAODE::setHyperparameters(const nlohmann::json& hyperparameters_)</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> : {</span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 44 : auto hyperparameters = hyperparameters_;</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> <span class="tlaGNC"> 44 : if (hyperparameters.contains("order")) {</span></span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 50 : std::vector<std::string> algos = { Orders.ASC, Orders.DESC, Orders.RAND };</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> <span class="tlaGNC"> 10 : order_algorithm = hyperparameters["order"];</span></span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 10 : if (std::find(algos.begin(), algos.end(), order_algorithm) == algos.end()) {</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> <span class="tlaGNC"> 2 : throw std::invalid_argument("Invalid order algorithm, valid values [" + Orders.ASC + ", " + Orders.DESC + ", " + Orders.RAND + "]");</span></span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> : }</span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 8 : hyperparameters.erase("order");</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> <span class="tlaGNC"> 10 : }</span></span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> <span class="tlaGNC"> 42 : if (hyperparameters.contains("convergence")) {</span></span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> <span class="tlaGNC"> 18 : convergence = hyperparameters["convergence"];</span></span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 18 : hyperparameters.erase("convergence");</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> : }</span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> <span class="tlaGNC"> 42 : if (hyperparameters.contains("convergence_best")) {</span></span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> <span class="tlaGNC"> 6 : convergence_best = hyperparameters["convergence_best"];</span></span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 6 : hyperparameters.erase("convergence_best");</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> : }</span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> <span class="tlaGNC"> 42 : if (hyperparameters.contains("bisection")) {</span></span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 16 : bisection = hyperparameters["bisection"];</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> <span class="tlaGNC"> 16 : hyperparameters.erase("bisection");</span></span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> : }</span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC"> 42 : if (hyperparameters.contains("threshold")) {</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> <span class="tlaGNC"> 12 : threshold = hyperparameters["threshold"];</span></span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> <span class="tlaGNC"> 12 : hyperparameters.erase("threshold");</span></span>
|
||||
<span id="L85"><span class="lineNum"> 85</span> : }</span>
|
||||
<span id="L86"><span class="lineNum"> 86</span> <span class="tlaGNC"> 42 : if (hyperparameters.contains("maxTolerance")) {</span></span>
|
||||
<span id="L87"><span class="lineNum"> 87</span> <span class="tlaGNC"> 22 : maxTolerance = hyperparameters["maxTolerance"];</span></span>
|
||||
<span id="L88"><span class="lineNum"> 88</span> <span class="tlaGNC"> 22 : if (maxTolerance < 1 || maxTolerance > 4)</span></span>
|
||||
<span id="L89"><span class="lineNum"> 89</span> <span class="tlaGNC"> 6 : throw std::invalid_argument("Invalid maxTolerance value, must be greater in [1, 4]");</span></span>
|
||||
<span id="L90"><span class="lineNum"> 90</span> <span class="tlaGNC"> 16 : hyperparameters.erase("maxTolerance");</span></span>
|
||||
<span id="L91"><span class="lineNum"> 91</span> : }</span>
|
||||
<span id="L92"><span class="lineNum"> 92</span> <span class="tlaGNC"> 36 : if (hyperparameters.contains("predict_voting")) {</span></span>
|
||||
<span id="L93"><span class="lineNum"> 93</span> <span class="tlaGNC"> 2 : predict_voting = hyperparameters["predict_voting"];</span></span>
|
||||
<span id="L94"><span class="lineNum"> 94</span> <span class="tlaGNC"> 2 : hyperparameters.erase("predict_voting");</span></span>
|
||||
<span id="L95"><span class="lineNum"> 95</span> : }</span>
|
||||
<span id="L96"><span class="lineNum"> 96</span> <span class="tlaGNC"> 36 : if (hyperparameters.contains("select_features")) {</span></span>
|
||||
<span id="L97"><span class="lineNum"> 97</span> <span class="tlaGNC"> 18 : auto selectedAlgorithm = hyperparameters["select_features"];</span></span>
|
||||
<span id="L98"><span class="lineNum"> 98</span> <span class="tlaGNC"> 90 : std::vector<std::string> algos = { SelectFeatures.IWSS, SelectFeatures.CFS, SelectFeatures.FCBF };</span></span>
|
||||
<span id="L99"><span class="lineNum"> 99</span> <span class="tlaGNC"> 18 : selectFeatures = true;</span></span>
|
||||
<span id="L100"><span class="lineNum"> 100</span> <span class="tlaGNC"> 18 : select_features_algorithm = selectedAlgorithm;</span></span>
|
||||
<span id="L101"><span class="lineNum"> 101</span> <span class="tlaGNC"> 18 : if (std::find(algos.begin(), algos.end(), selectedAlgorithm) == algos.end()) {</span></span>
|
||||
<span id="L102"><span class="lineNum"> 102</span> <span class="tlaGNC"> 2 : throw std::invalid_argument("Invalid selectFeatures value, valid values [" + SelectFeatures.IWSS + ", " + SelectFeatures.CFS + ", " + SelectFeatures.FCBF + "]");</span></span>
|
||||
<span id="L103"><span class="lineNum"> 103</span> : }</span>
|
||||
<span id="L104"><span class="lineNum"> 104</span> <span class="tlaGNC"> 16 : hyperparameters.erase("select_features");</span></span>
|
||||
<span id="L105"><span class="lineNum"> 105</span> <span class="tlaGNC"> 20 : }</span></span>
|
||||
<span id="L106"><span class="lineNum"> 106</span> <span class="tlaGNC"> 34 : if (hyperparameters.contains("block_update")) {</span></span>
|
||||
<span id="L107"><span class="lineNum"> 107</span> <span class="tlaGNC"> 4 : block_update = hyperparameters["block_update"];</span></span>
|
||||
<span id="L108"><span class="lineNum"> 108</span> <span class="tlaGNC"> 4 : hyperparameters.erase("block_update");</span></span>
|
||||
<span id="L109"><span class="lineNum"> 109</span> : }</span>
|
||||
<span id="L110"><span class="lineNum"> 110</span> <span class="tlaGNC"> 34 : Classifier::setHyperparameters(hyperparameters);</span></span>
|
||||
<span id="L111"><span class="lineNum"> 111</span> <span class="tlaGNC"> 72 : }</span></span>
|
||||
<span id="L112"><span class="lineNum"> 112</span> <span class="tlaGNC"> 272 : std::tuple<torch::Tensor&, double, bool> update_weights(torch::Tensor& ytrain, torch::Tensor& ypred, torch::Tensor& weights)</span></span>
|
||||
<span id="L113"><span class="lineNum"> 113</span> : {</span>
|
||||
<span id="L114"><span class="lineNum"> 114</span> <span class="tlaGNC"> 272 : bool terminate = false;</span></span>
|
||||
<span id="L115"><span class="lineNum"> 115</span> <span class="tlaGNC"> 272 : double alpha_t = 0;</span></span>
|
||||
<span id="L116"><span class="lineNum"> 116</span> <span class="tlaGNC"> 272 : auto mask_wrong = ypred != ytrain;</span></span>
|
||||
<span id="L117"><span class="lineNum"> 117</span> <span class="tlaGNC"> 272 : auto mask_right = ypred == ytrain;</span></span>
|
||||
<span id="L118"><span class="lineNum"> 118</span> <span class="tlaGNC"> 272 : auto masked_weights = weights * mask_wrong.to(weights.dtype());</span></span>
|
||||
<span id="L119"><span class="lineNum"> 119</span> <span class="tlaGNC"> 272 : double epsilon_t = masked_weights.sum().item<double>();</span></span>
|
||||
<span id="L120"><span class="lineNum"> 120</span> <span class="tlaGNC"> 272 : if (epsilon_t > 0.5) {</span></span>
|
||||
<span id="L121"><span class="lineNum"> 121</span> : // Inverse the weights policy (plot ln(wt))</span>
|
||||
<span id="L122"><span class="lineNum"> 122</span> : // "In each round of AdaBoost, there is a sanity check to ensure that the current base </span>
|
||||
<span id="L123"><span class="lineNum"> 123</span> : // learner is better than random guess" (Zhi-Hua Zhou, 2012)</span>
|
||||
<span id="L124"><span class="lineNum"> 124</span> <span class="tlaGNC"> 8 : terminate = true;</span></span>
|
||||
<span id="L125"><span class="lineNum"> 125</span> : } else {</span>
|
||||
<span id="L126"><span class="lineNum"> 126</span> <span class="tlaGNC"> 264 : double wt = (1 - epsilon_t) / epsilon_t;</span></span>
|
||||
<span id="L127"><span class="lineNum"> 127</span> <span class="tlaGNC"> 264 : alpha_t = epsilon_t == 0 ? 1 : 0.5 * log(wt);</span></span>
|
||||
<span id="L128"><span class="lineNum"> 128</span> : // Step 3.2: Update weights for next classifier</span>
|
||||
<span id="L129"><span class="lineNum"> 129</span> : // Step 3.2.1: Update weights of wrong samples</span>
|
||||
<span id="L130"><span class="lineNum"> 130</span> <span class="tlaGNC"> 264 : weights += mask_wrong.to(weights.dtype()) * exp(alpha_t) * weights;</span></span>
|
||||
<span id="L131"><span class="lineNum"> 131</span> : // Step 3.2.2: Update weights of right samples</span>
|
||||
<span id="L132"><span class="lineNum"> 132</span> <span class="tlaGNC"> 264 : weights += mask_right.to(weights.dtype()) * exp(-alpha_t) * weights;</span></span>
|
||||
<span id="L133"><span class="lineNum"> 133</span> : // Step 3.3: Normalise the weights</span>
|
||||
<span id="L134"><span class="lineNum"> 134</span> <span class="tlaGNC"> 264 : double totalWeights = torch::sum(weights).item<double>();</span></span>
|
||||
<span id="L135"><span class="lineNum"> 135</span> <span class="tlaGNC"> 264 : weights = weights / totalWeights;</span></span>
|
||||
<span id="L136"><span class="lineNum"> 136</span> : }</span>
|
||||
<span id="L137"><span class="lineNum"> 137</span> <span class="tlaGNC"> 544 : return { weights, alpha_t, terminate };</span></span>
|
||||
<span id="L138"><span class="lineNum"> 138</span> <span class="tlaGNC"> 272 : }</span></span>
|
||||
<span id="L139"><span class="lineNum"> 139</span> <span class="tlaGNC"> 14 : std::tuple<torch::Tensor&, double, bool> BoostAODE::update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights)</span></span>
|
||||
<span id="L140"><span class="lineNum"> 140</span> : {</span>
|
||||
<span id="L141"><span class="lineNum"> 141</span> : /* Update Block algorithm</span>
|
||||
<span id="L142"><span class="lineNum"> 142</span> : k = # of models in block</span>
|
||||
<span id="L143"><span class="lineNum"> 143</span> : n_models = # of models in ensemble to make predictions</span>
|
||||
<span id="L144"><span class="lineNum"> 144</span> : n_models_bak = # models saved</span>
|
||||
<span id="L145"><span class="lineNum"> 145</span> : models = vector of models to make predictions</span>
|
||||
<span id="L146"><span class="lineNum"> 146</span> : models_bak = models not used to make predictions</span>
|
||||
<span id="L147"><span class="lineNum"> 147</span> : significances_bak = backup of significances vector</span>
|
||||
<span id="L148"><span class="lineNum"> 148</span> : </span>
|
||||
<span id="L149"><span class="lineNum"> 149</span> : Case list</span>
|
||||
<span id="L150"><span class="lineNum"> 150</span> : A) k = 1, n_models = 1 => n = 0 , n_models = n + k</span>
|
||||
<span id="L151"><span class="lineNum"> 151</span> : B) k = 1, n_models = n + 1 => n_models = n + k</span>
|
||||
<span id="L152"><span class="lineNum"> 152</span> : C) k > 1, n_models = k + 1 => n= 1, n_models = n + k</span>
|
||||
<span id="L153"><span class="lineNum"> 153</span> : D) k > 1, n_models = k => n = 0, n_models = n + k</span>
|
||||
<span id="L154"><span class="lineNum"> 154</span> : E) k > 1, n_models = k + n => n_models = n + k</span>
|
||||
<span id="L155"><span class="lineNum"> 155</span> : </span>
|
||||
<span id="L156"><span class="lineNum"> 156</span> : A, D) n=0, k > 0, n_models == k</span>
|
||||
<span id="L157"><span class="lineNum"> 157</span> : 1. n_models_bak <- n_models</span>
|
||||
<span id="L158"><span class="lineNum"> 158</span> : 2. significances_bak <- significances</span>
|
||||
<span id="L159"><span class="lineNum"> 159</span> : 3. significances = vector(k, 1)</span>
|
||||
<span id="L160"><span class="lineNum"> 160</span> : 4. Don’t move any classifiers out of models</span>
|
||||
<span id="L161"><span class="lineNum"> 161</span> : 5. n_models <- k</span>
|
||||
<span id="L162"><span class="lineNum"> 162</span> : 6. Make prediction, compute alpha, update weights</span>
|
||||
<span id="L163"><span class="lineNum"> 163</span> : 7. Don’t restore any classifiers to models</span>
|
||||
<span id="L164"><span class="lineNum"> 164</span> : 8. significances <- significances_bak</span>
|
||||
<span id="L165"><span class="lineNum"> 165</span> : 9. Update last k significances</span>
|
||||
<span id="L166"><span class="lineNum"> 166</span> : 10. n_models <- n_models_bak</span>
|
||||
<span id="L167"><span class="lineNum"> 167</span> : </span>
|
||||
<span id="L168"><span class="lineNum"> 168</span> : B, C, E) n > 0, k > 0, n_models == n + k</span>
|
||||
<span id="L169"><span class="lineNum"> 169</span> : 1. n_models_bak <- n_models</span>
|
||||
<span id="L170"><span class="lineNum"> 170</span> : 2. significances_bak <- significances</span>
|
||||
<span id="L171"><span class="lineNum"> 171</span> : 3. significances = vector(k, 1)</span>
|
||||
<span id="L172"><span class="lineNum"> 172</span> : 4. Move first n classifiers to models_bak</span>
|
||||
<span id="L173"><span class="lineNum"> 173</span> : 5. n_models <- k</span>
|
||||
<span id="L174"><span class="lineNum"> 174</span> : 6. Make prediction, compute alpha, update weights</span>
|
||||
<span id="L175"><span class="lineNum"> 175</span> : 7. Insert classifiers in models_bak to be the first n models</span>
|
||||
<span id="L176"><span class="lineNum"> 176</span> : 8. significances <- significances_bak</span>
|
||||
<span id="L177"><span class="lineNum"> 177</span> : 9. Update last k significances</span>
|
||||
<span id="L178"><span class="lineNum"> 178</span> : 10. n_models <- n_models_bak</span>
|
||||
<span id="L179"><span class="lineNum"> 179</span> : */</span>
|
||||
<span id="L180"><span class="lineNum"> 180</span> : //</span>
|
||||
<span id="L181"><span class="lineNum"> 181</span> : // Make predict with only the last k models</span>
|
||||
<span id="L182"><span class="lineNum"> 182</span> : //</span>
|
||||
<span id="L183"><span class="lineNum"> 183</span> <span class="tlaGNC"> 14 : std::unique_ptr<Classifier> model;</span></span>
|
||||
<span id="L184"><span class="lineNum"> 184</span> <span class="tlaGNC"> 14 : std::vector<std::unique_ptr<Classifier>> models_bak;</span></span>
|
||||
<span id="L185"><span class="lineNum"> 185</span> : // 1. n_models_bak <- n_models 2. significances_bak <- significances</span>
|
||||
<span id="L186"><span class="lineNum"> 186</span> <span class="tlaGNC"> 14 : auto significance_bak = significanceModels;</span></span>
|
||||
<span id="L187"><span class="lineNum"> 187</span> <span class="tlaGNC"> 14 : auto n_models_bak = n_models;</span></span>
|
||||
<span id="L188"><span class="lineNum"> 188</span> : // 3. significances = vector(k, 1)</span>
|
||||
<span id="L189"><span class="lineNum"> 189</span> <span class="tlaGNC"> 14 : significanceModels = std::vector<double>(k, 1.0);</span></span>
|
||||
<span id="L190"><span class="lineNum"> 190</span> : // 4. Move first n classifiers to models_bak</span>
|
||||
<span id="L191"><span class="lineNum"> 191</span> : // backup the first n_models - k models (if n_models == k, don't backup any)</span>
|
||||
<span id="L192"><span class="lineNum"> 192</span> <span class="tlaGNC"> 74 : for (int i = 0; i < n_models - k; ++i) {</span></span>
|
||||
<span id="L193"><span class="lineNum"> 193</span> <span class="tlaGNC"> 60 : model = std::move(models[0]);</span></span>
|
||||
<span id="L194"><span class="lineNum"> 194</span> <span class="tlaGNC"> 60 : models.erase(models.begin());</span></span>
|
||||
<span id="L195"><span class="lineNum"> 195</span> <span class="tlaGNC"> 60 : models_bak.push_back(std::move(model));</span></span>
|
||||
<span id="L196"><span class="lineNum"> 196</span> : }</span>
|
||||
<span id="L197"><span class="lineNum"> 197</span> <span class="tlaGNC"> 14 : assert(models.size() == k);</span></span>
|
||||
<span id="L198"><span class="lineNum"> 198</span> : // 5. n_models <- k</span>
|
||||
<span id="L199"><span class="lineNum"> 199</span> <span class="tlaGNC"> 14 : n_models = k;</span></span>
|
||||
<span id="L200"><span class="lineNum"> 200</span> : // 6. Make prediction, compute alpha, update weights</span>
|
||||
<span id="L201"><span class="lineNum"> 201</span> <span class="tlaGNC"> 14 : auto ypred = predict(X_train);</span></span>
|
||||
<span id="L202"><span class="lineNum"> 202</span> : //</span>
|
||||
<span id="L203"><span class="lineNum"> 203</span> : // Update weights</span>
|
||||
<span id="L204"><span class="lineNum"> 204</span> : //</span>
|
||||
<span id="L205"><span class="lineNum"> 205</span> : double alpha_t;</span>
|
||||
<span id="L206"><span class="lineNum"> 206</span> : bool terminate;</span>
|
||||
<span id="L207"><span class="lineNum"> 207</span> <span class="tlaGNC"> 14 : std::tie(weights, alpha_t, terminate) = update_weights(y_train, ypred, weights);</span></span>
|
||||
<span id="L208"><span class="lineNum"> 208</span> : //</span>
|
||||
<span id="L209"><span class="lineNum"> 209</span> : // Restore the models if needed</span>
|
||||
<span id="L210"><span class="lineNum"> 210</span> : //</span>
|
||||
<span id="L211"><span class="lineNum"> 211</span> : // 7. Insert classifiers in models_bak to be the first n models</span>
|
||||
<span id="L212"><span class="lineNum"> 212</span> : // if n_models_bak == k, don't restore any, because none of them were moved</span>
|
||||
<span id="L213"><span class="lineNum"> 213</span> <span class="tlaGNC"> 14 : if (k != n_models_bak) {</span></span>
|
||||
<span id="L214"><span class="lineNum"> 214</span> : // Insert in the same order as they were extracted</span>
|
||||
<span id="L215"><span class="lineNum"> 215</span> <span class="tlaGNC"> 12 : int bak_size = models_bak.size();</span></span>
|
||||
<span id="L216"><span class="lineNum"> 216</span> <span class="tlaGNC"> 72 : for (int i = 0; i < bak_size; ++i) {</span></span>
|
||||
<span id="L217"><span class="lineNum"> 217</span> <span class="tlaGNC"> 60 : model = std::move(models_bak[bak_size - 1 - i]);</span></span>
|
||||
<span id="L218"><span class="lineNum"> 218</span> <span class="tlaGNC"> 60 : models_bak.erase(models_bak.end() - 1);</span></span>
|
||||
<span id="L219"><span class="lineNum"> 219</span> <span class="tlaGNC"> 60 : models.insert(models.begin(), std::move(model));</span></span>
|
||||
<span id="L220"><span class="lineNum"> 220</span> : }</span>
|
||||
<span id="L221"><span class="lineNum"> 221</span> : }</span>
|
||||
<span id="L222"><span class="lineNum"> 222</span> : // 8. significances <- significances_bak</span>
|
||||
<span id="L223"><span class="lineNum"> 223</span> <span class="tlaGNC"> 14 : significanceModels = significance_bak;</span></span>
|
||||
<span id="L224"><span class="lineNum"> 224</span> : //</span>
|
||||
<span id="L225"><span class="lineNum"> 225</span> : // Update the significance of the last k models</span>
|
||||
<span id="L226"><span class="lineNum"> 226</span> : //</span>
|
||||
<span id="L227"><span class="lineNum"> 227</span> : // 9. Update last k significances</span>
|
||||
<span id="L228"><span class="lineNum"> 228</span> <span class="tlaGNC"> 52 : for (int i = 0; i < k; ++i) {</span></span>
|
||||
<span id="L229"><span class="lineNum"> 229</span> <span class="tlaGNC"> 38 : significanceModels[n_models_bak - k + i] = alpha_t;</span></span>
|
||||
<span id="L230"><span class="lineNum"> 230</span> : }</span>
|
||||
<span id="L231"><span class="lineNum"> 231</span> : // 10. n_models <- n_models_bak</span>
|
||||
<span id="L232"><span class="lineNum"> 232</span> <span class="tlaGNC"> 14 : n_models = n_models_bak;</span></span>
|
||||
<span id="L233"><span class="lineNum"> 233</span> <span class="tlaGNC"> 28 : return { weights, alpha_t, terminate };</span></span>
|
||||
<span id="L234"><span class="lineNum"> 234</span> <span class="tlaGNC"> 14 : }</span></span>
|
||||
<span id="L235"><span class="lineNum"> 235</span> <span class="tlaGNC"> 16 : std::vector<int> BoostAODE::initializeModels()</span></span>
|
||||
<span id="L236"><span class="lineNum"> 236</span> : {</span>
|
||||
<span id="L237"><span class="lineNum"> 237</span> <span class="tlaGNC"> 16 : std::vector<int> featuresUsed;</span></span>
|
||||
<span id="L238"><span class="lineNum"> 238</span> <span class="tlaGNC"> 16 : torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);</span></span>
|
||||
<span id="L239"><span class="lineNum"> 239</span> <span class="tlaGNC"> 16 : int maxFeatures = 0;</span></span>
|
||||
<span id="L240"><span class="lineNum"> 240</span> <span class="tlaGNC"> 16 : if (select_features_algorithm == SelectFeatures.CFS) {</span></span>
|
||||
<span id="L241"><span class="lineNum"> 241</span> <span class="tlaGNC"> 4 : featureSelector = new CFS(dataset, features, className, maxFeatures, states.at(className).size(), weights_);</span></span>
|
||||
<span id="L242"><span class="lineNum"> 242</span> <span class="tlaGNC"> 12 : } else if (select_features_algorithm == SelectFeatures.IWSS) {</span></span>
|
||||
<span id="L243"><span class="lineNum"> 243</span> <span class="tlaGNC"> 6 : if (threshold < 0 || threshold >0.5) {</span></span>
|
||||
<span id="L244"><span class="lineNum"> 244</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.IWSS + " [0, 0.5]");</span></span>
|
||||
<span id="L245"><span class="lineNum"> 245</span> : }</span>
|
||||
<span id="L246"><span class="lineNum"> 246</span> <span class="tlaGNC"> 2 : featureSelector = new IWSS(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);</span></span>
|
||||
<span id="L247"><span class="lineNum"> 247</span> <span class="tlaGNC"> 6 : } else if (select_features_algorithm == SelectFeatures.FCBF) {</span></span>
|
||||
<span id="L248"><span class="lineNum"> 248</span> <span class="tlaGNC"> 6 : if (threshold < 1e-7 || threshold > 1) {</span></span>
|
||||
<span id="L249"><span class="lineNum"> 249</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("Invalid threshold value for " + SelectFeatures.FCBF + " [1e-7, 1]");</span></span>
|
||||
<span id="L250"><span class="lineNum"> 250</span> : }</span>
|
||||
<span id="L251"><span class="lineNum"> 251</span> <span class="tlaGNC"> 2 : featureSelector = new FCBF(dataset, features, className, maxFeatures, states.at(className).size(), weights_, threshold);</span></span>
|
||||
<span id="L252"><span class="lineNum"> 252</span> : }</span>
|
||||
<span id="L253"><span class="lineNum"> 253</span> <span class="tlaGNC"> 8 : featureSelector->fit();</span></span>
|
||||
<span id="L254"><span class="lineNum"> 254</span> <span class="tlaGNC"> 8 : auto cfsFeatures = featureSelector->getFeatures();</span></span>
|
||||
<span id="L255"><span class="lineNum"> 255</span> <span class="tlaGNC"> 8 : auto scores = featureSelector->getScores();</span></span>
|
||||
<span id="L256"><span class="lineNum"> 256</span> <span class="tlaGNC"> 50 : for (const int& feature : cfsFeatures) {</span></span>
|
||||
<span id="L257"><span class="lineNum"> 257</span> <span class="tlaGNC"> 42 : featuresUsed.push_back(feature);</span></span>
|
||||
<span id="L258"><span class="lineNum"> 258</span> <span class="tlaGNC"> 42 : std::unique_ptr<Classifier> model = std::make_unique<SPODE>(feature);</span></span>
|
||||
<span id="L259"><span class="lineNum"> 259</span> <span class="tlaGNC"> 42 : model->fit(dataset, features, className, states, weights_);</span></span>
|
||||
<span id="L260"><span class="lineNum"> 260</span> <span class="tlaGNC"> 42 : models.push_back(std::move(model));</span></span>
|
||||
<span id="L261"><span class="lineNum"> 261</span> <span class="tlaGNC"> 42 : significanceModels.push_back(1.0); // They will be updated later in trainModel</span></span>
|
||||
<span id="L262"><span class="lineNum"> 262</span> <span class="tlaGNC"> 42 : n_models++;</span></span>
|
||||
<span id="L263"><span class="lineNum"> 263</span> <span class="tlaGNC"> 42 : }</span></span>
|
||||
<span id="L264"><span class="lineNum"> 264</span> <span class="tlaGNC"> 8 : notes.push_back("Used features in initialization: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()) + " with " + select_features_algorithm);</span></span>
|
||||
<span id="L265"><span class="lineNum"> 265</span> <span class="tlaGNC"> 8 : delete featureSelector;</span></span>
|
||||
<span id="L266"><span class="lineNum"> 266</span> <span class="tlaGNC"> 16 : return featuresUsed;</span></span>
|
||||
<span id="L267"><span class="lineNum"> 267</span> <span class="tlaGNC"> 24 : }</span></span>
|
||||
<span id="L268"><span class="lineNum"> 268</span> <span class="tlaGNC"> 46 : void BoostAODE::trainModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L269"><span class="lineNum"> 269</span> : {</span>
|
||||
<span id="L270"><span class="lineNum"> 270</span> : //</span>
|
||||
<span id="L271"><span class="lineNum"> 271</span> : // Logging setup</span>
|
||||
<span id="L272"><span class="lineNum"> 272</span> : //</span>
|
||||
<span id="L273"><span class="lineNum"> 273</span> <span class="tlaGNC"> 46 : loguru::set_thread_name("BoostAODE");</span></span>
|
||||
<span id="L274"><span class="lineNum"> 274</span> <span class="tlaGNC"> 46 : loguru::g_stderr_verbosity = loguru::Verbosity_OFF;</span></span>
|
||||
<span id="L275"><span class="lineNum"> 275</span> <span class="tlaGNC"> 46 : loguru::add_file("boostAODE.log", loguru::Truncate, loguru::Verbosity_MAX);</span></span>
|
||||
<span id="L276"><span class="lineNum"> 276</span> : </span>
|
||||
<span id="L277"><span class="lineNum"> 277</span> : // Algorithm based on the adaboost algorithm for classification</span>
|
||||
<span id="L278"><span class="lineNum"> 278</span> : // as explained in Ensemble methods (Zhi-Hua Zhou, 2012)</span>
|
||||
<span id="L279"><span class="lineNum"> 279</span> <span class="tlaGNC"> 46 : fitted = true;</span></span>
|
||||
<span id="L280"><span class="lineNum"> 280</span> <span class="tlaGNC"> 46 : double alpha_t = 0;</span></span>
|
||||
<span id="L281"><span class="lineNum"> 281</span> <span class="tlaGNC"> 46 : torch::Tensor weights_ = torch::full({ m }, 1.0 / m, torch::kFloat64);</span></span>
|
||||
<span id="L282"><span class="lineNum"> 282</span> <span class="tlaGNC"> 46 : bool finished = false;</span></span>
|
||||
<span id="L283"><span class="lineNum"> 283</span> <span class="tlaGNC"> 46 : std::vector<int> featuresUsed;</span></span>
|
||||
<span id="L284"><span class="lineNum"> 284</span> <span class="tlaGNC"> 46 : if (selectFeatures) {</span></span>
|
||||
<span id="L285"><span class="lineNum"> 285</span> <span class="tlaGNC"> 16 : featuresUsed = initializeModels();</span></span>
|
||||
<span id="L286"><span class="lineNum"> 286</span> <span class="tlaGNC"> 8 : auto ypred = predict(X_train);</span></span>
|
||||
<span id="L287"><span class="lineNum"> 287</span> <span class="tlaGNC"> 8 : std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);</span></span>
|
||||
<span id="L288"><span class="lineNum"> 288</span> : // Update significance of the models</span>
|
||||
<span id="L289"><span class="lineNum"> 289</span> <span class="tlaGNC"> 50 : for (int i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L290"><span class="lineNum"> 290</span> <span class="tlaGNC"> 42 : significanceModels[i] = alpha_t;</span></span>
|
||||
<span id="L291"><span class="lineNum"> 291</span> : }</span>
|
||||
<span id="L292"><span class="lineNum"> 292</span> <span class="tlaGNC"> 8 : if (finished) {</span></span>
|
||||
<span id="L293"><span class="lineNum"> 293</span> <span class="tlaUNC tlaBgUNC"> 0 : return;</span></span>
|
||||
<span id="L294"><span class="lineNum"> 294</span> : }</span>
|
||||
<span id="L295"><span class="lineNum"> 295</span> <span class="tlaGNC tlaBgGNC"> 8 : }</span></span>
|
||||
<span id="L296"><span class="lineNum"> 296</span> <span class="tlaGNC"> 38 : int numItemsPack = 0; // The counter of the models inserted in the current pack</span></span>
|
||||
<span id="L297"><span class="lineNum"> 297</span> : // Variables to control the accuracy finish condition</span>
|
||||
<span id="L298"><span class="lineNum"> 298</span> <span class="tlaGNC"> 38 : double priorAccuracy = 0.0;</span></span>
|
||||
<span id="L299"><span class="lineNum"> 299</span> <span class="tlaGNC"> 38 : double improvement = 1.0;</span></span>
|
||||
<span id="L300"><span class="lineNum"> 300</span> <span class="tlaGNC"> 38 : double convergence_threshold = 1e-4;</span></span>
|
||||
<span id="L301"><span class="lineNum"> 301</span> <span class="tlaGNC"> 38 : int tolerance = 0; // number of times the accuracy is lower than the convergence_threshold</span></span>
|
||||
<span id="L302"><span class="lineNum"> 302</span> : // Step 0: Set the finish condition</span>
|
||||
<span id="L303"><span class="lineNum"> 303</span> : // epsilon sub t > 0.5 => inverse the weights policy</span>
|
||||
<span id="L304"><span class="lineNum"> 304</span> : // validation error is not decreasing</span>
|
||||
<span id="L305"><span class="lineNum"> 305</span> : // run out of features</span>
|
||||
<span id="L306"><span class="lineNum"> 306</span> <span class="tlaGNC"> 38 : bool ascending = order_algorithm == Orders.ASC;</span></span>
|
||||
<span id="L307"><span class="lineNum"> 307</span> <span class="tlaGNC"> 38 : std::mt19937 g{ 173 };</span></span>
|
||||
<span id="L308"><span class="lineNum"> 308</span> <span class="tlaGNC"> 252 : while (!finished) {</span></span>
|
||||
<span id="L309"><span class="lineNum"> 309</span> : // Step 1: Build ranking with mutual information</span>
|
||||
<span id="L310"><span class="lineNum"> 310</span> <span class="tlaGNC"> 214 : auto featureSelection = metrics.SelectKBestWeighted(weights_, ascending, n); // Get all the features sorted</span></span>
|
||||
<span id="L311"><span class="lineNum"> 311</span> <span class="tlaGNC"> 214 : if (order_algorithm == Orders.RAND) {</span></span>
|
||||
<span id="L312"><span class="lineNum"> 312</span> <span class="tlaGNC"> 18 : std::shuffle(featureSelection.begin(), featureSelection.end(), g);</span></span>
|
||||
<span id="L313"><span class="lineNum"> 313</span> : }</span>
|
||||
<span id="L314"><span class="lineNum"> 314</span> : // Remove used features</span>
|
||||
<span id="L315"><span class="lineNum"> 315</span> <span class="tlaGNC"> 428 : featureSelection.erase(remove_if(begin(featureSelection), end(featureSelection), [&](auto x)</span></span>
|
||||
<span id="L316"><span class="lineNum"> 316</span> <span class="tlaGNC"> 19400 : { return std::find(begin(featuresUsed), end(featuresUsed), x) != end(featuresUsed);}),</span></span>
|
||||
<span id="L317"><span class="lineNum"> 317</span> <span class="tlaGNC"> 214 : end(featureSelection)</span></span>
|
||||
<span id="L318"><span class="lineNum"> 318</span> : );</span>
|
||||
<span id="L319"><span class="lineNum"> 319</span> <span class="tlaGNC"> 214 : int k = bisection ? pow(2, tolerance) : 1;</span></span>
|
||||
<span id="L320"><span class="lineNum"> 320</span> <span class="tlaGNC"> 214 : int counter = 0; // The model counter of the current pack</span></span>
|
||||
<span id="L321"><span class="lineNum"> 321</span> <span class="tlaGNC"> 214 : VLOG_SCOPE_F(1, "counter=%d k=%d featureSelection.size: %zu", counter, k, featureSelection.size());</span></span>
|
||||
<span id="L322"><span class="lineNum"> 322</span> <span class="tlaGNC"> 502 : while (counter++ < k && featureSelection.size() > 0) {</span></span>
|
||||
<span id="L323"><span class="lineNum"> 323</span> <span class="tlaGNC"> 288 : auto feature = featureSelection[0];</span></span>
|
||||
<span id="L324"><span class="lineNum"> 324</span> <span class="tlaGNC"> 288 : featureSelection.erase(featureSelection.begin());</span></span>
|
||||
<span id="L325"><span class="lineNum"> 325</span> <span class="tlaGNC"> 288 : std::unique_ptr<Classifier> model;</span></span>
|
||||
<span id="L326"><span class="lineNum"> 326</span> <span class="tlaGNC"> 288 : model = std::make_unique<SPODE>(feature);</span></span>
|
||||
<span id="L327"><span class="lineNum"> 327</span> <span class="tlaGNC"> 288 : model->fit(dataset, features, className, states, weights_);</span></span>
|
||||
<span id="L328"><span class="lineNum"> 328</span> <span class="tlaGNC"> 288 : alpha_t = 0.0;</span></span>
|
||||
<span id="L329"><span class="lineNum"> 329</span> <span class="tlaGNC"> 288 : if (!block_update) {</span></span>
|
||||
<span id="L330"><span class="lineNum"> 330</span> <span class="tlaGNC"> 250 : auto ypred = model->predict(X_train);</span></span>
|
||||
<span id="L331"><span class="lineNum"> 331</span> : // Step 3.1: Compute the classifier amout of say</span>
|
||||
<span id="L332"><span class="lineNum"> 332</span> <span class="tlaGNC"> 250 : std::tie(weights_, alpha_t, finished) = update_weights(y_train, ypred, weights_);</span></span>
|
||||
<span id="L333"><span class="lineNum"> 333</span> <span class="tlaGNC"> 250 : }</span></span>
|
||||
<span id="L334"><span class="lineNum"> 334</span> : // Step 3.4: Store classifier and its accuracy to weigh its future vote</span>
|
||||
<span id="L335"><span class="lineNum"> 335</span> <span class="tlaGNC"> 288 : numItemsPack++;</span></span>
|
||||
<span id="L336"><span class="lineNum"> 336</span> <span class="tlaGNC"> 288 : featuresUsed.push_back(feature);</span></span>
|
||||
<span id="L337"><span class="lineNum"> 337</span> <span class="tlaGNC"> 288 : models.push_back(std::move(model));</span></span>
|
||||
<span id="L338"><span class="lineNum"> 338</span> <span class="tlaGNC"> 288 : significanceModels.push_back(alpha_t);</span></span>
|
||||
<span id="L339"><span class="lineNum"> 339</span> <span class="tlaGNC"> 288 : n_models++;</span></span>
|
||||
<span id="L340"><span class="lineNum"> 340</span> <span class="tlaGNC"> 288 : VLOG_SCOPE_F(2, "numItemsPack: %d n_models: %d featuresUsed: %zu", numItemsPack, n_models, featuresUsed.size());</span></span>
|
||||
<span id="L341"><span class="lineNum"> 341</span> <span class="tlaGNC"> 288 : }</span></span>
|
||||
<span id="L342"><span class="lineNum"> 342</span> <span class="tlaGNC"> 214 : if (block_update) {</span></span>
|
||||
<span id="L343"><span class="lineNum"> 343</span> <span class="tlaGNC"> 14 : std::tie(weights_, alpha_t, finished) = update_weights_block(k, y_train, weights_);</span></span>
|
||||
<span id="L344"><span class="lineNum"> 344</span> : }</span>
|
||||
<span id="L345"><span class="lineNum"> 345</span> <span class="tlaGNC"> 214 : if (convergence && !finished) {</span></span>
|
||||
<span id="L346"><span class="lineNum"> 346</span> <span class="tlaGNC"> 148 : auto y_val_predict = predict(X_test);</span></span>
|
||||
<span id="L347"><span class="lineNum"> 347</span> <span class="tlaGNC"> 148 : double accuracy = (y_val_predict == y_test).sum().item<double>() / (double)y_test.size(0);</span></span>
|
||||
<span id="L348"><span class="lineNum"> 348</span> <span class="tlaGNC"> 148 : if (priorAccuracy == 0) {</span></span>
|
||||
<span id="L349"><span class="lineNum"> 349</span> <span class="tlaGNC"> 30 : priorAccuracy = accuracy;</span></span>
|
||||
<span id="L350"><span class="lineNum"> 350</span> : } else {</span>
|
||||
<span id="L351"><span class="lineNum"> 351</span> <span class="tlaGNC"> 118 : improvement = accuracy - priorAccuracy;</span></span>
|
||||
<span id="L352"><span class="lineNum"> 352</span> : }</span>
|
||||
<span id="L353"><span class="lineNum"> 353</span> <span class="tlaGNC"> 148 : if (improvement < convergence_threshold) {</span></span>
|
||||
<span id="L354"><span class="lineNum"> 354</span> <span class="tlaGNC"> 88 : VLOG_SCOPE_F(3, " (improvement<threshold) tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);</span></span>
|
||||
<span id="L355"><span class="lineNum"> 355</span> <span class="tlaGNC"> 88 : tolerance++;</span></span>
|
||||
<span id="L356"><span class="lineNum"> 356</span> <span class="tlaGNC"> 88 : } else {</span></span>
|
||||
<span id="L357"><span class="lineNum"> 357</span> <span class="tlaGNC"> 60 : VLOG_SCOPE_F(3, "* (improvement>=threshold) Reset. tolerance: %d numItemsPack: %d improvement: %f prior: %f current: %f", tolerance, numItemsPack, improvement, priorAccuracy, accuracy);</span></span>
|
||||
<span id="L358"><span class="lineNum"> 358</span> <span class="tlaGNC"> 60 : tolerance = 0; // Reset the counter if the model performs better</span></span>
|
||||
<span id="L359"><span class="lineNum"> 359</span> <span class="tlaGNC"> 60 : numItemsPack = 0;</span></span>
|
||||
<span id="L360"><span class="lineNum"> 360</span> <span class="tlaGNC"> 60 : }</span></span>
|
||||
<span id="L361"><span class="lineNum"> 361</span> <span class="tlaGNC"> 148 : if (convergence_best) {</span></span>
|
||||
<span id="L362"><span class="lineNum"> 362</span> : // Keep the best accuracy until now as the prior accuracy</span>
|
||||
<span id="L363"><span class="lineNum"> 363</span> <span class="tlaGNC"> 16 : priorAccuracy = std::max(accuracy, priorAccuracy);</span></span>
|
||||
<span id="L364"><span class="lineNum"> 364</span> : } else {</span>
|
||||
<span id="L365"><span class="lineNum"> 365</span> : // Keep the last accuray obtained as the prior accuracy</span>
|
||||
<span id="L366"><span class="lineNum"> 366</span> <span class="tlaGNC"> 132 : priorAccuracy = accuracy;</span></span>
|
||||
<span id="L367"><span class="lineNum"> 367</span> : }</span>
|
||||
<span id="L368"><span class="lineNum"> 368</span> <span class="tlaGNC"> 148 : }</span></span>
|
||||
<span id="L369"><span class="lineNum"> 369</span> <span class="tlaGNC"> 214 : VLOG_SCOPE_F(1, "tolerance: %d featuresUsed.size: %zu features.size: %zu", tolerance, featuresUsed.size(), features.size());</span></span>
|
||||
<span id="L370"><span class="lineNum"> 370</span> <span class="tlaGNC"> 214 : finished = finished || tolerance > maxTolerance || featuresUsed.size() == features.size();</span></span>
|
||||
<span id="L371"><span class="lineNum"> 371</span> <span class="tlaGNC"> 214 : }</span></span>
|
||||
<span id="L372"><span class="lineNum"> 372</span> <span class="tlaGNC"> 38 : if (tolerance > maxTolerance) {</span></span>
|
||||
<span id="L373"><span class="lineNum"> 373</span> <span class="tlaGNC"> 4 : if (numItemsPack < n_models) {</span></span>
|
||||
<span id="L374"><span class="lineNum"> 374</span> <span class="tlaGNC"> 4 : notes.push_back("Convergence threshold reached & " + std::to_string(numItemsPack) + " models eliminated");</span></span>
|
||||
<span id="L375"><span class="lineNum"> 375</span> <span class="tlaGNC"> 4 : VLOG_SCOPE_F(4, "Convergence threshold reached & %d models eliminated of %d", numItemsPack, n_models);</span></span>
|
||||
<span id="L376"><span class="lineNum"> 376</span> <span class="tlaGNC"> 52 : for (int i = 0; i < numItemsPack; ++i) {</span></span>
|
||||
<span id="L377"><span class="lineNum"> 377</span> <span class="tlaGNC"> 48 : significanceModels.pop_back();</span></span>
|
||||
<span id="L378"><span class="lineNum"> 378</span> <span class="tlaGNC"> 48 : models.pop_back();</span></span>
|
||||
<span id="L379"><span class="lineNum"> 379</span> <span class="tlaGNC"> 48 : n_models--;</span></span>
|
||||
<span id="L380"><span class="lineNum"> 380</span> : }</span>
|
||||
<span id="L381"><span class="lineNum"> 381</span> <span class="tlaGNC"> 4 : } else {</span></span>
|
||||
<span id="L382"><span class="lineNum"> 382</span> <span class="tlaUNC tlaBgUNC"> 0 : notes.push_back("Convergence threshold reached & 0 models eliminated");</span></span>
|
||||
<span id="L383"><span class="lineNum"> 383</span> <span class="tlaUNC"> 0 : VLOG_SCOPE_F(4, "Convergence threshold reached & 0 models eliminated n_models=%d numItemsPack=%d", n_models, numItemsPack);</span></span>
|
||||
<span id="L384"><span class="lineNum"> 384</span> <span class="tlaUNC"> 0 : }</span></span>
|
||||
<span id="L385"><span class="lineNum"> 385</span> : }</span>
|
||||
<span id="L386"><span class="lineNum"> 386</span> <span class="tlaGNC tlaBgGNC"> 38 : if (featuresUsed.size() != features.size()) {</span></span>
|
||||
<span id="L387"><span class="lineNum"> 387</span> <span class="tlaGNC"> 2 : notes.push_back("Used features in train: " + std::to_string(featuresUsed.size()) + " of " + std::to_string(features.size()));</span></span>
|
||||
<span id="L388"><span class="lineNum"> 388</span> <span class="tlaGNC"> 2 : status = WARNING;</span></span>
|
||||
<span id="L389"><span class="lineNum"> 389</span> : }</span>
|
||||
<span id="L390"><span class="lineNum"> 390</span> <span class="tlaGNC"> 38 : notes.push_back("Number of models: " + std::to_string(n_models));</span></span>
|
||||
<span id="L391"><span class="lineNum"> 391</span> <span class="tlaGNC"> 54 : }</span></span>
|
||||
<span id="L392"><span class="lineNum"> 392</span> <span class="tlaGNC"> 2 : std::vector<std::string> BoostAODE::graph(const std::string& title) const</span></span>
|
||||
<span id="L393"><span class="lineNum"> 393</span> : {</span>
|
||||
<span id="L394"><span class="lineNum"> 394</span> <span class="tlaGNC"> 2 : return Ensemble::graph(title);</span></span>
|
||||
<span id="L395"><span class="lineNum"> 395</span> : }</span>
|
||||
<span id="L396"><span class="lineNum"> 396</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/BoostAODE.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/ensembles/BoostAODE.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.h<span style="font-size: 80%;"> (<a href="BoostAODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="BoostAODE.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">40</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/ensembles/BoostAODE.h.func.html
Normal file
96
html/BayesNet/bayesnet/ensembles/BoostAODE.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.h<span style="font-size: 80%;"> (<a href="BoostAODE.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="BoostAODE.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="BoostAODE.h.gcov.html#L25">_ZN8bayesnet9BoostAODED2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">40</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
126
html/BayesNet/bayesnet/ensembles/BoostAODE.h.gcov.html
Normal file
126
html/BayesNet/bayesnet/ensembles/BoostAODE.h.gcov.html
Normal file
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/BoostAODE.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - BoostAODE.h<span style="font-size: 80%;"> (source / <a href="BoostAODE.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef BOOSTAODE_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define BOOSTAODE_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <map></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "bayesnet/classifiers/SPODE.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "bayesnet/feature_selection/FeatureSelect.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : #include "Ensemble.h"</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : namespace bayesnet {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : const struct {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : std::string CFS = "CFS";</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : std::string FCBF = "FCBF";</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : std::string IWSS = "IWSS";</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : }SelectFeatures;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : const struct {</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : std::string ASC = "asc";</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : std::string DESC = "desc";</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : std::string RAND = "rand";</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : }Orders;</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : class BoostAODE : public Ensemble {</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : public:</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : explicit BoostAODE(bool predict_voting = false);</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC tlaBgGNC"> 44 : virtual ~BoostAODE() = default;</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : std::vector<std::string> graph(const std::string& title = "BoostAODE") const override;</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : void setHyperparameters(const nlohmann::json& hyperparameters_) override;</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : protected:</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : void buildModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> : void trainModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : private:</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : std::tuple<torch::Tensor&, double, bool> update_weights_block(int k, torch::Tensor& ytrain, torch::Tensor& weights);</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : std::vector<int> initializeModels();</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> : torch::Tensor X_train, y_train, X_test, y_test;</span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : // Hyperparameters</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : bool bisection = true; // if true, use bisection stratety to add k models at once to the ensemble</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : int maxTolerance = 3;</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : std::string order_algorithm; // order to process the KBest features asc, desc, rand</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : bool convergence = true; //if true, stop when the model does not improve</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : bool convergence_best = false; // wether to keep the best accuracy to the moment or the last accuracy as prior accuracy</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> : bool selectFeatures = false; // if true, use feature selection</span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : std::string select_features_algorithm = Orders.DESC; // Selected feature selection algorithm</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : FeatureSelect* featureSelector = nullptr;</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : double threshold = -1;</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : bool block_update = false;</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : };</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : }</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
250
html/BayesNet/bayesnet/ensembles/Ensemble.cc.func-c.html
Normal file
250
html/BayesNet/bayesnet/ensembles/Ensemble.cc.func-c.html
Normal file
@ -0,0 +1,250 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.cc<span style="font-size: 80%;"> (<a href="Ensemble.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">154</td>
|
||||
<td class="headerCovTableEntry">151</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="Ensemble.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L212">_ZNK8bayesnet8Ensemble17getNumberOfStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L178">_ZNK8bayesnet8Ensemble4showB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L187">_ZNK8bayesnet8Ensemble5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L14">_ZN8bayesnet8Ensemble10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L204">_ZNK8bayesnet8Ensemble16getNumberOfEdgesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L196">_ZNK8bayesnet8Ensemble16getNumberOfNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L131">_ZN8bayesnet8Ensemble22predict_average_votingERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L102">_ZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L167">_ZN8bayesnet8Ensemble5scoreERSt6vectorIS1_IiSaIiEESaIS3_EERS3_</a></td>
|
||||
|
||||
<td class="coverFnHi">20</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L22">_ZN8bayesnet8Ensemble15compute_arg_maxERSt6vectorIS1_IdSaIdEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">22</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L72">_ZN8bayesnet8Ensemble7predictERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">28</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L156">_ZN8bayesnet8Ensemble5scoreERN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">40</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L58">_ZN8bayesnet8Ensemble13predict_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L138">_ZN8bayesnet8Ensemble22predict_average_votingERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">80</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L36">_ZN8bayesnet8Ensemble6votingERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">80</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L109">_ZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">122</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L82">_ZN8bayesnet8Ensemble21predict_average_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">148</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L9">_ZN8bayesnet8EnsembleC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">156</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L31">_ZN8bayesnet8Ensemble15compute_arg_maxERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">212</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L77">_ZN8bayesnet8Ensemble7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">218</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L65">_ZN8bayesnet8Ensemble13predict_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">226</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L145">_ZZN8bayesnet8Ensemble22predict_average_votingERN2at6TensorEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">536</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L89">_ZZN8bayesnet8Ensemble21predict_average_probaERN2at6TensorEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">734</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L127">_ZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUldE_clEd</a></td>
|
||||
|
||||
<td class="coverFnHi">16440</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L117">_ZZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUlvE_clEvENKUlddE_clEdd</a></td>
|
||||
|
||||
<td class="coverFnHi">129960</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
250
html/BayesNet/bayesnet/ensembles/Ensemble.cc.func.html
Normal file
250
html/BayesNet/bayesnet/ensembles/Ensemble.cc.func.html
Normal file
@ -0,0 +1,250 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.cc<span style="font-size: 80%;"> (<a href="Ensemble.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">154</td>
|
||||
<td class="headerCovTableEntry">151</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="Ensemble.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L14">_ZN8bayesnet8Ensemble10trainModelERKN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L65">_ZN8bayesnet8Ensemble13predict_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">226</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L58">_ZN8bayesnet8Ensemble13predict_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L31">_ZN8bayesnet8Ensemble15compute_arg_maxERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">212</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L22">_ZN8bayesnet8Ensemble15compute_arg_maxERSt6vectorIS1_IdSaIdEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">22</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L82">_ZN8bayesnet8Ensemble21predict_average_probaERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">148</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L102">_ZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">18</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L138">_ZN8bayesnet8Ensemble22predict_average_votingERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">80</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L131">_ZN8bayesnet8Ensemble22predict_average_votingERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L156">_ZN8bayesnet8Ensemble5scoreERN2at6TensorES3_</a></td>
|
||||
|
||||
<td class="coverFnHi">40</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L167">_ZN8bayesnet8Ensemble5scoreERSt6vectorIS1_IiSaIiEESaIS3_EERS3_</a></td>
|
||||
|
||||
<td class="coverFnHi">20</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L36">_ZN8bayesnet8Ensemble6votingERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">80</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L77">_ZN8bayesnet8Ensemble7predictERN2at6TensorE</a></td>
|
||||
|
||||
<td class="coverFnHi">218</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L72">_ZN8bayesnet8Ensemble7predictERSt6vectorIS1_IiSaIiEESaIS3_EE</a></td>
|
||||
|
||||
<td class="coverFnHi">28</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L9">_ZN8bayesnet8EnsembleC2Eb</a></td>
|
||||
|
||||
<td class="coverFnHi">156</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L204">_ZNK8bayesnet8Ensemble16getNumberOfEdgesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L196">_ZNK8bayesnet8Ensemble16getNumberOfNodesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L212">_ZNK8bayesnet8Ensemble17getNumberOfStatesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L178">_ZNK8bayesnet8Ensemble4showB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">2</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L187">_ZNK8bayesnet8Ensemble5graphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L89">_ZZN8bayesnet8Ensemble21predict_average_probaERN2at6TensorEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">734</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L127">_ZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUldE_clEd</a></td>
|
||||
|
||||
<td class="coverFnHi">16440</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L109">_ZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">122</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L145">_ZZN8bayesnet8Ensemble22predict_average_votingERN2at6TensorEENKUlvE_clEv</a></td>
|
||||
|
||||
<td class="coverFnHi">536</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.cc.gcov.html#L117">_ZZZN8bayesnet8Ensemble21predict_average_probaERSt6vectorIS1_IiSaIiEESaIS3_EEENKUlvE_clEvENKUlddE_clEdd</a></td>
|
||||
|
||||
<td class="coverFnHi">129960</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
298
html/BayesNet/bayesnet/ensembles/Ensemble.cc.gcov.html
Normal file
298
html/BayesNet/bayesnet/ensembles/Ensemble.cc.gcov.html
Normal file
@ -0,0 +1,298 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.cc<span style="font-size: 80%;"> (source / <a href="Ensemble.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">154</td>
|
||||
<td class="headerCovTableEntry">151</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
<td class="headerCovTableEntry">25</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "Ensemble.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : </span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : </span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 156 : Ensemble::Ensemble(bool predict_voting) : Classifier(Network()), n_models(0), predict_voting(predict_voting)</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 156 : };</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : const std::string ENSEMBLE_NOT_FITTED = "Ensemble has not been fitted";</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 12 : void Ensemble::trainModel(const torch::Tensor& weights)</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : {</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 12 : n_models = models.size();</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 94 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : // fit with std::vectors</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 82 : models[i]->fit(dataset, features, className, states);</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : }</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 12 : }</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 22 : std::vector<int> Ensemble::compute_arg_max(std::vector<std::vector<double>>& X)</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : {</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 22 : std::vector<int> y_pred;</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 4910 : for (auto i = 0; i < X.size(); ++i) {</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 4888 : auto max = std::max_element(X[i].begin(), X[i].end());</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 9776 : y_pred.push_back(std::distance(X[i].begin(), max));</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : }</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 22 : return y_pred;</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaUNC tlaBgUNC"> 0 : }</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC tlaBgGNC"> 212 : torch::Tensor Ensemble::compute_arg_max(torch::Tensor& X)</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : {</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 212 : auto y_pred = torch::argmax(X, 1);</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 212 : return y_pred;</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : }</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC"> 80 : torch::Tensor Ensemble::voting(torch::Tensor& votes)</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : {</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : // Convert m x n_models tensor to a m x n_class_states with voting probabilities</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 80 : auto y_pred_ = votes.accessor<int, 2>();</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> <span class="tlaGNC"> 80 : std::vector<int> y_pred_final;</span></span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 80 : int numClasses = states.at(className).size();</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : // votes is m x n_models with the prediction of every model for each sample</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 80 : auto result = torch::zeros({ votes.size(0), numClasses }, torch::kFloat32);</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> <span class="tlaGNC"> 80 : auto sum = std::reduce(significanceModels.begin(), significanceModels.end());</span></span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> <span class="tlaGNC"> 20612 : for (int i = 0; i < votes.size(0); ++i) {</span></span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : // n_votes store in each index (value of class) the significance added by each model</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : // i.e. n_votes[0] contains how much value has the value 0 of class. That value is generated by the models predictions</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> <span class="tlaGNC"> 20532 : std::vector<double> n_votes(numClasses, 0.0);</span></span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 171800 : for (int j = 0; j < n_models; ++j) {</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 151268 : n_votes[y_pred_[i][j]] += significanceModels.at(j);</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> : }</span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> <span class="tlaGNC"> 20532 : result[i] = torch::tensor(n_votes);</span></span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> <span class="tlaGNC"> 20532 : }</span></span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : // To only do one division and gain precision</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> <span class="tlaGNC"> 80 : result /= sum;</span></span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> <span class="tlaGNC"> 160 : return result;</span></span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 80 : }</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> <span class="tlaGNC"> 44 : std::vector<std::vector<double>> Ensemble::predict_proba(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> : {</span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> <span class="tlaGNC"> 44 : if (!fitted) {</span></span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 12 : throw std::logic_error(ENSEMBLE_NOT_FITTED);</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> : }</span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 32 : return predict_voting ? predict_average_voting(X) : predict_average_proba(X);</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> : }</span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> <span class="tlaGNC"> 226 : torch::Tensor Ensemble::predict_proba(torch::Tensor& X)</span></span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> : {</span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> <span class="tlaGNC"> 226 : if (!fitted) {</span></span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> <span class="tlaGNC"> 12 : throw std::logic_error(ENSEMBLE_NOT_FITTED);</span></span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> : }</span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 214 : return predict_voting ? predict_average_voting(X) : predict_average_proba(X);</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> : }</span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> <span class="tlaGNC"> 28 : std::vector<int> Ensemble::predict(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> : {</span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 28 : auto res = predict_proba(X);</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> <span class="tlaGNC"> 40 : return compute_arg_max(res);</span></span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> <span class="tlaGNC"> 20 : }</span></span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 218 : torch::Tensor Ensemble::predict(torch::Tensor& X)</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> : {</span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> <span class="tlaGNC"> 218 : auto res = predict_proba(X);</span></span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC"> 420 : return compute_arg_max(res);</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> <span class="tlaGNC"> 210 : }</span></span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> <span class="tlaGNC"> 148 : torch::Tensor Ensemble::predict_average_proba(torch::Tensor& X)</span></span>
|
||||
<span id="L85"><span class="lineNum"> 85</span> : {</span>
|
||||
<span id="L86"><span class="lineNum"> 86</span> <span class="tlaGNC"> 148 : auto n_states = models[0]->getClassNumStates();</span></span>
|
||||
<span id="L87"><span class="lineNum"> 87</span> <span class="tlaGNC"> 148 : torch::Tensor y_pred = torch::zeros({ X.size(1), n_states }, torch::kFloat32);</span></span>
|
||||
<span id="L88"><span class="lineNum"> 88</span> <span class="tlaGNC"> 148 : auto threads{ std::vector<std::thread>() };</span></span>
|
||||
<span id="L89"><span class="lineNum"> 89</span> <span class="tlaGNC"> 148 : std::mutex mtx;</span></span>
|
||||
<span id="L90"><span class="lineNum"> 90</span> <span class="tlaGNC"> 882 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L91"><span class="lineNum"> 91</span> <span class="tlaGNC"> 734 : threads.push_back(std::thread([&, i]() {</span></span>
|
||||
<span id="L92"><span class="lineNum"> 92</span> <span class="tlaGNC"> 734 : auto ypredict = models[i]->predict_proba(X);</span></span>
|
||||
<span id="L93"><span class="lineNum"> 93</span> <span class="tlaGNC"> 734 : std::lock_guard<std::mutex> lock(mtx);</span></span>
|
||||
<span id="L94"><span class="lineNum"> 94</span> <span class="tlaGNC"> 734 : y_pred += ypredict * significanceModels[i];</span></span>
|
||||
<span id="L95"><span class="lineNum"> 95</span> <span class="tlaGNC"> 734 : }));</span></span>
|
||||
<span id="L96"><span class="lineNum"> 96</span> : }</span>
|
||||
<span id="L97"><span class="lineNum"> 97</span> <span class="tlaGNC"> 882 : for (auto& thread : threads) {</span></span>
|
||||
<span id="L98"><span class="lineNum"> 98</span> <span class="tlaGNC"> 734 : thread.join();</span></span>
|
||||
<span id="L99"><span class="lineNum"> 99</span> : }</span>
|
||||
<span id="L100"><span class="lineNum"> 100</span> <span class="tlaGNC"> 148 : auto sum = std::reduce(significanceModels.begin(), significanceModels.end());</span></span>
|
||||
<span id="L101"><span class="lineNum"> 101</span> <span class="tlaGNC"> 148 : y_pred /= sum;</span></span>
|
||||
<span id="L102"><span class="lineNum"> 102</span> <span class="tlaGNC"> 296 : return y_pred;</span></span>
|
||||
<span id="L103"><span class="lineNum"> 103</span> <span class="tlaGNC"> 148 : }</span></span>
|
||||
<span id="L104"><span class="lineNum"> 104</span> <span class="tlaGNC"> 18 : std::vector<std::vector<double>> Ensemble::predict_average_proba(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L105"><span class="lineNum"> 105</span> : {</span>
|
||||
<span id="L106"><span class="lineNum"> 106</span> <span class="tlaGNC"> 18 : auto n_states = models[0]->getClassNumStates();</span></span>
|
||||
<span id="L107"><span class="lineNum"> 107</span> <span class="tlaGNC"> 18 : std::vector<std::vector<double>> y_pred(X[0].size(), std::vector<double>(n_states, 0.0));</span></span>
|
||||
<span id="L108"><span class="lineNum"> 108</span> <span class="tlaGNC"> 18 : auto threads{ std::vector<std::thread>() };</span></span>
|
||||
<span id="L109"><span class="lineNum"> 109</span> <span class="tlaGNC"> 18 : std::mutex mtx;</span></span>
|
||||
<span id="L110"><span class="lineNum"> 110</span> <span class="tlaGNC"> 140 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L111"><span class="lineNum"> 111</span> <span class="tlaGNC"> 122 : threads.push_back(std::thread([&, i]() {</span></span>
|
||||
<span id="L112"><span class="lineNum"> 112</span> <span class="tlaGNC"> 122 : auto ypredict = models[i]->predict_proba(X);</span></span>
|
||||
<span id="L113"><span class="lineNum"> 113</span> <span class="tlaGNC"> 122 : assert(ypredict.size() == y_pred.size());</span></span>
|
||||
<span id="L114"><span class="lineNum"> 114</span> <span class="tlaGNC"> 122 : assert(ypredict[0].size() == y_pred[0].size());</span></span>
|
||||
<span id="L115"><span class="lineNum"> 115</span> <span class="tlaGNC"> 122 : std::lock_guard<std::mutex> lock(mtx);</span></span>
|
||||
<span id="L116"><span class="lineNum"> 116</span> : // Multiply each prediction by the significance of the model and then add it to the final prediction</span>
|
||||
<span id="L117"><span class="lineNum"> 117</span> <span class="tlaGNC"> 24182 : for (auto j = 0; j < ypredict.size(); ++j) {</span></span>
|
||||
<span id="L118"><span class="lineNum"> 118</span> <span class="tlaGNC"> 24060 : std::transform(y_pred[j].begin(), y_pred[j].end(), ypredict[j].begin(), y_pred[j].begin(),</span></span>
|
||||
<span id="L119"><span class="lineNum"> 119</span> <span class="tlaGNC"> 154020 : [significanceModels = significanceModels[i]](double x, double y) { return x + y * significanceModels; });</span></span>
|
||||
<span id="L120"><span class="lineNum"> 120</span> : }</span>
|
||||
<span id="L121"><span class="lineNum"> 121</span> <span class="tlaGNC"> 122 : }));</span></span>
|
||||
<span id="L122"><span class="lineNum"> 122</span> : }</span>
|
||||
<span id="L123"><span class="lineNum"> 123</span> <span class="tlaGNC"> 140 : for (auto& thread : threads) {</span></span>
|
||||
<span id="L124"><span class="lineNum"> 124</span> <span class="tlaGNC"> 122 : thread.join();</span></span>
|
||||
<span id="L125"><span class="lineNum"> 125</span> : }</span>
|
||||
<span id="L126"><span class="lineNum"> 126</span> <span class="tlaGNC"> 18 : auto sum = std::reduce(significanceModels.begin(), significanceModels.end());</span></span>
|
||||
<span id="L127"><span class="lineNum"> 127</span> : //Divide each element of the prediction by the sum of the significances</span>
|
||||
<span id="L128"><span class="lineNum"> 128</span> <span class="tlaGNC"> 3358 : for (auto j = 0; j < y_pred.size(); ++j) {</span></span>
|
||||
<span id="L129"><span class="lineNum"> 129</span> <span class="tlaGNC"> 19780 : std::transform(y_pred[j].begin(), y_pred[j].end(), y_pred[j].begin(), [sum](double x) { return x / sum; });</span></span>
|
||||
<span id="L130"><span class="lineNum"> 130</span> : }</span>
|
||||
<span id="L131"><span class="lineNum"> 131</span> <span class="tlaGNC"> 36 : return y_pred;</span></span>
|
||||
<span id="L132"><span class="lineNum"> 132</span> <span class="tlaGNC"> 18 : }</span></span>
|
||||
<span id="L133"><span class="lineNum"> 133</span> <span class="tlaGNC"> 14 : std::vector<std::vector<double>> Ensemble::predict_average_voting(std::vector<std::vector<int>>& X)</span></span>
|
||||
<span id="L134"><span class="lineNum"> 134</span> : {</span>
|
||||
<span id="L135"><span class="lineNum"> 135</span> <span class="tlaGNC"> 14 : torch::Tensor Xt = bayesnet::vectorToTensor(X, false);</span></span>
|
||||
<span id="L136"><span class="lineNum"> 136</span> <span class="tlaGNC"> 14 : auto y_pred = predict_average_voting(Xt);</span></span>
|
||||
<span id="L137"><span class="lineNum"> 137</span> <span class="tlaGNC"> 14 : std::vector<std::vector<double>> result = tensorToVectorDouble(y_pred);</span></span>
|
||||
<span id="L138"><span class="lineNum"> 138</span> <span class="tlaGNC"> 28 : return result;</span></span>
|
||||
<span id="L139"><span class="lineNum"> 139</span> <span class="tlaGNC"> 14 : }</span></span>
|
||||
<span id="L140"><span class="lineNum"> 140</span> <span class="tlaGNC"> 80 : torch::Tensor Ensemble::predict_average_voting(torch::Tensor& X)</span></span>
|
||||
<span id="L141"><span class="lineNum"> 141</span> : {</span>
|
||||
<span id="L142"><span class="lineNum"> 142</span> : // Build a m x n_models tensor with the predictions of each model</span>
|
||||
<span id="L143"><span class="lineNum"> 143</span> <span class="tlaGNC"> 80 : torch::Tensor y_pred = torch::zeros({ X.size(1), n_models }, torch::kInt32);</span></span>
|
||||
<span id="L144"><span class="lineNum"> 144</span> <span class="tlaGNC"> 80 : auto threads{ std::vector<std::thread>() };</span></span>
|
||||
<span id="L145"><span class="lineNum"> 145</span> <span class="tlaGNC"> 80 : std::mutex mtx;</span></span>
|
||||
<span id="L146"><span class="lineNum"> 146</span> <span class="tlaGNC"> 616 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L147"><span class="lineNum"> 147</span> <span class="tlaGNC"> 536 : threads.push_back(std::thread([&, i]() {</span></span>
|
||||
<span id="L148"><span class="lineNum"> 148</span> <span class="tlaGNC"> 536 : auto ypredict = models[i]->predict(X);</span></span>
|
||||
<span id="L149"><span class="lineNum"> 149</span> <span class="tlaGNC"> 536 : std::lock_guard<std::mutex> lock(mtx);</span></span>
|
||||
<span id="L150"><span class="lineNum"> 150</span> <span class="tlaGNC"> 1608 : y_pred.index_put_({ "...", i }, ypredict);</span></span>
|
||||
<span id="L151"><span class="lineNum"> 151</span> <span class="tlaGNC"> 1072 : }));</span></span>
|
||||
<span id="L152"><span class="lineNum"> 152</span> : }</span>
|
||||
<span id="L153"><span class="lineNum"> 153</span> <span class="tlaGNC"> 616 : for (auto& thread : threads) {</span></span>
|
||||
<span id="L154"><span class="lineNum"> 154</span> <span class="tlaGNC"> 536 : thread.join();</span></span>
|
||||
<span id="L155"><span class="lineNum"> 155</span> : }</span>
|
||||
<span id="L156"><span class="lineNum"> 156</span> <span class="tlaGNC"> 160 : return voting(y_pred);</span></span>
|
||||
<span id="L157"><span class="lineNum"> 157</span> <span class="tlaGNC"> 80 : }</span></span>
|
||||
<span id="L158"><span class="lineNum"> 158</span> <span class="tlaGNC"> 40 : float Ensemble::score(torch::Tensor& X, torch::Tensor& y)</span></span>
|
||||
<span id="L159"><span class="lineNum"> 159</span> : {</span>
|
||||
<span id="L160"><span class="lineNum"> 160</span> <span class="tlaGNC"> 40 : auto y_pred = predict(X);</span></span>
|
||||
<span id="L161"><span class="lineNum"> 161</span> <span class="tlaGNC"> 36 : int correct = 0;</span></span>
|
||||
<span id="L162"><span class="lineNum"> 162</span> <span class="tlaGNC"> 11292 : for (int i = 0; i < y_pred.size(0); ++i) {</span></span>
|
||||
<span id="L163"><span class="lineNum"> 163</span> <span class="tlaGNC"> 11256 : if (y_pred[i].item<int>() == y[i].item<int>()) {</span></span>
|
||||
<span id="L164"><span class="lineNum"> 164</span> <span class="tlaGNC"> 9834 : correct++;</span></span>
|
||||
<span id="L165"><span class="lineNum"> 165</span> : }</span>
|
||||
<span id="L166"><span class="lineNum"> 166</span> : }</span>
|
||||
<span id="L167"><span class="lineNum"> 167</span> <span class="tlaGNC"> 72 : return (double)correct / y_pred.size(0);</span></span>
|
||||
<span id="L168"><span class="lineNum"> 168</span> <span class="tlaGNC"> 36 : }</span></span>
|
||||
<span id="L169"><span class="lineNum"> 169</span> <span class="tlaGNC"> 20 : float Ensemble::score(std::vector<std::vector<int>>& X, std::vector<int>& y)</span></span>
|
||||
<span id="L170"><span class="lineNum"> 170</span> : {</span>
|
||||
<span id="L171"><span class="lineNum"> 171</span> <span class="tlaGNC"> 20 : auto y_pred = predict(X);</span></span>
|
||||
<span id="L172"><span class="lineNum"> 172</span> <span class="tlaGNC"> 16 : int correct = 0;</span></span>
|
||||
<span id="L173"><span class="lineNum"> 173</span> <span class="tlaGNC"> 4292 : for (int i = 0; i < y_pred.size(); ++i) {</span></span>
|
||||
<span id="L174"><span class="lineNum"> 174</span> <span class="tlaGNC"> 4276 : if (y_pred[i] == y[i]) {</span></span>
|
||||
<span id="L175"><span class="lineNum"> 175</span> <span class="tlaGNC"> 3574 : correct++;</span></span>
|
||||
<span id="L176"><span class="lineNum"> 176</span> : }</span>
|
||||
<span id="L177"><span class="lineNum"> 177</span> : }</span>
|
||||
<span id="L178"><span class="lineNum"> 178</span> <span class="tlaGNC"> 32 : return (double)correct / y_pred.size();</span></span>
|
||||
<span id="L179"><span class="lineNum"> 179</span> <span class="tlaGNC"> 16 : }</span></span>
|
||||
<span id="L180"><span class="lineNum"> 180</span> <span class="tlaGNC"> 2 : std::vector<std::string> Ensemble::show() const</span></span>
|
||||
<span id="L181"><span class="lineNum"> 181</span> : {</span>
|
||||
<span id="L182"><span class="lineNum"> 182</span> <span class="tlaGNC"> 2 : auto result = std::vector<std::string>();</span></span>
|
||||
<span id="L183"><span class="lineNum"> 183</span> <span class="tlaGNC"> 10 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L184"><span class="lineNum"> 184</span> <span class="tlaGNC"> 8 : auto res = models[i]->show();</span></span>
|
||||
<span id="L185"><span class="lineNum"> 185</span> <span class="tlaGNC"> 8 : result.insert(result.end(), res.begin(), res.end());</span></span>
|
||||
<span id="L186"><span class="lineNum"> 186</span> <span class="tlaGNC"> 8 : }</span></span>
|
||||
<span id="L187"><span class="lineNum"> 187</span> <span class="tlaGNC"> 2 : return result;</span></span>
|
||||
<span id="L188"><span class="lineNum"> 188</span> <span class="tlaUNC tlaBgUNC"> 0 : }</span></span>
|
||||
<span id="L189"><span class="lineNum"> 189</span> <span class="tlaGNC tlaBgGNC"> 6 : std::vector<std::string> Ensemble::graph(const std::string& title) const</span></span>
|
||||
<span id="L190"><span class="lineNum"> 190</span> : {</span>
|
||||
<span id="L191"><span class="lineNum"> 191</span> <span class="tlaGNC"> 6 : auto result = std::vector<std::string>();</span></span>
|
||||
<span id="L192"><span class="lineNum"> 192</span> <span class="tlaGNC"> 40 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L193"><span class="lineNum"> 193</span> <span class="tlaGNC"> 34 : auto res = models[i]->graph(title + "_" + std::to_string(i));</span></span>
|
||||
<span id="L194"><span class="lineNum"> 194</span> <span class="tlaGNC"> 34 : result.insert(result.end(), res.begin(), res.end());</span></span>
|
||||
<span id="L195"><span class="lineNum"> 195</span> <span class="tlaGNC"> 34 : }</span></span>
|
||||
<span id="L196"><span class="lineNum"> 196</span> <span class="tlaGNC"> 6 : return result;</span></span>
|
||||
<span id="L197"><span class="lineNum"> 197</span> <span class="tlaUNC tlaBgUNC"> 0 : }</span></span>
|
||||
<span id="L198"><span class="lineNum"> 198</span> <span class="tlaGNC tlaBgGNC"> 12 : int Ensemble::getNumberOfNodes() const</span></span>
|
||||
<span id="L199"><span class="lineNum"> 199</span> : {</span>
|
||||
<span id="L200"><span class="lineNum"> 200</span> <span class="tlaGNC"> 12 : int nodes = 0;</span></span>
|
||||
<span id="L201"><span class="lineNum"> 201</span> <span class="tlaGNC"> 100 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L202"><span class="lineNum"> 202</span> <span class="tlaGNC"> 88 : nodes += models[i]->getNumberOfNodes();</span></span>
|
||||
<span id="L203"><span class="lineNum"> 203</span> : }</span>
|
||||
<span id="L204"><span class="lineNum"> 204</span> <span class="tlaGNC"> 12 : return nodes;</span></span>
|
||||
<span id="L205"><span class="lineNum"> 205</span> : }</span>
|
||||
<span id="L206"><span class="lineNum"> 206</span> <span class="tlaGNC"> 12 : int Ensemble::getNumberOfEdges() const</span></span>
|
||||
<span id="L207"><span class="lineNum"> 207</span> : {</span>
|
||||
<span id="L208"><span class="lineNum"> 208</span> <span class="tlaGNC"> 12 : int edges = 0;</span></span>
|
||||
<span id="L209"><span class="lineNum"> 209</span> <span class="tlaGNC"> 100 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L210"><span class="lineNum"> 210</span> <span class="tlaGNC"> 88 : edges += models[i]->getNumberOfEdges();</span></span>
|
||||
<span id="L211"><span class="lineNum"> 211</span> : }</span>
|
||||
<span id="L212"><span class="lineNum"> 212</span> <span class="tlaGNC"> 12 : return edges;</span></span>
|
||||
<span id="L213"><span class="lineNum"> 213</span> : }</span>
|
||||
<span id="L214"><span class="lineNum"> 214</span> <span class="tlaGNC"> 2 : int Ensemble::getNumberOfStates() const</span></span>
|
||||
<span id="L215"><span class="lineNum"> 215</span> : {</span>
|
||||
<span id="L216"><span class="lineNum"> 216</span> <span class="tlaGNC"> 2 : int nstates = 0;</span></span>
|
||||
<span id="L217"><span class="lineNum"> 217</span> <span class="tlaGNC"> 10 : for (auto i = 0; i < n_models; ++i) {</span></span>
|
||||
<span id="L218"><span class="lineNum"> 218</span> <span class="tlaGNC"> 8 : nstates += models[i]->getNumberOfStates();</span></span>
|
||||
<span id="L219"><span class="lineNum"> 219</span> : }</span>
|
||||
<span id="L220"><span class="lineNum"> 220</span> <span class="tlaGNC"> 2 : return nstates;</span></span>
|
||||
<span id="L221"><span class="lineNum"> 221</span> : }</span>
|
||||
<span id="L222"><span class="lineNum"> 222</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/ensembles/Ensemble.h.func-c.html
Normal file
110
html/BayesNet/bayesnet/ensembles/Ensemble.h.func-c.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.h<span style="font-size: 80%;"> (<a href="Ensemble.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">75.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="Ensemble.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L32">_ZNK8bayesnet8Ensemble8dump_cptB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L28">_ZN8bayesnet8Ensemble17topological_orderB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
110
html/BayesNet/bayesnet/ensembles/Ensemble.h.func.html
Normal file
110
html/BayesNet/bayesnet/ensembles/Ensemble.h.func.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.h<span style="font-size: 80%;"> (<a href="Ensemble.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">75.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="Ensemble.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L28">_ZN8bayesnet8Ensemble17topological_orderB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">6</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="Ensemble.h.gcov.html#L16">_ZN8bayesnet8EnsembleD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="Ensemble.h.gcov.html#L32">_ZNK8bayesnet8Ensemble8dump_cptB5cxx11Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">4</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
129
html/BayesNet/bayesnet/ensembles/Ensemble.h.gcov.html
Normal file
129
html/BayesNet/bayesnet/ensembles/Ensemble.h.gcov.html
Normal file
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles/Ensemble.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/ensembles</a> - Ensemble.h<span style="font-size: 80%;"> (source / <a href="Ensemble.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
<td class="headerCovTableEntry">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryMed">75.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef ENSEMBLE_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define ENSEMBLE_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include "bayesnet/utils/BayesMetrics.h"</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : #include "bayesnet/classifiers/Classifier.h"</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : namespace bayesnet {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : class Ensemble : public Classifier {</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : public:</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : Ensemble(bool predict_voting = true);</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC tlaBgGNC"> 56 : virtual ~Ensemble() = default;</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : torch::Tensor predict(torch::Tensor& X) override;</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : std::vector<int> predict(std::vector<std::vector<int>>& X) override;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : torch::Tensor predict_proba(torch::Tensor& X) override;</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : std::vector<std::vector<double>> predict_proba(std::vector<std::vector<int>>& X) override;</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : float score(torch::Tensor& X, torch::Tensor& y) override;</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : float score(std::vector<std::vector<int>>& X, std::vector<int>& y) override;</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : int getNumberOfNodes() const override;</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : int getNumberOfEdges() const override;</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : int getNumberOfStates() const override;</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : std::vector<std::string> show() const override;</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> : std::vector<std::string> graph(const std::string& title) const override;</span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 6 : std::vector<std::string> topological_order() override</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : {</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 6 : return std::vector<std::string>();</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : }</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 4 : std::string dump_cpt() const override</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : {</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 8 : return "";</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : }</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : protected:</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : torch::Tensor predict_average_voting(torch::Tensor& X);</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : std::vector<std::vector<double>> predict_average_voting(std::vector<std::vector<int>>& X);</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : torch::Tensor predict_average_proba(torch::Tensor& X);</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : std::vector<std::vector<double>> predict_average_proba(std::vector<std::vector<int>>& X);</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> : torch::Tensor compute_arg_max(torch::Tensor& X);</span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> : std::vector<int> compute_arg_max(std::vector<std::vector<double>>& X);</span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : torch::Tensor voting(torch::Tensor& votes);</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : unsigned n_models;</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : std::vector<std::unique_ptr<Classifier>> models;</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : std::vector<double> significanceModels;</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : void trainModel(const torch::Tensor& weights) override;</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : bool predict_voting;</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> : };</span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> : }</span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
189
html/BayesNet/bayesnet/ensembles/index-sort-f.html
Normal file
189
html/BayesNet/bayesnet/ensembles/index-sort-f.html
Normal file
@ -0,0 +1,189 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/ensembles</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.4 %</td>
|
||||
<td class="headerCovTableEntry">443</td>
|
||||
<td class="headerCovTableEntry">436</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">53</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><a href="index.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><a href="index-sort-l.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.h.gcov.html">Ensemble.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverPerMed">75.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.h.gcov.html">AODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.h.gcov.html">AODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.h.gcov.html">BoostAODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.cc.gcov.html">AODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.cc.gcov.html">AODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.cc.gcov.html">BoostAODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.3%"><img src="../../../snow.png" width=2 height=10 alt="98.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.3 %</td>
|
||||
<td class="coverNumDflt">237</td>
|
||||
<td class="coverNumDflt">233</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.cc.gcov.html">Ensemble.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.1%"><img src="../../../snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.1 %</td>
|
||||
<td class="coverNumDflt">154</td>
|
||||
<td class="coverNumDflt">151</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
189
html/BayesNet/bayesnet/ensembles/index-sort-l.html
Normal file
189
html/BayesNet/bayesnet/ensembles/index-sort-l.html
Normal file
@ -0,0 +1,189 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/ensembles</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.4 %</td>
|
||||
<td class="headerCovTableEntry">443</td>
|
||||
<td class="headerCovTableEntry">436</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">53</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><a href="index.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><a href="index-sort-f.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.cc.gcov.html">Ensemble.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.1%"><img src="../../../snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.1 %</td>
|
||||
<td class="coverNumDflt">154</td>
|
||||
<td class="coverNumDflt">151</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.cc.gcov.html">BoostAODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.3%"><img src="../../../snow.png" width=2 height=10 alt="98.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.3 %</td>
|
||||
<td class="coverNumDflt">237</td>
|
||||
<td class="coverNumDflt">233</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.h.gcov.html">AODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.h.gcov.html">AODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.h.gcov.html">BoostAODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.h.gcov.html">Ensemble.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverPerMed">75.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.cc.gcov.html">AODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.cc.gcov.html">AODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
189
html/BayesNet/bayesnet/ensembles/index.html
Normal file
189
html/BayesNet/bayesnet/ensembles/index.html
Normal file
@ -0,0 +1,189 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/ensembles</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - BayesNet/bayesnet/ensembles</td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">98.4 %</td>
|
||||
<td class="headerCovTableEntry">443</td>
|
||||
<td class="headerCovTableEntry">436</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">98.1 %</td>
|
||||
<td class="headerCovTableEntry">53</td>
|
||||
<td class="headerCovTableEntry">52</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table width="80%" cellpadding=1 cellspacing=1 border=0>
|
||||
|
||||
<tr>
|
||||
<td width="40%"><br></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
<td width="8%"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="tableHead" rowspan=2>Filename <span title="Click to sort table by file name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by file name" title="Click to sort table by file name" border=0></span></td>
|
||||
<td class="tableHead" colspan=4>Line Coverage <span title="Click to sort table by line coverage" class="tableHeadSort"><a href="index-sort-l.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by line coverage" title="Click to sort table by line coverage" border=0></a></span></td>
|
||||
<td class="tableHead" colspan=3>Function Coverage <span title="Click to sort table by function coverage" class="tableHeadSort"><a href="index-sort-f.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function coverage" title="Click to sort table by function coverage" border=0></a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableHead" colspan=2> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
<td class="tableHead"> Rate</td>
|
||||
<td class="tableHead"> Total</td>
|
||||
<td class="tableHead"> Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.cc.gcov.html">AODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverNumDflt">20</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODE.h.gcov.html">AODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.cc.gcov.html">AODELd.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverNumDflt">24</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="AODELd.h.gcov.html">AODELd.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.cc.gcov.html">BoostAODE.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.3%"><img src="../../../snow.png" width=2 height=10 alt="98.3%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.3 %</td>
|
||||
<td class="coverNumDflt">237</td>
|
||||
<td class="coverNumDflt">233</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
<td class="coverNumDflt">9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="BoostAODE.h.gcov.html">BoostAODE.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverNumDflt">1</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
<td class="coverNumDflt">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.cc.gcov.html">Ensemble.cc</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=98 height=10 alt="98.1%"><img src="../../../snow.png" width=2 height=10 alt="98.1%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">98.1 %</td>
|
||||
<td class="coverNumDflt">154</td>
|
||||
<td class="coverNumDflt">151</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
<td class="coverNumDflt">25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFile"><a href="Ensemble.h.gcov.html">Ensemble.h</a></td>
|
||||
<td class="coverBar" align="center">
|
||||
<table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="../../../emerald.png" width=100 height=10 alt="100.0%"></td></tr></table>
|
||||
</td>
|
||||
<td class="coverPerHi">100.0 %</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverNumDflt">5</td>
|
||||
<td class="coverPerMed">75.0 %</td>
|
||||
<td class="coverNumDflt">4</td>
|
||||
<td class="coverNumDflt">3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
89
html/BayesNet/bayesnet/feature_selection/CFS.cc.func-c.html
Normal file
89
html/BayesNet/bayesnet/feature_selection/CFS.cc.func-c.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.cc<span style="font-size: 80%;"> (<a href="CFS.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.8 %</td>
|
||||
<td class="headerCovTableEntry">45</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="CFS.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.cc.gcov.html#L9">_ZN8bayesnet3CFS3fitEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.cc.gcov.html#L43">_ZN8bayesnet3CFS24computeContinueConditionERKSt6vectorIiSaIiEE</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
89
html/BayesNet/bayesnet/feature_selection/CFS.cc.func.html
Normal file
89
html/BayesNet/bayesnet/feature_selection/CFS.cc.func.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.cc<span style="font-size: 80%;"> (<a href="CFS.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.8 %</td>
|
||||
<td class="headerCovTableEntry">45</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="CFS.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.cc.gcov.html#L43">_ZN8bayesnet3CFS24computeContinueConditionERKSt6vectorIiSaIiEE</a></td>
|
||||
|
||||
<td class="coverFnHi">56</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.cc.gcov.html#L9">_ZN8bayesnet3CFS3fitEv</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
154
html/BayesNet/bayesnet/feature_selection/CFS.cc.gcov.html
Normal file
154
html/BayesNet/bayesnet/feature_selection/CFS.cc.gcov.html
Normal file
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.cc<span style="font-size: 80%;"> (source / <a href="CFS.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">97.8 %</td>
|
||||
<td class="headerCovTableEntry">45</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include <limits></span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "CFS.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : namespace bayesnet {</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 12 : void CFS::fit()</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> <span class="tlaGNC"> 12 : initialize();</span></span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 12 : computeSuLabels();</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 12 : auto featureOrder = argsort(suLabels); // sort descending order</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 12 : auto continueCondition = true;</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 12 : auto feature = featureOrder[0];</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 12 : selectedFeatures.push_back(feature);</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 12 : selectedScores.push_back(suLabels[feature]);</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 12 : featureOrder.erase(featureOrder.begin());</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 68 : while (continueCondition) {</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 56 : double merit = std::numeric_limits<double>::lowest();</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 56 : int bestFeature = -1;</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 328 : for (auto feature : featureOrder) {</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> <span class="tlaGNC"> 272 : selectedFeatures.push_back(feature);</span></span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : // Compute merit with selectedFeatures</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 272 : auto meritNew = computeMeritCFS();</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> <span class="tlaGNC"> 272 : if (meritNew > merit) {</span></span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 114 : merit = meritNew;</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 114 : bestFeature = feature;</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> : }</span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 272 : selectedFeatures.pop_back();</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : }</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 56 : if (bestFeature == -1) {</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> : // meritNew has to be nan due to constant features</span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaUNC tlaBgUNC"> 0 : break;</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : }</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> <span class="tlaGNC tlaBgGNC"> 56 : selectedFeatures.push_back(bestFeature);</span></span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 56 : selectedScores.push_back(merit);</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 56 : featureOrder.erase(remove(featureOrder.begin(), featureOrder.end(), bestFeature), featureOrder.end());</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 56 : continueCondition = computeContinueCondition(featureOrder);</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : }</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 12 : fitted = true;</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 12 : }</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaGNC"> 56 : bool CFS::computeContinueCondition(const std::vector<int>& featureOrder)</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : {</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> <span class="tlaGNC"> 56 : if (selectedFeatures.size() == maxFeatures || featureOrder.size() == 0) {</span></span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> <span class="tlaGNC"> 2 : return false;</span></span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> : }</span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> <span class="tlaGNC"> 54 : if (selectedScores.size() >= 5) {</span></span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> : /*</span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> : "To prevent the best first search from exploring the entire</span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> : feature subset search space, a stopping criterion is imposed.</span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> : The search will terminate if five consecutive fully expanded</span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> : subsets show no improvement over the current best subset."</span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : as stated in Mark A.Hall Thesis</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> : */</span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> <span class="tlaGNC"> 20 : double item_ant = std::numeric_limits<double>::lowest();</span></span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 20 : int num = 0;</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> <span class="tlaGNC"> 20 : std::vector<double> lastFive(selectedScores.end() - 5, selectedScores.end());</span></span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 80 : for (auto item : lastFive) {</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> <span class="tlaGNC"> 70 : if (item_ant == std::numeric_limits<double>::lowest()) {</span></span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 20 : item_ant = item;</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> : }</span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 70 : if (item > item_ant) {</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> <span class="tlaGNC"> 10 : break;</span></span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> : } else {</span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 60 : num++;</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> <span class="tlaGNC"> 60 : item_ant = item;</span></span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> : }</span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> : }</span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 20 : if (num == 5) {</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> <span class="tlaGNC"> 10 : return false;</span></span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> : }</span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> <span class="tlaGNC"> 20 : }</span></span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> <span class="tlaGNC"> 44 : return true;</span></span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> : }</span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/feature_selection/CFS.h.func-c.html
Normal file
103
html/BayesNet/bayesnet/feature_selection/CFS.h.func-c.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.h<span style="font-size: 80%;"> (<a href="CFS.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="CFS.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.h.gcov.html#L14">_ZN8bayesnet3CFSC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">24</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
103
html/BayesNet/bayesnet/feature_selection/CFS.h.func.html
Normal file
103
html/BayesNet/bayesnet/feature_selection/CFS.h.func.html
Normal file
@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.h<span style="font-size: 80%;"> (<a href="CFS.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="CFS.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.h.gcov.html#L14">_ZN8bayesnet3CFSC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_</a></td>
|
||||
|
||||
<td class="coverFnHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">24</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="CFS.h.gcov.html#L18">_ZN8bayesnet3CFSD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">12</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
102
html/BayesNet/bayesnet/feature_selection/CFS.h.gcov.html
Normal file
102
html/BayesNet/bayesnet/feature_selection/CFS.h.gcov.html
Normal file
@ -0,0 +1,102 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/CFS.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - CFS.h<span style="font-size: 80%;"> (source / <a href="CFS.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
<td class="headerCovTableEntry">4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
<td class="headerCovTableEntry">3</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef CFS_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define CFS_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include <vector></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "bayesnet/feature_selection/FeatureSelect.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class CFS : public FeatureSelect {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : public:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC tlaBgGNC"> 12 : 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) :</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 12 : FeatureSelect(samples, features, className, maxFeatures, classNumStates, weights)</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : {</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 12 : }</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 24 : virtual ~CFS() {};</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : void fit() override;</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : private:</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : bool computeContinueCondition(const std::vector<int>& featureOrder);</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : };</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : }</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
89
html/BayesNet/bayesnet/feature_selection/FCBF.cc.func-c.html
Normal file
89
html/BayesNet/bayesnet/feature_selection/FCBF.cc.func-c.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.cc<span style="font-size: 80%;"> (<a href="FCBF.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">92.3 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="FCBF.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.cc.gcov.html#L16">_ZN8bayesnet4FCBF3fitEv</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.cc.gcov.html#L9">_ZN8bayesnet4FCBFC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_d</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
89
html/BayesNet/bayesnet/feature_selection/FCBF.cc.func.html
Normal file
89
html/BayesNet/bayesnet/feature_selection/FCBF.cc.func.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.cc<span style="font-size: 80%;"> (<a href="FCBF.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">92.3 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="FCBF.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.cc.gcov.html#L16">_ZN8bayesnet4FCBF3fitEv</a></td>
|
||||
|
||||
<td class="coverFnHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.cc.gcov.html#L9">_ZN8bayesnet4FCBFC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_d</a></td>
|
||||
|
||||
<td class="coverFnHi">14</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
126
html/BayesNet/bayesnet/feature_selection/FCBF.cc.gcov.html
Normal file
126
html/BayesNet/bayesnet/feature_selection/FCBF.cc.gcov.html
Normal file
@ -0,0 +1,126 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.cc<span style="font-size: 80%;"> (source / <a href="FCBF.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">92.3 %</td>
|
||||
<td class="headerCovTableEntry">26</td>
|
||||
<td class="headerCovTableEntry">24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include "FCBF.h"</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : namespace bayesnet {</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : </span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 14 : 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) :</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 14 : FeatureSelect(samples, features, className, maxFeatures, classNumStates, weights), threshold(threshold)</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> <span class="tlaGNC"> 14 : if (threshold < 1e-7) {</span></span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 4 : throw std::invalid_argument("Threshold cannot be less than 1e-7");</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : }</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC"> 14 : }</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 10 : void FCBF::fit()</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : {</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 10 : initialize();</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 10 : computeSuLabels();</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> <span class="tlaGNC"> 10 : auto featureOrder = argsort(suLabels); // sort descending order</span></span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> <span class="tlaGNC"> 10 : auto featureOrderCopy = featureOrder;</span></span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> <span class="tlaGNC"> 84 : for (const auto& feature : featureOrder) {</span></span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : // Don't self compare</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> <span class="tlaGNC"> 74 : featureOrderCopy.erase(featureOrderCopy.begin());</span></span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> <span class="tlaGNC"> 74 : if (suLabels.at(feature) == 0.0) {</span></span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : // The feature has been removed from the list</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 32 : continue;</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> : }</span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 42 : if (suLabels.at(feature) < threshold) {</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaUNC tlaBgUNC"> 0 : break;</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> : }</span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> : // Remove redundant features</span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC tlaBgGNC"> 232 : for (const auto& featureCopy : featureOrderCopy) {</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 190 : double value = computeSuFeatures(feature, featureCopy);</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> <span class="tlaGNC"> 190 : if (value >= suLabels.at(featureCopy)) {</span></span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : // Remove feature from list</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> <span class="tlaGNC"> 66 : suLabels[featureCopy] = 0.0;</span></span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> : }</span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> : }</span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> <span class="tlaGNC"> 42 : selectedFeatures.push_back(feature);</span></span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 42 : selectedScores.push_back(suLabels[feature]);</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 42 : if (selectedFeatures.size() == maxFeatures) {</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> <span class="tlaUNC tlaBgUNC"> 0 : break;</span></span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : }</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : }</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> <span class="tlaGNC tlaBgGNC"> 10 : fitted = true;</span></span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> <span class="tlaGNC"> 10 : }</span></span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/feature_selection/FCBF.h.func-c.html
Normal file
96
html/BayesNet/bayesnet/feature_selection/FCBF.h.func-c.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.h<span style="font-size: 80%;"> (<a href="FCBF.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="FCBF.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">20</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
96
html/BayesNet/bayesnet/feature_selection/FCBF.h.func.html
Normal file
96
html/BayesNet/bayesnet/feature_selection/FCBF.h.func.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.h<span style="font-size: 80%;"> (<a href="FCBF.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="FCBF.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">20</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FCBF.h.gcov.html#L15">_ZN8bayesnet4FCBFD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">10</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
99
html/BayesNet/bayesnet/feature_selection/FCBF.h.gcov.html
Normal file
99
html/BayesNet/bayesnet/feature_selection/FCBF.h.gcov.html
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FCBF.h</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FCBF.h<span style="font-size: 80%;"> (source / <a href="FCBF.h.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #ifndef FCBF_H</span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #define FCBF_H</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include <torch/torch.h></span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : #include <vector></span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> : #include "bayesnet/feature_selection/FeatureSelect.h"</span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> : namespace bayesnet {</span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : class FCBF : public FeatureSelect {</span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : public:</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> : // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector</span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> : 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);</span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> <span class="tlaGNC tlaBgGNC"> 20 : virtual ~FCBF() {};</span></span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> : void fit() override;</span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> : private:</span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> : double threshold = -1;</span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> : };</span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : }</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : #endif</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,131 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FeatureSelect.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FeatureSelect.cc<span style="font-size: 80%;"> (<a href="FeatureSelect.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">95.5 %</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
<td class="headerCovTableEntry">42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="FeatureSelect.cc.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L14">_ZN8bayesnet13FeatureSelect10initializeEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L34">_ZN8bayesnet13FeatureSelect15computeSuLabelsEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L68">_ZNK8bayesnet13FeatureSelect11getFeaturesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L75">_ZNK8bayesnet13FeatureSelect9getScoresEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L9">_ZN8bayesnet13FeatureSelectC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L55">_ZN8bayesnet13FeatureSelect15computeMeritCFSEv</a></td>
|
||||
|
||||
<td class="coverFnHi">316</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L19">_ZN8bayesnet13FeatureSelect22symmetricalUncertaintyEii</a></td>
|
||||
|
||||
<td class="coverFnHi">822</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L42">_ZN8bayesnet13FeatureSelect17computeSuFeaturesEii</a></td>
|
||||
|
||||
<td class="coverFnHi">1960</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,131 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FeatureSelect.cc - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FeatureSelect.cc<span style="font-size: 80%;"> (<a href="FeatureSelect.cc.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">95.5 %</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
<td class="headerCovTableEntry">42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="FeatureSelect.cc.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L14">_ZN8bayesnet13FeatureSelect10initializeEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L55">_ZN8bayesnet13FeatureSelect15computeMeritCFSEv</a></td>
|
||||
|
||||
<td class="coverFnHi">316</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L34">_ZN8bayesnet13FeatureSelect15computeSuLabelsEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L42">_ZN8bayesnet13FeatureSelect17computeSuFeaturesEii</a></td>
|
||||
|
||||
<td class="coverFnHi">1960</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L19">_ZN8bayesnet13FeatureSelect22symmetricalUncertaintyEii</a></td>
|
||||
|
||||
<td class="coverFnHi">822</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L9">_ZN8bayesnet13FeatureSelectC2ERKN2at6TensorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EERKSB_iiS4_</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L68">_ZNK8bayesnet13FeatureSelect11getFeaturesEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.cc.gcov.html#L75">_ZNK8bayesnet13FeatureSelect9getScoresEv</a></td>
|
||||
|
||||
<td class="coverFnHi">32</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,160 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FeatureSelect.cc</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FeatureSelect.cc<span style="font-size: 80%;"> (source / <a href="FeatureSelect.cc.func-c.html">functions</a>)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">95.5 %</td>
|
||||
<td class="headerCovTableEntry">44</td>
|
||||
<td class="headerCovTableEntry">42</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
<td class="headerCovTableEntry">8</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 border=0>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="sourceHeading"> Line data Source code</pre>
|
||||
<pre class="source">
|
||||
<span id="L1"><span class="lineNum"> 1</span> : // ***************************************************************</span>
|
||||
<span id="L2"><span class="lineNum"> 2</span> : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez</span>
|
||||
<span id="L3"><span class="lineNum"> 3</span> : // SPDX-FileType: SOURCE</span>
|
||||
<span id="L4"><span class="lineNum"> 4</span> : // SPDX-License-Identifier: MIT</span>
|
||||
<span id="L5"><span class="lineNum"> 5</span> : // ***************************************************************</span>
|
||||
<span id="L6"><span class="lineNum"> 6</span> : </span>
|
||||
<span id="L7"><span class="lineNum"> 7</span> : #include <limits></span>
|
||||
<span id="L8"><span class="lineNum"> 8</span> : #include "bayesnet/utils/bayesnetUtils.h"</span>
|
||||
<span id="L9"><span class="lineNum"> 9</span> : #include "FeatureSelect.h"</span>
|
||||
<span id="L10"><span class="lineNum"> 10</span> : namespace bayesnet {</span>
|
||||
<span id="L11"><span class="lineNum"> 11</span> <span class="tlaGNC tlaBgGNC"> 44 : 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) :</span></span>
|
||||
<span id="L12"><span class="lineNum"> 12</span> <span class="tlaGNC"> 44 : Metrics(samples, features, className, classNumStates), maxFeatures(maxFeatures == 0 ? samples.size(0) - 1 : maxFeatures), weights(weights)</span></span>
|
||||
<span id="L13"><span class="lineNum"> 13</span> : </span>
|
||||
<span id="L14"><span class="lineNum"> 14</span> : {</span>
|
||||
<span id="L15"><span class="lineNum"> 15</span> <span class="tlaGNC"> 44 : }</span></span>
|
||||
<span id="L16"><span class="lineNum"> 16</span> <span class="tlaGNC"> 32 : void FeatureSelect::initialize()</span></span>
|
||||
<span id="L17"><span class="lineNum"> 17</span> : {</span>
|
||||
<span id="L18"><span class="lineNum"> 18</span> <span class="tlaGNC"> 32 : selectedFeatures.clear();</span></span>
|
||||
<span id="L19"><span class="lineNum"> 19</span> <span class="tlaGNC"> 32 : selectedScores.clear();</span></span>
|
||||
<span id="L20"><span class="lineNum"> 20</span> <span class="tlaGNC"> 32 : }</span></span>
|
||||
<span id="L21"><span class="lineNum"> 21</span> <span class="tlaGNC"> 822 : double FeatureSelect::symmetricalUncertainty(int a, int b)</span></span>
|
||||
<span id="L22"><span class="lineNum"> 22</span> : {</span>
|
||||
<span id="L23"><span class="lineNum"> 23</span> : /*</span>
|
||||
<span id="L24"><span class="lineNum"> 24</span> : Compute symmetrical uncertainty. Normalize* information gain (mutual</span>
|
||||
<span id="L25"><span class="lineNum"> 25</span> : information) with the entropies of the features in order to compensate</span>
|
||||
<span id="L26"><span class="lineNum"> 26</span> : the bias due to high cardinality features. *Range [0, 1]</span>
|
||||
<span id="L27"><span class="lineNum"> 27</span> : (https://www.sciencedirect.com/science/article/pii/S0020025519303603)</span>
|
||||
<span id="L28"><span class="lineNum"> 28</span> : */</span>
|
||||
<span id="L29"><span class="lineNum"> 29</span> <span class="tlaGNC"> 2466 : auto x = samples.index({ a, "..." });</span></span>
|
||||
<span id="L30"><span class="lineNum"> 30</span> <span class="tlaGNC"> 2466 : auto y = samples.index({ b, "..." });</span></span>
|
||||
<span id="L31"><span class="lineNum"> 31</span> <span class="tlaGNC"> 822 : auto mu = mutualInformation(x, y, weights);</span></span>
|
||||
<span id="L32"><span class="lineNum"> 32</span> <span class="tlaGNC"> 822 : auto hx = entropy(x, weights);</span></span>
|
||||
<span id="L33"><span class="lineNum"> 33</span> <span class="tlaGNC"> 822 : auto hy = entropy(y, weights);</span></span>
|
||||
<span id="L34"><span class="lineNum"> 34</span> <span class="tlaGNC"> 822 : return 2.0 * mu / (hx + hy);</span></span>
|
||||
<span id="L35"><span class="lineNum"> 35</span> <span class="tlaGNC"> 2466 : }</span></span>
|
||||
<span id="L36"><span class="lineNum"> 36</span> <span class="tlaGNC"> 32 : void FeatureSelect::computeSuLabels()</span></span>
|
||||
<span id="L37"><span class="lineNum"> 37</span> : {</span>
|
||||
<span id="L38"><span class="lineNum"> 38</span> : // Compute Simmetrical Uncertainty between features and labels</span>
|
||||
<span id="L39"><span class="lineNum"> 39</span> : // https://en.wikipedia.org/wiki/Symmetric_uncertainty</span>
|
||||
<span id="L40"><span class="lineNum"> 40</span> <span class="tlaGNC"> 270 : for (int i = 0; i < features.size(); ++i) {</span></span>
|
||||
<span id="L41"><span class="lineNum"> 41</span> <span class="tlaGNC"> 238 : suLabels.push_back(symmetricalUncertainty(i, -1));</span></span>
|
||||
<span id="L42"><span class="lineNum"> 42</span> : }</span>
|
||||
<span id="L43"><span class="lineNum"> 43</span> <span class="tlaGNC"> 32 : }</span></span>
|
||||
<span id="L44"><span class="lineNum"> 44</span> <span class="tlaGNC"> 1960 : double FeatureSelect::computeSuFeatures(const int firstFeature, const int secondFeature)</span></span>
|
||||
<span id="L45"><span class="lineNum"> 45</span> : {</span>
|
||||
<span id="L46"><span class="lineNum"> 46</span> : // Compute Simmetrical Uncertainty between features</span>
|
||||
<span id="L47"><span class="lineNum"> 47</span> : // https://en.wikipedia.org/wiki/Symmetric_uncertainty</span>
|
||||
<span id="L48"><span class="lineNum"> 48</span> : try {</span>
|
||||
<span id="L49"><span class="lineNum"> 49</span> <span class="tlaGNC"> 1960 : return suFeatures.at({ firstFeature, secondFeature });</span></span>
|
||||
<span id="L50"><span class="lineNum"> 50</span> : }</span>
|
||||
<span id="L51"><span class="lineNum"> 51</span> <span class="tlaGNC"> 584 : catch (const std::out_of_range& e) {</span></span>
|
||||
<span id="L52"><span class="lineNum"> 52</span> <span class="tlaGNC"> 584 : double result = symmetricalUncertainty(firstFeature, secondFeature);</span></span>
|
||||
<span id="L53"><span class="lineNum"> 53</span> <span class="tlaGNC"> 584 : suFeatures[{firstFeature, secondFeature}] = result;</span></span>
|
||||
<span id="L54"><span class="lineNum"> 54</span> <span class="tlaGNC"> 584 : return result;</span></span>
|
||||
<span id="L55"><span class="lineNum"> 55</span> <span class="tlaGNC"> 584 : }</span></span>
|
||||
<span id="L56"><span class="lineNum"> 56</span> : }</span>
|
||||
<span id="L57"><span class="lineNum"> 57</span> <span class="tlaGNC"> 316 : double FeatureSelect::computeMeritCFS()</span></span>
|
||||
<span id="L58"><span class="lineNum"> 58</span> : {</span>
|
||||
<span id="L59"><span class="lineNum"> 59</span> <span class="tlaGNC"> 316 : double rcf = 0;</span></span>
|
||||
<span id="L60"><span class="lineNum"> 60</span> <span class="tlaGNC"> 1454 : for (auto feature : selectedFeatures) {</span></span>
|
||||
<span id="L61"><span class="lineNum"> 61</span> <span class="tlaGNC"> 1138 : rcf += suLabels[feature];</span></span>
|
||||
<span id="L62"><span class="lineNum"> 62</span> : }</span>
|
||||
<span id="L63"><span class="lineNum"> 63</span> <span class="tlaGNC"> 316 : double rff = 0;</span></span>
|
||||
<span id="L64"><span class="lineNum"> 64</span> <span class="tlaGNC"> 316 : int n = selectedFeatures.size();</span></span>
|
||||
<span id="L65"><span class="lineNum"> 65</span> <span class="tlaGNC"> 2086 : for (const auto& item : doCombinations(selectedFeatures)) {</span></span>
|
||||
<span id="L66"><span class="lineNum"> 66</span> <span class="tlaGNC"> 1770 : rff += computeSuFeatures(item.first, item.second);</span></span>
|
||||
<span id="L67"><span class="lineNum"> 67</span> <span class="tlaGNC"> 316 : }</span></span>
|
||||
<span id="L68"><span class="lineNum"> 68</span> <span class="tlaGNC"> 316 : return rcf / sqrt(n + (n * n - n) * rff);</span></span>
|
||||
<span id="L69"><span class="lineNum"> 69</span> : }</span>
|
||||
<span id="L70"><span class="lineNum"> 70</span> <span class="tlaGNC"> 32 : std::vector<int> FeatureSelect::getFeatures() const</span></span>
|
||||
<span id="L71"><span class="lineNum"> 71</span> : {</span>
|
||||
<span id="L72"><span class="lineNum"> 72</span> <span class="tlaGNC"> 32 : if (!fitted) {</span></span>
|
||||
<span id="L73"><span class="lineNum"> 73</span> <span class="tlaUNC tlaBgUNC"> 0 : throw std::runtime_error("FeatureSelect not fitted");</span></span>
|
||||
<span id="L74"><span class="lineNum"> 74</span> : }</span>
|
||||
<span id="L75"><span class="lineNum"> 75</span> <span class="tlaGNC tlaBgGNC"> 32 : return selectedFeatures;</span></span>
|
||||
<span id="L76"><span class="lineNum"> 76</span> : }</span>
|
||||
<span id="L77"><span class="lineNum"> 77</span> <span class="tlaGNC"> 32 : std::vector<double> FeatureSelect::getScores() const</span></span>
|
||||
<span id="L78"><span class="lineNum"> 78</span> : {</span>
|
||||
<span id="L79"><span class="lineNum"> 79</span> <span class="tlaGNC"> 32 : if (!fitted) {</span></span>
|
||||
<span id="L80"><span class="lineNum"> 80</span> <span class="tlaUNC tlaBgUNC"> 0 : throw std::runtime_error("FeatureSelect not fitted");</span></span>
|
||||
<span id="L81"><span class="lineNum"> 81</span> : }</span>
|
||||
<span id="L82"><span class="lineNum"> 82</span> <span class="tlaGNC tlaBgGNC"> 32 : return selectedScores;</span></span>
|
||||
<span id="L83"><span class="lineNum"> 83</span> : }</span>
|
||||
<span id="L84"><span class="lineNum"> 84</span> : }</span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FeatureSelect.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FeatureSelect.h<span style="font-size: 80%;"> (<a href="FeatureSelect.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryLo">50.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="FeatureSelect.h.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>LCOV - coverage.info - BayesNet/bayesnet/feature_selection/FeatureSelect.h - functions</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../gcov.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="title">LCOV - code coverage report</td></tr>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<table cellpadding=1 border=0 width="100%">
|
||||
<tr>
|
||||
<td width="10%" class="headerItem">Current view:</td>
|
||||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">BayesNet/bayesnet/feature_selection</a> - FeatureSelect.h<span style="font-size: 80%;"> (<a href="FeatureSelect.h.gcov.html">source</a> / functions)</span></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%"></td>
|
||||
<td width="5%" class="headerCovTableHead">Coverage</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
|
||||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test:</td>
|
||||
<td class="headerValue">coverage.info</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Lines:</td>
|
||||
<td class="headerCovTableEntryHi">100.0 %</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="headerItem">Test Date:</td>
|
||||
<td class="headerValue">2024-04-30 13:17:26</td>
|
||||
<td></td>
|
||||
<td class="headerItem">Functions:</td>
|
||||
<td class="headerCovTableEntryLo">50.0 %</td>
|
||||
<td class="headerCovTableEntry">2</td>
|
||||
<td class="headerCovTableEntry">1</td>
|
||||
</tr>
|
||||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table cellpadding=1 cellspacing=1 border=0>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></span></td>
|
||||
|
||||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><a href="FeatureSelect.h.func-c.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></a></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFn"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD0Ev</a></td>
|
||||
|
||||
<td class="coverFnHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD0Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasLo">0</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="coverFnAlias"><a href="FeatureSelect.h.gcov.html#L15">_ZN8bayesnet13FeatureSelectD2Ev</a></td>
|
||||
|
||||
<td class="coverFnAliasHi">44</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</center>
|
||||
<table width="100%" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
|
||||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user