#ifndef MLPP_BERNOULLI_NB_H #define MLPP_BERNOULLI_NB_H // // BernoulliNB.hpp // // Created by Marc Melikyan on 1/17/21. // #include #include class BernoulliNB { public: BernoulliNB(std::vector> inputSet, std::vector outputSet); std::vector modelSetTest(std::vector> X); double modelTest(std::vector x); double score(); private: void computeVocab(); void computeTheta(); void Evaluate(); // Model Params double prior_1 = 0; double prior_0 = 0; std::vector> theta; std::vector vocab; int class_num; // Datasets std::vector> inputSet; std::vector outputSet; std::vector y_hat; }; #endif /* BernoulliNB_hpp */