2024-04-11 16:02:49 +00:00
|
|
|
// ***************************************************************
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
|
|
|
|
// SPDX-FileType: SOURCE
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// ***************************************************************
|
|
|
|
|
2023-08-05 21:23:31 +00:00
|
|
|
#ifndef SPODELD_H
|
|
|
|
#define SPODELD_H
|
|
|
|
#include "SPODE.h"
|
|
|
|
#include "Proposal.h"
|
|
|
|
|
|
|
|
namespace bayesnet {
|
|
|
|
class SPODELd : public SPODE, public Proposal {
|
|
|
|
public:
|
|
|
|
explicit SPODELd(int root);
|
|
|
|
virtual ~SPODELd() = default;
|
2023-11-08 17:45:35 +00:00
|
|
|
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;
|
|
|
|
SPODELd& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states) override;
|
2024-04-07 00:08:37 +00:00
|
|
|
SPODELd& commonFit(const std::vector<std::string>& features, const std::string& className, map<std::string, std::vector<int>>& states);
|
2023-11-08 17:45:35 +00:00
|
|
|
std::vector<std::string> graph(const std::string& name = "SPODE") const override;
|
|
|
|
torch::Tensor predict(torch::Tensor& X) override;
|
|
|
|
static inline std::string version() { return "0.0.1"; };
|
2023-08-05 21:23:31 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // !SPODELD_H
|