pmlpp/mlpp/gaussian_nb/gaussian_nb.h

39 lines
713 B
C
Raw Normal View History

2023-01-24 18:57:18 +01:00
#ifndef MLPP_GAUSSIAN_NB_H
#define MLPP_GAUSSIAN_NB_H
//
// GaussianNB.hpp
//
// Created by Marc Melikyan on 1/17/21.
//
2023-01-27 13:01:16 +01:00
#include "core/math/math_defs.h"
#include <vector>
2023-01-24 19:20:18 +01:00
2023-01-25 00:21:31 +01:00
class MLPPGaussianNB {
2023-01-24 19:00:54 +01:00
public:
2023-01-27 13:01:16 +01:00
MLPPGaussianNB(std::vector<std::vector<real_t>> inputSet, std::vector<real_t> outputSet, int class_num);
std::vector<real_t> modelSetTest(std::vector<std::vector<real_t>> X);
real_t modelTest(std::vector<real_t> x);
real_t score();
2023-01-24 19:00:54 +01:00
private:
void Evaluate();
int class_num;
2023-01-27 13:01:16 +01:00
std::vector<real_t> priors;
std::vector<real_t> mu;
std::vector<real_t> sigma;
2023-01-24 19:00:54 +01:00
2023-01-27 13:01:16 +01:00
std::vector<std::vector<real_t>> inputSet;
std::vector<real_t> outputSet;
2023-01-24 19:00:54 +01:00
2023-01-27 13:01:16 +01:00
std::vector<real_t> y_hat;
2023-01-24 19:00:54 +01:00
};
#endif /* GaussianNB_hpp */