Add comments to .net files
This commit is contained in:
parent
23f0b0f55c
commit
83080e2b56
@ -1,5 +1,5 @@
|
|||||||
class sepallength
|
class sepallength
|
||||||
class sepalwidth
|
class sepalwidth
|
||||||
class petallength
|
class petallength
|
||||||
class petalwidth
|
class petalwidth
|
||||||
petalwidth petallength
|
# petalwidth petallength
|
@ -174,6 +174,9 @@ void build_network(bayesnet::Network& network, string network_name, map<string,
|
|||||||
ifstream file(network_name);
|
ifstream file(network_name);
|
||||||
string line;
|
string line;
|
||||||
while (getline(file, line)) {
|
while (getline(file, line)) {
|
||||||
|
if (line[0] == '#') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
istringstream iss(line);
|
istringstream iss(line);
|
||||||
string parent, child;
|
string parent, child;
|
||||||
if (!(iss >> parent >> child)) {
|
if (!(iss >> parent >> child)) {
|
||||||
@ -214,8 +217,8 @@ int main(int argc, char** argv)
|
|||||||
network.fit(Xd, y, features, className);
|
network.fit(Xd, y, features, className);
|
||||||
cout << "Hello, Bayesian Networks!" << endl;
|
cout << "Hello, Bayesian Networks!" << endl;
|
||||||
showNodesInfo(network, className);
|
showNodesInfo(network, className);
|
||||||
// showCPDS(network);
|
showCPDS(network);
|
||||||
cout << "Score: " << network.score(Xd, y) << endl;
|
//cout << "Score: " << network.score(Xd, y) << endl;
|
||||||
cout << "PyTorch version: " << TORCH_VERSION << endl;
|
cout << "PyTorch version: " << TORCH_VERSION << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user