Last change
on this file was
184,
checked in by sherbold, 13 years ago
|
- refactored commands for the training of models (trainDFA, trainMarkovModel, trainPPM) by extracting one common abstract superclass
+ added command updateModel for model reinforcement
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.1 KB
|
Rev | Line | |
---|
[96] | 1 | package de.ugoe.cs.eventbench.commands;
|
---|
| 2 |
|
---|
| 3 | import java.util.List;
|
---|
| 4 | import java.util.Random;
|
---|
| 5 |
|
---|
| 6 | import de.ugoe.cs.eventbench.models.DeterministicFiniteAutomaton;
|
---|
[184] | 7 | import de.ugoe.cs.eventbench.models.TrieBasedModel;
|
---|
[96] | 8 | import de.ugoe.cs.util.console.Console;
|
---|
| 9 |
|
---|
[171] | 10 | /**
|
---|
| 11 | * <p>
|
---|
| 12 | * Command to train a Deterministic Finite Automaton (DFA).
|
---|
| 13 | * </p>
|
---|
| 14 | *
|
---|
| 15 | * @author Steffen Herbold
|
---|
[184] | 16 | * @version 2.0
|
---|
[171] | 17 | */
|
---|
[184] | 18 | public class CMDtrainDFA extends AbstractTrainCommand {
|
---|
[96] | 19 |
|
---|
[171] | 20 | /*
|
---|
| 21 | * (non-Javadoc)
|
---|
| 22 | *
|
---|
| 23 | * @see de.ugoe.cs.util.console.Command#help()
|
---|
| 24 | */
|
---|
[96] | 25 | @Override
|
---|
| 26 | public void help() {
|
---|
[184] | 27 | Console.println("Usage: trainDFA <modelName> <sequencesName>");
|
---|
[96] | 28 | }
|
---|
| 29 |
|
---|
[184] | 30 | /**
|
---|
| 31 | * <p>
|
---|
| 32 | * No additional parameters.
|
---|
| 33 | * </p>
|
---|
| 34 | *
|
---|
| 35 | * @see de.ugoe.cs.eventbench.commands.AbstractTrainCommand#handleAdditionalParameters(java.util.List)
|
---|
| 36 | */
|
---|
| 37 | @Override
|
---|
| 38 | void handleAdditionalParameters(List<Object> parameters) throws Exception {
|
---|
| 39 | // no additional parameters.
|
---|
| 40 | }
|
---|
| 41 |
|
---|
[171] | 42 | /*
|
---|
| 43 | * (non-Javadoc)
|
---|
| 44 | *
|
---|
[184] | 45 | * @see de.ugoe.cs.eventbench.commands.AbstractTrainCommand#createModel()
|
---|
[171] | 46 | */
|
---|
[96] | 47 | @Override
|
---|
[184] | 48 | TrieBasedModel createModel() {
|
---|
| 49 | return new DeterministicFiniteAutomaton(new Random());
|
---|
[96] | 50 | }
|
---|
| 51 |
|
---|
| 52 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.