Check result with KDB(k=3)

Same experiment with KDB(k=3), dataset glass, from bayesclass & bayesnet
Had same result 0.841121
This commit is contained in:
2023-07-05 20:45:21 +02:00
parent a0114da70c
commit b9201cfeea
3 changed files with 11 additions and 5 deletions

View File

@@ -213,7 +213,13 @@ int main(int argc, char** argv)
map<string, int> maxes;
tie(Xd, maxes) = discretize(X, y, features);
maxes[className] = *max_element(y.begin(), y.end()) + 1;
// Build Network
cout << "Features: ";
for (auto feature : features) {
cout << "[" << feature << "] ";
}
cout << endl;
cout << "Class name: " << className << endl;
// Build Network
auto network = bayesnet::Network();
build_network(network, network_name, maxes);
network.fit(Xd, y, features, className);