Add KDBNew fix computeCPT error
This commit is contained in:
@@ -146,6 +146,11 @@ namespace platform {
|
||||
auto y_test = y.index({ test_t });
|
||||
cout << nfold + 1 << ", " << flush;
|
||||
clf->fit(X_train, y_train, features, className, states);
|
||||
cout << endl;
|
||||
auto lines = clf->show();
|
||||
for (auto line : lines) {
|
||||
cout << line << endl;
|
||||
}
|
||||
nodes[item] = clf->getNumberOfNodes();
|
||||
edges[item] = clf->getNumberOfEdges();
|
||||
num_states[item] = clf->getNumberOfStates();
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include "KDB.h"
|
||||
#include "SPODE.h"
|
||||
#include "TANNew.h"
|
||||
#include "KDBNew.h"
|
||||
namespace platform {
|
||||
class Models {
|
||||
private:
|
||||
|
@@ -8,6 +8,8 @@ static platform::Registrar registrarS("SPODE",
|
||||
[](void) -> bayesnet::BaseClassifier* { return new bayesnet::SPODE(2);});
|
||||
static platform::Registrar registrarK("KDB",
|
||||
[](void) -> bayesnet::BaseClassifier* { return new bayesnet::KDB(2);});
|
||||
static platform::Registrar registrarKN("KDBNew",
|
||||
[](void) -> bayesnet::BaseClassifier* { return new bayesnet::KDBNew(2);});
|
||||
static platform::Registrar registrarA("AODE",
|
||||
[](void) -> bayesnet::BaseClassifier* { return new bayesnet::AODE();});
|
||||
#endif
|
Reference in New Issue
Block a user