Add XBAODE & XSPODE from bayesnet

This commit is contained in:
2025-03-09 19:20:51 +01:00
parent ae7b89b134
commit 664a6a5aeb
8 changed files with 302 additions and 49 deletions

View File

@@ -12,10 +12,10 @@
#include <algorithm>
#include <limits>
#include "common/Timer.hpp"
#include "ExpClf.h"
#include "ExpEnsemble.h"
namespace platform {
class XBAODE {
class XBAODE : public Boost {
// Hay que hacer un vector de modelos entrenados y hacer un predict ensemble con todos ellos
// Probar XA1DE con smooth original y laplace y comprobar diferencias si se pasan pesos a 1 o a 1/m
@@ -25,10 +25,10 @@ namespace platform {
protected:
void trainModel(const torch::Tensor& weights, const bayesnet::Smoothing_t smoothing) override;
private:
void add_model(std::unique_ptr<XSpode> model);
void remove_last_model();
std::vector<std::vector<int>> X_train_, X_test_;
std::vector<int> y_train_, y_test_;
torch::Tensor dataset;
int n_models;
std::string version = "0.9.7";
};
}