unbbayes.evaluation
Class FastLWApproximateEvaluation

java.lang.Object
  extended by unbbayes.evaluation.AEvaluation
      extended by unbbayes.evaluation.FastLWApproximateEvaluation
All Implemented Interfaces:
IEvaluation, ILongTaskProgressObservable, ILongTaskProgressObserver

public class FastLWApproximateEvaluation
extends AEvaluation
implements ILongTaskProgressObserver


Field Summary
protected  ILikelihoodWeightingSampling lw
           
protected  int[] positionEvidenceNodeList
           
protected  List<Node> positionNodeList
           
protected  int[] positionTargetNodeList
           
protected  byte[][] sampleMatrix
           
protected  int sampleSize
           
protected  float[] sampleWeight
           
protected  TreeVariable targetNode
           
 
Fields inherited from class unbbayes.evaluation.AEvaluation
currentProgress, currentProgressStatus, evidenceEvaluationList, evidenceNodeList, evidenceSetCM, evidenceSetPCC, evidenceStatesProduct, factors, lastProgressUpdated, maxProgress, net, statesProduct, targetNodeList, targetStatesProduct, UNSET_VALUE
 
Constructor Summary
FastLWApproximateEvaluation(int sampleSize)
           
 
Method Summary
protected  float[][] computeCM(List<String> targetNodeNameList, List<String> evidenceNodeNameList)
           
protected  void evaluate(List<String> targetNodeNameList, List<String> evidenceNodeNameList, boolean onlyGCM)
           
 float getError()
           
static void main(String[] args)
           
protected  void setMaxProgress(int evidenceNodeListSize)
          Compute an approximation of the maximum size for the progress of this long task and set it as the value of maxProgress.
 void update(LongTaskProgressChangedEvent status)
          To have a better approximation of the current progress, we have to keep track of the sampling process used in this long task.
 
Methods inherited from class unbbayes.evaluation.AEvaluation
computeFactors, evaluate, evaluate, getBestIndividualCostRate, getBestIndividualPCC, getBestMarginalImprovement, getCurrentProgress, getCurrentProgressStatus, getEvidenceEvaluationList, getEvidenceLinearCoord, getEvidenceSetCM, getEvidenceSetPCC, getLinearCoord, getMaxProgress, getMultidimensionalCoord, getPercentageDone, init, loadNetwork, notityObservers, registerObserver, removeObserver, show, updateProgress, updateProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sampleSize

protected int sampleSize

lw

protected ILikelihoodWeightingSampling lw

targetNode

protected TreeVariable targetNode

sampleMatrix

protected byte[][] sampleMatrix

sampleWeight

protected float[] sampleWeight

positionNodeList

protected List<Node> positionNodeList

positionTargetNodeList

protected int[] positionTargetNodeList

positionEvidenceNodeList

protected int[] positionEvidenceNodeList
Constructor Detail

FastLWApproximateEvaluation

public FastLWApproximateEvaluation(int sampleSize)
Method Detail

getError

public float getError()
Specified by:
getError in interface IEvaluation
Specified by:
getError in class AEvaluation

evaluate

protected void evaluate(List<String> targetNodeNameList,
                        List<String> evidenceNodeNameList,
                        boolean onlyGCM)
                 throws EvaluationException
Overrides:
evaluate in class AEvaluation
Throws:
EvaluationException

computeCM

protected float[][] computeCM(List<String> targetNodeNameList,
                              List<String> evidenceNodeNameList)
                       throws EvaluationException
Specified by:
computeCM in class AEvaluation
Throws:
EvaluationException

setMaxProgress

protected void setMaxProgress(int evidenceNodeListSize)
Compute an approximation of the maximum size for the progress of this long task and set it as the value of maxProgress.


update

public void update(LongTaskProgressChangedEvent status)
To have a better approximation of the current progress, we have to keep track of the sampling process used in this long task.

Specified by:
update in interface ILongTaskProgressObserver

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.