Add test to 99.1%

This commit is contained in:
2025-03-14 18:55:29 +01:00
parent 400967b4e3
commit 70c7d3dd3d
4 changed files with 101 additions and 60 deletions

View File

@@ -3,7 +3,7 @@
// SPDX-FileType: SOURCE
// SPDX-License-Identifier: MIT
// ***************************************************************
#include "bayesnet/utils/bayesnetUtils.h"
#include "KDB.h"
namespace bayesnet {

View File

@@ -7,15 +7,14 @@
#ifndef KDB_H
#define KDB_H
#include <torch/torch.h>
#include "bayesnet/utils/bayesnetUtils.h"
#include "Classifier.h"
namespace bayesnet {
class KDB : public Classifier {
private:
int k;
float theta;
void add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights);
protected:
void add_m_edges(int idx, std::vector<int>& S, torch::Tensor& weights);
void buildModel(const torch::Tensor& weights) override;
public:
explicit KDB(int k, float theta = 0.03);
@@ -24,4 +23,4 @@ namespace bayesnet {
std::vector<std::string> graph(const std::string& name = "KDB") const override;
};
}
#endif
#endif