|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--stochasticsampling.Evaluator
Title: Evaluator.java Description: Core Bayesian Network class Copyright: Copyright (c) 2001 Company: KSU / KDD
| Field Summary | |
boolean |
AIS
|
boolean |
SIS
|
| Constructor Summary | |
Evaluator(int totalsamples,
BBN network,
NodeManager nm,
java.lang.String s,
java.lang.String ev)
Evaluator is the constructor and initializes variables |
|
Evaluator(int totalsamples,
BBN network,
NodeManager nm,
java.lang.String s,
java.lang.String ev,
AdaptiveAndSelfIS ais)
Evaluator is the constructor and initializes variables |
|
| Method Summary | |
void |
addRMSE(double d,
int row,
int col)
addRMSE adds a value to the RMSE array |
double |
calculateSImpScore(java.util.Vector samplePoint)
calculateSImpScore calculates the score of a given sample |
void |
clearFreqTable()
clearFreqTable clears the frenquency table for each query node |
void |
clearFrequencies()
clearFrequencies clears the vector of frequencies for all query nodes. |
java.util.Vector |
computeMPE(java.util.Vector allsamples)
computeMPE estimates the MPE for the network |
java.util.Vector |
computeProbOfQueryNodesOntheFly(java.util.Vector SamplePoint,
int t,
double totalweight,
java.lang.String sampling_method,
double oneweight)
computeProbOfQueryNodesOntheFly computes the probability of each instantiation of each query node based on the samples thus far. |
double |
computeRMSE_DforOneFromTwoProbs(java.util.Vector ExactProbsFromLS,
java.util.Vector ApproProbsFromSampling)
computeRMSE_DforOneFromTwoProbs computes the marginal RMSE for generated sample |
java.util.Vector |
getFrequencies()
getFrequencies returns a vector of frequencies for all query nodes from samples. |
double |
getLikelihoodOfSample(java.util.Vector OneSample)
getLikelihoodOfSample computes the likelihood (probability) of the currently generated sample |
void |
printResults()
printResults prints the RMSE values in printingsarray |
void |
printResults(java.lang.String printingsFile)
printResults prints the RMSE values in printingsarray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean AIS
public boolean SIS
| Constructor Detail |
public Evaluator(int totalsamples,
BBN network,
NodeManager nm,
java.lang.String s,
java.lang.String ev)
totalsamples - - the number of samples to be takennetwork - - the Bayesian networknm - - a copy of the NodeManagers - - the type of sampling algorithmevfile - - the evidence file name for the network
public Evaluator(int totalsamples,
BBN network,
NodeManager nm,
java.lang.String s,
java.lang.String ev,
AdaptiveAndSelfIS ais)
totalsamples - - the number of samples to be takennetwork - - the Bayesian networknm - - a copy of the NodeManagers - - the type of sampling algorithmev - - the evidence file name for the networkais - - a copy of the AdaptiveAndSelfIS class| Method Detail |
public java.util.Vector getFrequencies()
public void clearFrequencies()
public void addRMSE(double d,
int row,
int col)
d - - the new RMSE valuerow - - the row in the arraycol - - the column in the array
public void printResults(java.lang.String printingsFile)
throws java.io.IOException
printingsFile - - the file to print the RMSE values to
public void printResults()
throws java.io.IOException
public double computeRMSE_DforOneFromTwoProbs(java.util.Vector ExactProbsFromLS,
java.util.Vector ApproProbsFromSampling)
ExactProbsFromLS - - a vector of the exact probabilities from LS
for the query nodes in the networkApproProbsFromSamples - - a vector of the approximate probabilities
(based on samples taken) for the query nodes in the network.public java.util.Vector computeMPE(java.util.Vector allsamples)
allsamples - - m samples generated by StochasticSamplingpublic double calculateSImpScore(java.util.Vector samplePoint)
samplePoint - - the generated sample
public java.util.Vector computeProbOfQueryNodesOntheFly(java.util.Vector SamplePoint,
int t,
double totalweight,
java.lang.String sampling_method,
double oneweight)
SamplePoint - - the current samplet - - the number of samples that have been generated so fartotalweight - - the sum of the weights that each sample has produced
so farpublic void clearFreqTable()
public double getLikelihoodOfSample(java.util.Vector OneSample)
OneSample - - the current sample
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||