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-10-14 11:12:04 +00:00
|
|
|
#ifndef FCBF_H
|
|
|
|
#define FCBF_H
|
|
|
|
#include <torch/torch.h>
|
|
|
|
#include <vector>
|
2024-03-08 21:20:54 +00:00
|
|
|
#include "bayesnet/feature_selection/FeatureSelect.h"
|
2023-10-14 11:12:04 +00:00
|
|
|
namespace bayesnet {
|
|
|
|
class FCBF : public FeatureSelect {
|
|
|
|
public:
|
2023-11-08 17:45:35 +00:00
|
|
|
// dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
|
|
|
|
FCBF(const torch::Tensor& samples, const std::vector<std::string>& features, const std::string& className, const int maxFeatures, const int classNumStates, const torch::Tensor& weights, const double threshold);
|
2023-10-14 11:12:04 +00:00
|
|
|
virtual ~FCBF() {};
|
|
|
|
void fit() override;
|
|
|
|
private:
|
|
|
|
double threshold = -1;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|