Line data Source code
1 : // ***************************************************************
2 : // SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
3 : // SPDX-FileType: SOURCE
4 : // SPDX-License-Identifier: MIT
5 : // ***************************************************************
6 :
7 : #ifndef FCBF_H
8 : #define FCBF_H
9 : #include <torch/torch.h>
10 : #include <vector>
11 : #include "bayesnet/feature_selection/FeatureSelect.h"
12 : namespace bayesnet {
13 : class FCBF : public FeatureSelect {
14 : public:
15 : // dataset is a n+1xm tensor of integers where dataset[-1] is the y std::vector
16 : 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);
17 38 : virtual ~FCBF() {};
18 : void fit() override;
19 : private:
20 : double threshold = -1;
21 : };
22 : }
23 : #endif
|