#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 "core/object/reference.h" #include #include class MLPPBernoulliNB : public Reference { GDCLASS(MLPPBernoulliNB, Reference); 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(); protected: void compute_vocab(); void compute_theta(); void evaluate(); static void _bind_methods(); // 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 */