public class GeneratorMain
extends java.lang.Object
AbortException
is
thrown when the maximum number of retries is exceeded.
On the other hand, the model might not be exactly as specified. When the
generator reports an "Density correction factor estimation" that differs from
1.0 this is an indication that the result is not exact.
On the third hand, rejecting points introduces effects where one generator
can influence others, so random generator results will not be stable with
respect to the addition of new dimensions and similar if there are any
rejects involved. So this generator is not entirely optimal for generating
data sets for scalability tests on the number of dimensions, although if
clusters overlap little enough (so that no rejects happen) the results should
be as expected.Modifier and Type | Class and Description |
---|---|
private class |
GeneratorMain.AssignLabelsByDensity
Reassign objects in certain labels; but also always test against the model.
|
private class |
GeneratorMain.AssignLabelsByDistance
Reassign objects in certain labels; but also always test against the model.
|
private static class |
GeneratorMain.AssignPoint
Point (re-)assignment strategy.
|
private class |
GeneratorMain.TestModel
Reject objects with a higher density in another generator.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<GeneratorInterface> |
generators
List of clusters to generate.
|
private static Logging |
LOG
Class logger.
|
protected java.util.regex.Pattern |
relabelClusters
Pattern, which clusters (e.g.
|
protected boolean |
relabelDistance
Relabel objects by distance.
|
protected boolean |
testAgainstModel
Controls whether points are tested against the model during generation.
|
Constructor and Description |
---|
GeneratorMain() |
Modifier and Type | Method and Description |
---|---|
void |
addCluster(GeneratorInterface c)
Add a cluster to the cluster list.
|
MultipleObjectsBundle |
generate()
Main loop to generate data set.
|
java.util.List<GeneratorInterface> |
getGenerators()
Access the generators.
|
private void |
initLabelsAndModels(java.util.ArrayList<GeneratorInterface> generators,
ClassLabel[] labels,
Model[] models,
java.util.regex.Pattern reassign)
Initialize cluster labels and models.
|
boolean |
isTestAgainstModel()
Return value of the
testAgainstModel flag. |
void |
setReassignByDistance(boolean bydistance)
Relabel objects by distance, instead of by density.
|
void |
setReassignPattern(java.util.regex.Pattern reassign)
Set the reassignment pattern.
|
void |
setTestAgainstModel(boolean testAgainstModel)
Set the value of the
testAgainstModel flag. |
private static final Logging LOG
protected java.util.ArrayList<GeneratorInterface> generators
protected boolean testAgainstModel
protected java.util.regex.Pattern relabelClusters
protected boolean relabelDistance
public void addCluster(GeneratorInterface c)
c
- cluster to addpublic MultipleObjectsBundle generate()
private void initLabelsAndModels(java.util.ArrayList<GeneratorInterface> generators, ClassLabel[] labels, Model[] models, java.util.regex.Pattern reassign)
generators
- Cluster generatorslabels
- Labels (output)models
- Models (output)reassign
- Pattern for clusters to reassign.public boolean isTestAgainstModel()
testAgainstModel
flag.public void setTestAgainstModel(boolean testAgainstModel)
testAgainstModel
flag.testAgainstModel
- New valuepublic java.util.List<GeneratorInterface> getGenerators()
public void setReassignPattern(java.util.regex.Pattern reassign)
reassign
- Reassignment pattern.public void setReassignByDistance(boolean bydistance)
bydistance
- Boolean when to use distances.Copyright © 2019 ELKI Development Team. License information.