netkit.classifiers
Class Estimate

java.lang.Object
  extended by netkit.classifiers.Estimate
All Implemented Interfaces:
java.lang.Iterable<Node>

public final class Estimate
extends java.lang.Object
implements java.lang.Iterable<Node>


Constructor Summary
Estimate(Classification labels)
           
Estimate(Estimate e)
           
Estimate(Graph graph, java.lang.String nodeType, AttributeCategorical attribute)
           
 
Method Summary
 void applyCMN(DataSplit split)
          Apply class mass normalization.
 Classification asClassification()
           
 void classify(Node node, int clsVal)
           
 void clear()
           
 void copyInto(Estimate result)
           
 void estimate(Node node, double[] estimate)
           
 AttributeCategorical getAttribute()
           
 int getClassification(Node node)
           
 int getClassificationIdx(Node node, int defaultValue)
           
 double[] getEstimate(Node node)
           
 double[] getEstimate(Node node, double[] defaultValue)
           
 Graph getGraph()
           
 java.lang.String getNodeType()
           
 double getScore(Node node, int clsVal)
           
 java.util.Iterator<Node> iterator()
           
 void normalize(Node node)
           
 int sampleEstimateIdx(Node node)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Estimate

public Estimate(Estimate e)

Estimate

public Estimate(Graph graph,
                java.lang.String nodeType,
                AttributeCategorical attribute)

Estimate

public Estimate(Classification labels)
Method Detail

estimate

public void estimate(Node node,
                     double[] estimate)

classify

public void classify(Node node,
                     int clsVal)

clear

public void clear()

getScore

public double getScore(Node node,
                       int clsVal)

getEstimate

public double[] getEstimate(Node node)

getEstimate

public double[] getEstimate(Node node,
                            double[] defaultValue)

sampleEstimateIdx

public int sampleEstimateIdx(Node node)

normalize

public void normalize(Node node)

getClassification

public int getClassification(Node node)

getClassificationIdx

public int getClassificationIdx(Node node,
                                int defaultValue)

size

public int size()

getAttribute

public AttributeCategorical getAttribute()

getGraph

public Graph getGraph()

getNodeType

public java.lang.String getNodeType()

iterator

public java.util.Iterator<Node> iterator()
Specified by:
iterator in interface java.lang.Iterable<Node>

asClassification

public Classification asClassification()

copyInto

public void copyInto(Estimate result)

applyCMN

public void applyCMN(DataSplit split)
Apply class mass normalization.

Parameters:
known -
See Also:
Zhu, X., Ghahramani, Z., & Lafferty, J. (2003). "Semi-supervised learning using Gaussian fields and harmonic functions," The 20th International Conference on Machine Learning (ICML), 2003.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object