Biorithm
1.1
|
A subclass of MyOneVersusAllSinkSourceGainAlgo that implements a version of the SinkSource algorithm without negative examples. More...
#include <gain-algorithm.h>
Public Member Functions | |
MyOneVersusNoneSinkSourceGainAlgo (MyGainGraph &g, MyAnnotations &a, MyGainParams &p, Reporter &r, GeneOntology *go=NULL) | |
virtual | ~MyOneVersusNoneSinkSourceGainAlgo () |
The destructor. | |
virtual string | getName () |
virtual void | initialiseNodeStates (const BioFunction &function, MyNodeIdList &nodesToAnnotate) |
virtual void | setCrossValidationList (MyNodeIdList &nodesToAnnotate, const MyNodeIdList &cvList) |
Protected Member Functions | |
virtual void | _applyArtificialSink (const MyNode &node, MyNT &num, MyNT &den) |
A subclass of MyOneVersusAllSinkSourceGainAlgo that implements a version of the SinkSource algorithm without negative examples.
This algorithm computes node states that are either in HYPOTHETICAL_STATE or ANNOTATED_STATE. The old version inserted an artificial node with fixed reservoir of NOT_ANNOTATED_STATE into the graph, connecting it to all other nodes. The same functionality is now implemented mathematically in the parent class. This change was motivated by a bug that appeared when using edge weighting, but is also more conducive to future variations on the algorithm.
MyOneVersusNoneSinkSourceGainAlgo::MyOneVersusNoneSinkSourceGainAlgo | ( | MyGainGraph & | g, |
MyAnnotations & | a, | ||
MyGainParams & | p, | ||
Reporter & | r, | ||
GeneOntology * | go = NULL |
||
) | [inline] |
Constructor.
The constructor modifies the graph by adding an artificial node and connecting all other nodes to it with edges of the same weight.
virtual MyOneVersusNoneSinkSourceGainAlgo::~MyOneVersusNoneSinkSourceGainAlgo | ( | ) | [inline, virtual] |
The destructor.
The destructor undoes the artificial node and edges added by the constructor.
virtual string MyOneVersusNoneSinkSourceGainAlgo::getName | ( | ) | [inline, virtual] |
Return the name of the algorithm.
Reimplemented from MyOneVersusAllSinkSourceGainAlgo.
void MyOneVersusNoneSinkSourceGainAlgo::initialiseNodeStates | ( | const BioFunction & | function, |
MyNodeIdList & | nodesToAnnotate | ||
) | [virtual] |
Initialise the states of the nodes in the graph. Each node annotated with function gets the state ANNOTATED_STATE; these nodes are "clamped," i.e., the algorithm will not change their states. All other nodes get the state HYPOTHETICAL_STATE. The algorithm may change the states of these nodes. In other words, these nodes are not clamped. The argument nodesToAnnotate contains the IDs of the unclamped nodes.
For every node ID in nodes, "remember" its state information and clamp it, so that MyOneVersusNoneGainAlgo::run() can't modify the state of that node.
[in] | nodes,the | list of node whose initial state must be unmasked. |
Reimplemented from MyOneVersusAllSinkSourceGainAlgo.
void MyOneVersusNoneSinkSourceGainAlgo::setCrossValidationList | ( | MyNodeIdList & | nodesToAnnotate, |
const MyNodeIdList & | cvList | ||
) | [virtual] |
Given a list of unannotated nodes (nodesToAnnotate) and a list of nodes to cross validate (cvList),update nodesToAnnotate to include nodes in cvList, so that the annotation algorithm also annotates the nodes in cvList.
Reimplemented from MyAbstractGainAlgo< MyGainTriStateType >.