|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.indiana.iucbrf.casepackage.CaseGenerator
public class CaseGenerator
This class handles the automatic generation of cases, according to provided distributions. It is especially useful for populating a case base with random cases.
Field Summary | |
---|---|
protected Domain |
domain
The domain to which these cases will apply. |
protected DistributionCollection |
featureNoiseDistribution
The distributions for noise to apply, depending on noiseProbability, for each feature. |
protected int |
generatedCount
|
protected double |
noiseProbability
The probability of noise, applied to a feature or a solution, between 0 and 1. |
protected double |
problemCount
The number of problems the case base has seen when these cases will be added. |
protected ProblemGenerator |
problemGenerator
The problem generator used to generate the problem portion of each case. |
protected Distribution |
solutionNoiseDistribution
The distribution for noise to apply, depending on noiseProbability, for the solution. |
Constructor Summary | |
---|---|
CaseGenerator(ProblemGenerator problemGenerator,
DistributionCollection featureNoiseDistribution,
Distribution solutionNoiseDistribution,
double problemCount,
double noiseProbability,
Domain domain)
Construct a CaseGenerator object. |
|
CaseGenerator(ProblemGenerator problemGenerator,
Domain domain)
|
|
CaseGenerator(ProblemGenerator problemGenerator,
double problemCount,
Domain domain)
Construct a CaseGenerator object. |
Method Summary | |
---|---|
Case |
generateCase()
Randomly generate a case according to the distributions and probabilities for this generator. |
protected Case |
generateCase(Problem p)
|
java.util.ArrayList |
generateCases(int numCases)
|
int |
getGeneratedCount()
|
protected boolean |
shouldApplyFeatureNoise(Case c,
FeatureKey featureKey)
Determine if noise should be applied to a given feature in a case being generated. |
protected boolean |
shouldApplySolutionNoise(Case c)
Determine if noise should be applied to the solution to a case being generated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double problemCount
protected double noiseProbability
protected DistributionCollection featureNoiseDistribution
protected Distribution solutionNoiseDistribution
protected ProblemGenerator problemGenerator
protected Domain domain
protected int generatedCount
Constructor Detail |
---|
public CaseGenerator(ProblemGenerator problemGenerator, Domain domain)
public CaseGenerator(ProblemGenerator problemGenerator, double problemCount, Domain domain)
public CaseGenerator(ProblemGenerator problemGenerator, DistributionCollection featureNoiseDistribution, Distribution solutionNoiseDistribution, double problemCount, double noiseProbability, Domain domain)
Method Detail |
---|
public int getGeneratedCount()
public Case generateCase()
protected Case generateCase(Problem p)
public java.util.ArrayList generateCases(int numCases)
protected boolean shouldApplyFeatureNoise(Case c, FeatureKey featureKey)
protected boolean shouldApplySolutionNoise(Case c)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |