Complete TAN with Maximum Spanning Tree

This commit is contained in:
2023-07-15 18:31:50 +02:00
parent e311c27d43
commit e3863387bb
7 changed files with 172 additions and 10 deletions

View File

@@ -10,6 +10,7 @@
#include "KDB.h"
#include "SPODE.h"
#include "AODE.h"
#include "TAN.h"
using namespace std;
@@ -282,5 +283,13 @@ int main(int argc, char** argv)
}
cout << "Score: " << aode.score(Xd, y) << endl;
cout << "****************** AODE ******************" << endl;
cout << "****************** TAN ******************" << endl;
auto tan = bayesnet::TAN();
tan.fit(Xd, y, features, className, states);
for (auto line : tan.show()) {
cout << line << endl;
}
cout << "Score: " << tan.score(Xd, y) << endl;
cout << "****************** TAN ******************" << endl;
return 0;
}