Files
BayesNet/docs/manual/_k_d_b_8h_source.html

9.8 KiB

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="clipboard.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="cookie.js"></script> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> </head>
BayesNet 1.0.5
Bayesian Network Classifiers using libtorch from scratch
<script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ var searchBox = new SearchBox("searchBox", "search/",'.html'); /* @license-end */ </script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function() { codefold.init(0); }); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function() { initMenu('',true,false,'search.php','Search',true); $(function() { init_search(); }); }); /* @license-end */ </script>
<script type="text/javascript"> /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function(){initNavTree('_k_d_b_8h_source.html',''); initResizable(true); }); /* @license-end */ </script>
Loading...
Searching...
No Matches
KDB.h
1// ***************************************************************
2// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
3// SPDX-FileType: SOURCE
4// SPDX-License-Identifier: MIT
5// ***************************************************************
6
7#ifndef KDB_H
8#define KDB_H
9#include <torch/torch.h>
10#include "bayesnet/utils/bayesnetUtils.h"
11#include "Classifier.h"
12namespace bayesnet {
13 class KDB : public Classifier {
14 private:
15 int k;
16 float theta;
17 void add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights);
18 protected:
19 void buildModel(const torch::Tensor& weights) override;
20 public:
21 explicit KDB(int k, float theta = 0.03);
22 virtual ~KDB() = default;
23 void setHyperparameters(const nlohmann::json& hyperparameters_) override;
24 std::vector<std::string> graph(const std::string& name = "KDB") const override;
25 };
26}
27#endif
</html>