Fix XA1DE integration
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#ifndef EXPCLF_H
|
||||
#define EXPCLF_H
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
@@ -18,16 +17,10 @@
|
||||
#include "Xaode.hpp"
|
||||
|
||||
namespace platform {
|
||||
|
||||
class ExpClf : public bayesnet::Boost {
|
||||
public:
|
||||
ExpClf();
|
||||
virtual ~ExpClf() = default;
|
||||
ExpClf& 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, const bayesnet::Smoothing_t smoothing) { return *this; };
|
||||
// X is nxm tensor, y is nx1 tensor
|
||||
ExpClf& 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, const bayesnet::Smoothing_t smoothing) { return *this; };
|
||||
ExpClf& fit(torch::Tensor& dataset, const std::vector<std::string>& features, const std::string& className, std::map<std::string, std::vector<int>>& states, const bayesnet::Smoothing_t smoothing) { return *this; };
|
||||
ExpClf& 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, const bayesnet::Smoothing_t smoothing) { return *this; };
|
||||
std::vector<int> predict(std::vector<std::vector<int>>& X) override;
|
||||
torch::Tensor predict(torch::Tensor& X) override;
|
||||
torch::Tensor predict_proba(torch::Tensor& X) override;
|
||||
@@ -46,8 +39,7 @@ namespace platform {
|
||||
bayesnet::status_t getStatus() const override { return status; }
|
||||
std::vector<std::string> getNotes() const override { return notes; }
|
||||
std::vector<std::string> graph(const std::string& title = "") const override { return {}; }
|
||||
void setHyperparameters(const nlohmann::json& hyperparameters) override;
|
||||
void set_active_parents(const std::vector<int> active_parents) { for (const auto& parent : active_parents) aode_.add_active_parent(parent); }
|
||||
void set_active_parents(const std::vector<int>& active_parents) { for (const auto& parent : active_parents) aode_.add_active_parent(parent); }
|
||||
void add_active_parent(int parent) { aode_.add_active_parent(parent); }
|
||||
void remove_last_parent() { aode_.remove_last_parent(); }
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user