stochasticsampling
Class AdaptiveAndSelfIS
java.lang.Object
|
+--stochasticsampling.ImportanceSampling
|
+--stochasticsampling.AdaptiveAndSelfIS
- All Implemented Interfaces:
- ImportanceInterface
- public class AdaptiveAndSelfIS
- extends ImportanceSampling
Title: AdaptiveAndSelfIS.java
Description: Core Bayesian Network class
Copyright: Copyright (c) 2001
Company: KSU / KDD
|
Constructor Summary |
AdaptiveAndSelfIS(BBN nodes,
int numsamples,
java.lang.String evfile)
AdaptiveAndSelfIS is the constructor and initializes variables |
AdaptiveAndSelfIS(BBN nodes,
int numsamples,
java.lang.String evfile,
java.lang.String[][] trainingData)
AdaptiveAndSelfIS is the constructor and initializes variables |
|
Method Summary |
void |
generateAllSamples()
generateAllSamples generates m samples using AIS or SIS |
void |
generateAllSamples(java.lang.String printingsFile)
generateAllSamples generates m samples using AIS or SIS |
double |
getFitness()
getFitness returns the fitness value after sampling (1 - RMSE w/ final ICPTs) |
static void |
main(java.lang.String[] args)
|
void |
setBBN(BBN newNetwork)
setBBN sets the Bayesian network and initializes variables, including the NodeManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ICPT
public java.util.Vector[] ICPT
AIS
public boolean AIS
SIS
public boolean SIS
old
public boolean old
changeProbs
public boolean changeProbs
AdaptiveAndSelfIS
public AdaptiveAndSelfIS(BBN nodes,
int numsamples,
java.lang.String evfile,
java.lang.String[][] trainingData)
throws java.io.IOException
- AdaptiveAndSelfIS is the constructor and initializes variables
- Parameters:
nodes - - the Bayesian networknumsamples - - the number of samples to be takenevfile - - the evidence file name for the networktrainingData - - a 2D string array of sample instantiations, used to compute exactprobs
when using GASLEAK
AdaptiveAndSelfIS
public AdaptiveAndSelfIS(BBN nodes,
int numsamples,
java.lang.String evfile)
throws java.io.IOException
- AdaptiveAndSelfIS is the constructor and initializes variables
- Parameters:
nodes - - the Bayesian networktotalsamples - - the number of samples to be takenevfile - - the evidence file name for the network
main
public static void main(java.lang.String[] args)
setBBN
public void setBBN(BBN newNetwork)
- setBBN sets the Bayesian network and initializes variables, including the NodeManager
- Parameters:
newNetwork - - the Bayesian network to be set
generateAllSamples
public void generateAllSamples(java.lang.String printingsFile)
throws java.io.IOException
- generateAllSamples generates m samples using AIS or SIS
- Parameters:
printingsFile - - the output file for RMSE results
generateAllSamples
public void generateAllSamples()
throws java.io.IOException
- generateAllSamples generates m samples using AIS or SIS
- Overrides:
generateAllSamples in class ImportanceSampling
getFitness
public double getFitness()
- getFitness returns the fitness value after sampling (1 - RMSE w/ final ICPTs)
- Returns:
- double - the fitness value