Last change
on this file since 388 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
|
Line | |
---|
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;
|
---|
7 | import de.ugoe.cs.eventbench.models.TrieBasedModel;
|
---|
8 | import de.ugoe.cs.util.console.Console;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * <p>
|
---|
12 | * Command to train a Deterministic Finite Automaton (DFA).
|
---|
13 | * </p>
|
---|
14 | *
|
---|
15 | * @author Steffen Herbold
|
---|
16 | * @version 2.0
|
---|
17 | */
|
---|
18 | public class CMDtrainDFA extends AbstractTrainCommand {
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * (non-Javadoc)
|
---|
22 | *
|
---|
23 | * @see de.ugoe.cs.util.console.Command#help()
|
---|
24 | */
|
---|
25 | @Override
|
---|
26 | public void help() {
|
---|
27 | Console.println("Usage: trainDFA <modelName> <sequencesName>");
|
---|
28 | }
|
---|
29 |
|
---|
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 |
|
---|
42 | /*
|
---|
43 | * (non-Javadoc)
|
---|
44 | *
|
---|
45 | * @see de.ugoe.cs.eventbench.commands.AbstractTrainCommand#createModel()
|
---|
46 | */
|
---|
47 | @Override
|
---|
48 | TrieBasedModel createModel() {
|
---|
49 | return new DeterministicFiniteAutomaton(new Random());
|
---|
50 | }
|
---|
51 |
|
---|
52 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.