Biorithm  1.1
Public Member Functions | Protected Member Functions
MyOneVersusNoneSinkSourceGainAlgo Class Reference

A subclass of MyOneVersusAllSinkSourceGainAlgo that implements a version of the SinkSource algorithm without negative examples. More...

#include <gain-algorithm.h>

Inheritance diagram for MyOneVersusNoneSinkSourceGainAlgo:
MyOneVersusAllSinkSourceGainAlgo MyOneVersusAllGainAlgo MyAbstractGainAlgo< MyGainTriStateType > MyReallyAbstractGainAlgo

List of all members.

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)

Detailed Description

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.

Note:

Constructor & Destructor Documentation

Constructor.

The constructor modifies the graph by adding an artificial node and connecting all other nodes to it with edges of the same weight.

The destructor.

The destructor undoes the artificial node and edges added by the constructor.


Member Function Documentation

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.

Parameters:
[in]nodes,thelist 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.

Warning:
Call this method only after invoking maskNodeStates().
Note:
This method is virtual since some algorithms can set nodesToAnnotate to be equal to cvList, for example, algorithms that use only one round of "guilt-by-association," where each node computes its state from the states of its neighbours.

Reimplemented from MyAbstractGainAlgo< MyGainTriStateType >.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends