Refactor Network and create Metrics class

This commit is contained in:
2023-07-11 22:23:49 +02:00
parent c7e2042c6e
commit d1eaab6408
7 changed files with 137 additions and 190 deletions

View File

@@ -5,6 +5,7 @@
#include <getopt.h>
#include "ArffFiles.h"
#include "Network.h"
#include "Metrics.hpp"
#include "CPPFImdlp.h"
@@ -230,6 +231,7 @@ int main(int argc, char** argv)
cout << "BayesNet version: " << network.version() << endl;
unsigned int nthreads = std::thread::hardware_concurrency();
cout << "Computer has " << nthreads << " cores." << endl;
cout << "conditionalEdgeWeight " << endl << network.conditionalEdgeWeight() << endl;
auto metrics = bayesnet::Metrics(network.getSamples(), features, className, network.getClassNumStates());
cout << "conditionalEdgeWeight " << endl << metrics.conditionalEdgeWeight() << endl;
return 0;
}