1 #ifndef PROBABILISTIC_MODEL_H_ 2 #define PROBABILISTIC_MODEL_H_ 6 #include "clang/AST/ASTContext.h" 8 #include <mlpack/core.hpp> 9 #include <mlpack/methods/decision_tree/decision_tree.hpp> 11 using DDElement = llvm::PointerUnion<clang::Decl *, clang::Stmt *>;
20 void train(
int Iteration);
24 std::vector<DDElementVector> &Chunks);
27 arma::mat TrainingSet;
28 arma::Row<size_t> TrainingLabels;
29 mlpack::tree::DecisionTree<> MyDecisionTree;
33 void printVector(arma::mat FeatureVector,
bool Label);
36 #endif // PROBABILISTIC_MODEL_H_ Represents the probabilistic model that is utilized in the reduction phase.
Definition: ProbabilisticModel.h:15
void addForTraining(DDElementVector &Source, DDElementVector &Chunk, bool Label)
Definition: ProbabilisticModel.cpp:41
arma::uvec sortCandidates(DDElementVector &Source, std::vector< DDElementVector > &Chunks)
Definition: ProbabilisticModel.cpp:55
std::vector< DDElement > DDElementVector
Definition: ProbabilisticModel.h:12
ProbabilisticModel()
Definition: ProbabilisticModel.h:17
void clear()
Definition: ProbabilisticModel.cpp:21
void train(int Iteration)
Definition: ProbabilisticModel.cpp:28
void initialize(DDElementVector &Source)
Definition: ProbabilisticModel.cpp:13
llvm::PointerUnion< clang::Decl *, clang::Stmt * > DDElement
Definition: ProbabilisticModel.h:11