- java.lang.Object
-
- de.learnlib.util.Experiment<A>
-
- Type Parameters:
A
- the automaton type
- Direct Known Subclasses:
Experiment.DFAExperiment
,Experiment.MealyExperiment
,Experiment.MooreExperiment
public class Experiment<A> extends Object
Runs a learning experiment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Experiment.DFAExperiment<I>
static class
Experiment.MealyExperiment<I,O>
static class
Experiment.MooreExperiment<I,O>
-
Field Summary
Fields Modifier and Type Field Description static String
COUNTEREXAMPLE_PROFILE_KEY
static String
LEARNING_PROFILE_KEY
-
Constructor Summary
Constructors Constructor Description Experiment(LearningAlgorithm<? extends A,I,D> learningAlgorithm, EquivalenceOracle<? super A,I,D> equivalenceAlgorithm, net.automatalib.alphabet.Alphabet<I> inputs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description A
getFinalHypothesis()
Returns the final hypothesis model.Counter
getRounds()
Returns the counter for the number of refinement rounds the experiment took.A
run()
Run the experiment, once.void
setLogModels(boolean logModels)
Decides whether intermediate hypothesis models should be logged.void
setProfile(boolean profile)
Decides whether the experiment runtime should be profiled.
-
-
-
Field Detail
-
LEARNING_PROFILE_KEY
public static final String LEARNING_PROFILE_KEY
- See Also:
- Constant Field Values
-
COUNTEREXAMPLE_PROFILE_KEY
public static final String COUNTEREXAMPLE_PROFILE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Experiment
public Experiment(LearningAlgorithm<? extends A,I,D> learningAlgorithm, EquivalenceOracle<? super A,I,D> equivalenceAlgorithm, net.automatalib.alphabet.Alphabet<I> inputs)
-
-
Method Detail
-
run
public A run()
Run the experiment, once.- Returns:
- the final hypothesis
- Throws:
IllegalStateException
- if invoked more than once
-
getFinalHypothesis
public A getFinalHypothesis()
Returns the final hypothesis model.- Returns:
- the final hypothesis model
- Throws:
IllegalStateException
- if the experiment has not been run yet
-
setLogModels
public void setLogModels(boolean logModels)
Decides whether intermediate hypothesis models should be logged.- Parameters:
logModels
- flag whether models should be logged
-
setProfile
public void setProfile(boolean profile)
Decides whether the experiment runtime should be profiled.- Parameters:
profile
- flag whether learning process should be profiled
-
getRounds
public Counter getRounds()
Returns the counter for the number of refinement rounds the experiment took.- Returns:
- the rounds
-
-