#ifndef MLPP_BERNOULLI_NB_H #define MLPP_BERNOULLI_NB_H // // BernoulliNB.hpp // // Created by Marc Melikyan on 1/17/21. // #include "core/math/math_defs.h" #include #include class MLPPBernoulliNB { public: std::vector model_set_test(std::vector> X); real_t model_test(std::vector x); real_t score(); MLPPBernoulliNB(std::vector> p_input_set, std::vector p_output_set); MLPPBernoulliNB(); ~MLPPBernoulliNB(); private: void compute_vocab(); void compute_theta(); void evaluate(); // Model Params real_t _prior_1; real_t _prior_0; std::vector> _theta; std::vector _vocab; int _class_num; // Datasets std::vector> _input_set; std::vector _output_set; std::vector _y_hat; }; #endif /* BernoulliNB_hpp */