nct.networkblast.score
Class LogLikelihoodScoreModel<NodeType extends java.lang.Comparable<? super NodeType>>

java.lang.Object
  extended by nct.networkblast.score.LogLikelihoodScoreModel<NodeType>
All Implemented Interfaces:
ScoreModel<NodeType,java.lang.Double>

public class LogLikelihoodScoreModel<NodeType extends java.lang.Comparable<? super NodeType>>
extends java.lang.Object
implements ScoreModel<NodeType,java.lang.Double>

This class implements the log likelihood edge scoring scheme described in the supplemental to Sharan, et al., 2005, Conserved patterns of protein interaction in multiple species, PNAS, 102(6).


Constructor Summary
LogLikelihoodScoreModel(double truthFactor, double model, double backgroundProbability)
          Sets the truthFactor accordingly (ensures > 0) and initializes the graphMap object.
 
Method Summary
 double scoreEdge(NodeType srcNode, NodeType destNode, Graph<NodeType,java.lang.Double> graph)
          For the two nodes from the specified graph graph, return the log likelihood score between the complex model and the null model.
 double scoreNode(NodeType node, Graph<NodeType,java.lang.Double> g)
          Given a node from graph, this function will return the score of the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogLikelihoodScoreModel

public LogLikelihoodScoreModel(double truthFactor,
                               double model,
                               double backgroundProbability)
Sets the truthFactor accordingly (ensures > 0) and initializes the graphMap object.

Parameters:
truthFactor - factor used to consider the background truth distribution
model - Truth for the model (assumed between 0 and 1)
Method Detail

scoreEdge

public double scoreEdge(NodeType srcNode,
                        NodeType destNode,
                        Graph<NodeType,java.lang.Double> graph)
For the two nodes from the specified graph graph, return the log likelihood score between the complex model and the null model.

Specified by:
scoreEdge in interface ScoreModel<NodeType extends java.lang.Comparable<? super NodeType>,java.lang.Double>
Parameters:
srcNode - node bewteen which it and destNode generates a score
destNode - node between which it and srcNode generates a score
graph - graph containing both srcNode and destNode
Returns:
the score of the pathway between the nodes or 0 if the same node

scoreNode

public double scoreNode(NodeType node,
                        Graph<NodeType,java.lang.Double> g)
Description copied from interface: ScoreModel
Given a node from graph, this function will return the score of the node.

Specified by:
scoreNode in interface ScoreModel<NodeType extends java.lang.Comparable<? super NodeType>,java.lang.Double>
Parameters:
node - Node to score.
g - The graph that contains the node to score.
Returns:
The score for the node in the given graph.