Package statechum.analysis.learning

Examples of statechum.analysis.learning.MarkovUniversalLearner.createMarkovLearner()


          }
        });
        assert sPlus.size() > 0;
        assert sMinus.size() > 0;
        final MarkovUniversalLearner m= new MarkovUniversalLearner(chunkLen);
        m.createMarkovLearner(sPlus, sMinus,false);
       
        pta.clearColours();
        synchronized (AbstractLearnerGraph.syncObj) {
          //PaperUAS.computePTASize(selectionID+" attempt: "+attempt+" with unique: ", pta, referenceGraph);
        }
View Full Code Here


  @Test
  public void testCreateMarkovMatrix2()
  {
    MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    Set<List<Label>> plusStrings = buildSet(new String[][] { new String[]{"a","u"} },config,converter), minusStrings = new HashSet<List<Label>>();
    Map<Trace, UpdatableOutcome> matrix = m.createMarkovLearner(plusStrings, minusStrings);
    Assert.assertEquals(3,matrix.size());
   
    Assert.assertSame(UpdatableOutcome.positive, matrix.get(new Trace(Arrays.asList(new Label[]{lblA,lblU}))));

    Assert.assertSame(UpdatableOutcome.positive, matrix.get(new Trace(Arrays.asList(new Label[]{lblA}))));
View Full Code Here

  @Test
  public void testCreateMarkovMatrix3a()
  {
    MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = buildSet(new String[][] { new String[]{"a","u"} },config,converter);
    Map<Trace, UpdatableOutcome> matrix = m.createMarkovLearner(plusStrings, minusStrings);
    Assert.assertEquals(3,matrix.size());

    Assert.assertSame(UpdatableOutcome.negative, matrix.get(new Trace(Arrays.asList(new Label[]{lblA,lblU}))));

    Assert.assertSame(UpdatableOutcome.positive, matrix.get(new Trace(Arrays.asList(new Label[]{lblA}))));
View Full Code Here

  @Test
  public void testCreateMarkovMatrix3b()
  {
    MarkovUniversalLearner m = new MarkovUniversalLearner(3);
    Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = buildSet(new String[][] { new String[]{"a","u"} },config,converter);
    Map<Trace, UpdatableOutcome> matrix = m.createMarkovLearner(plusStrings, minusStrings);
    Assert.assertEquals(3,matrix.size());

    Assert.assertSame(UpdatableOutcome.negative, matrix.get(new Trace(Arrays.asList(new Label[]{lblA,lblU}))));

    Assert.assertSame(UpdatableOutcome.positive, matrix.get(new Trace(Arrays.asList(new Label[]{lblA}))));
View Full Code Here

  @Test
  public void testCreateMarkovMatrix4()
  {
    MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = buildSet(new String[][] { new String[]{"u"} },config,converter);
    Map<Trace, UpdatableOutcome> matrix = m.createMarkovLearner(plusStrings, minusStrings);
    Assert.assertEquals(1,matrix.size());

    Assert.assertSame(UpdatableOutcome.negative, matrix.get(new Trace(Arrays.asList(new Label[]{lblU}))));
  }
 
View Full Code Here

  @Test
  public void testCreateMarkovMatrix5()
  {
    final MarkovUniversalLearner m = new MarkovUniversalLearner(2);
    final Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = buildSet(new String[][] { new String[]{},new String[]{"a","u"} },config,converter);
    Map<Trace, UpdatableOutcome> matrix = m.createMarkovLearner(plusStrings, minusStrings);
    Assert.assertEquals(3,matrix.size());
   
    Assert.assertSame(UpdatableOutcome.negative, matrix.get(new Trace(Arrays.asList(new Label[]{lblA,lblU}))));

    Assert.assertSame(UpdatableOutcome.positive, matrix.get(new Trace(Arrays.asList(new Label[]{lblA}))));
View Full Code Here

    final Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = new HashSet<List<Label>>();
    Helper.checkForCorrectException(new whatToRun() {
      @Override
      public void run() throws NumberFormatException
      {
        m.createMarkovLearner(plusStrings, minusStrings);
      }
    }, IllegalArgumentException.class, "empty");
  }
 
  @Test
View Full Code Here

    final Set<List<Label>> plusStrings = new HashSet<List<Label>>(), minusStrings = buildSet(new String[][] { new String[]{},new String[]{} },config,converter);
    Helper.checkForCorrectException(new whatToRun() {
      @Override
      public void run() throws NumberFormatException
      {
        m.createMarkovLearner(plusStrings, minusStrings);
      }
    }, IllegalArgumentException.class, "empty");
  }
 
  /** Nothing to add because there not enough evidence. */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.