- Timestamp:
- 07/14/15 11:43:55 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java
r1998 r2006 41 41 import de.ugoe.cs.autoquest.plugin.http.eventcore.SimpleSOAPEventType; 42 42 import de.ugoe.cs.autoquest.testgeneration.RandomWalkGenerator; 43 import de.ugoe.cs.autoquest.usageprofiles. FirstOrderMarkovModel;43 import de.ugoe.cs.autoquest.usageprofiles.HighOrderMarkovModel; 44 44 import de.ugoe.cs.autoquest.usageprofiles.IStochasticProcess; 45 import de.ugoe.cs.autoquest.usageprofiles.TrieBasedModel; 45 46 import de.ugoe.cs.util.SerializationUtils; 46 47 import de.ugoe.cs.util.console.TextConsole; … … 274 275 Properties properties = loadProperties(testdata); 275 276 Collection<List<Event>> sequences = loadAndPreprocessUsageJournal(testdata, properties); 276 IStochasticProcess model = createUsageProfile(testdata, sequences);277 IStochasticProcess model = createUsageProfile(testdata, properties, sequences); 277 278 byte[] serialized = SerializationUtils.serialize(model); 278 279 SerializationUtils.deserialize(serialized); … … 324 325 ModelUtils.loadModel(new File(ClassLoader.getSystemResource(testdata.dslModelFile) 325 326 .getFile())); 326 IStochasticProcess usageProfile = createUsageProfile(testdata, sequences);327 IStochasticProcess usageProfile = createUsageProfile(testdata, properties, sequences); 327 328 Collection<List<Event>> generatedSequences = 328 329 createRandomSequences(usageProfile, properties); … … 353 354 ModelUtils.loadModel(new File(ClassLoader.getSystemResource(testdata.dslModelFile) 354 355 .getFile())); 355 IStochasticProcess usageProfile = createUsageProfile(testdata, sequences);356 IStochasticProcess usageProfile = createUsageProfile(testdata, properties, sequences); 356 357 Collection<List<Event>> generatedSequences = 357 358 createRandomSequences(usageProfile, properties); … … 400 401 } 401 402 402 private IStochasticProcess createUsageProfile(TestData testdata, 403 private IStochasticProcess createUsageProfile(TestData testdata, Properties properties, 403 404 Collection<List<Event>> sequences) 404 405 throws Exception 405 406 { 406 FirstOrderMarkovModel usageProfile = new FirstOrderMarkovModel(new Random(1));407 TrieBasedModel usageProfile = new HighOrderMarkovModel(Integer.parseInt(properties.getProperty("usageprofile.markovorder", "1")), new Random(1)); 407 408 usageProfile.train(sequences); 408 409 FileOutputStream fos = new FileOutputStream(OUTPUT_DIR + testdata.usageProfileFile);
Note: See TracChangeset
for help on using the changeset viewer.