Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
drhowey committed Dec 11, 2020
1 parent 660a5f5 commit 4a2b812
Show file tree
Hide file tree
Showing 18 changed files with 93 additions and 82 deletions.
3 changes: 2 additions & 1 deletion src/Analysis.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down Expand Up @@ -685,6 +685,7 @@ bool Analysis::processOption(string & option)
else if(option == "-impute-estimate-recall-precision-output-sim-data-file") getLatestImputeEstimateRecallPrecisionTask()->setSimDataFilename(getStringOptionValue());
else if(option == "-impute-estimate-recall-precision-output-sim-network-file") getLatestImputeEstimateRecallPrecisionTask()->setSimNetworkFilename(getStringOptionValue());
else if(option == "-calculate-recall-precision") {CalculateRecallPrecisionTask * crpt = new CalculateRecallPrecisionTask(); calculateRecallPrecisionTasks.push_back(crpt); orderedTasks.push_back(crpt);}
else if(option == "-calculate-recall-precision-name") getLatestImputeEstimateRecallPrecisionTask()->setTaskName(getStringOptionValue());
else if(option == "-calculate-recall-precision-network-name") getLatestCalculateRecallPrecisionTask()->setNetworkName(getStringOptionValue());
else if(option == "-calculate-recall-precision-true-network-name") getLatestCalculateRecallPrecisionTask()->setTrueNetworkName(getStringOptionValue());
else if(option == "-calculate-recall-precision-file") getLatestCalculateRecallPrecisionTask()->setFilename(getStringOptionValue());
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Data.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Data.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Model.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Model.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
21 changes: 11 additions & 10 deletions src/Network.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down Expand Up @@ -750,31 +750,31 @@ void Network::updateBlackWhiteDifferentData(Network * network, const string & pr
set<unsigned int> otherWhiteNodes = network->getWhiteNodes();
for(set<unsigned int>::const_iterator own = otherWhiteNodes.begin(); own != otherWhiteNodes.end(); ++own)
{
nodeName1 = preNodeName + network->getNetworkNode(*own)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(*own)->getName();
addWhiteNode(nodeName1);
};

set<unsigned int> otherBlackNodes = network->getBlackNodes();
for(set<unsigned int>::const_iterator obn = otherBlackNodes.begin(); obn != otherBlackNodes.end(); ++obn)
{
nodeName1 = preNodeName + network->getNetworkNode(*obn)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(*obn)->getName();
addBlackNode(nodeName1);
};

set<pair<unsigned int, unsigned int> > otherWhiteEdges = network->getWhiteEdges();
for(set<pair<unsigned int, unsigned int> >::const_iterator owe = otherWhiteEdges.begin(); owe != otherWhiteEdges.end(); ++owe)
{
nodeName1 = preNodeName + network->getNetworkNode(owe->first)->getDisplayName();
nodeName2 = preNodeName + network->getNetworkNode(owe->second)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(owe->first)->getName();
nodeName2 = preNodeName + network->getNetworkNode(owe->second)->getName();

addWhiteEdge(nodeName1, nodeName2);
};

set<pair<unsigned int, unsigned int> > otherBlackEdges = network->getBlackEdges();
for(set<pair<unsigned int, unsigned int> >::const_iterator obe = otherBlackEdges.begin(); obe != otherBlackEdges.end(); ++obe)
{
nodeName1 = preNodeName + network->getNetworkNode(obe->first)->getDisplayName();
nodeName2 = preNodeName + network->getNetworkNode(obe->second)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(obe->first)->getName();
nodeName2 = preNodeName + network->getNetworkNode(obe->second)->getName();
addBlackEdge(nodeName1, nodeName2);
};

Expand All @@ -783,14 +783,14 @@ void Network::updateBlackWhiteDifferentData(Network * network, const string & pr
set<unsigned int> otherNoParents = network->getNoParentsNodes();
for(set<unsigned int>::const_iterator op = otherNoParents.begin(); op != otherNoParents.end(); ++op)
{
nodeName1 = preNodeName + network->getNetworkNode(*op)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(*op)->getName();
addNoParentsNode(nodeName1);
};

set<unsigned int> otherNoChildren = network->getNoChildrenNodes();
for(set<unsigned int>::const_iterator oc = otherNoChildren.begin(); oc != otherNoChildren.end(); ++oc)
{
nodeName1 = preNodeName + network->getNetworkNode(*oc)->getDisplayName();
nodeName1 = preNodeName + network->getNetworkNode(*oc)->getName();
addNoChildrenNode(nodeName1);
};

Expand Down Expand Up @@ -4840,7 +4840,8 @@ void Network::calcRecallPrecision(Network * otherNetwork, double & recallOrPreci
};

//add to prev recall as may be taking ave later
recallOrPrecision += edgesFound/totalEdges;
if(totalEdges != 0) recallOrPrecision += edgesFound / totalEdges;
else recallOrPrecision += 1;
};

//! Copies missingness pattern to the other network data from the corresponding network nodes of this network.
Expand Down
2 changes: 1 addition & 1 deletion src/Network.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Nodes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Nodes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Search.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
2 changes: 1 addition & 1 deletion src/Search.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************
* BayesNetty, version 1.1
* BayesNetty, version 1.1.1
* Copyright 2015-present,
* Richard Howey
* Institute of Genetic Medicine, Newcastle University
Expand Down
Loading

0 comments on commit 4a2b812

Please sign in to comment.