Examples of generatePosNeg()


Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 2*graph.pathroutines.countEdges();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.  */
      RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
      {
        @Override
        public Pair<Integer,String> CheckWithEndUser(
            @SuppressWarnings("unused"LearnerGraph model,
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    protected void buildSets()
    {
      loadGraph();
      int size = graph.pathroutines.getGraph().getEdges().size()*4;// FIXME: this one ignores parallel edges
        RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),3,null);// the seed for Random should be the same for each file
      rpg.generatePosNeg(size, experiment.getStageNumber());
      pta = rpg.getAllSequences(percent);
    }
  }

  public static void main(String []args)
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 4*graph.getStateNumber();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined. 
      RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
      {
        @Override
        public Pair<Integer,String> CheckWithEndUser(
            @SuppressWarnings("unused"LearnerGraph model,
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 2*graph.pathroutines.countEdges();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.  */
      RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
      {
        @Override
        public Pair<Integer,String> CheckWithEndUser(
            @SuppressWarnings("unused"LearnerGraph model,
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    {
      Collection<List<String>> sequences =new LinkedHashSet<List<String>>();
      RandomPathGenerator rpg = new RandomPathGenerator(from, new Random(0),4, from.getInit());// the seed for Random should be the same for each file
      long startTime = System.nanoTime();
      rpg.generatePosNeg((graphComplexity+1)*states , 1);
      outcome.setValue(LONG_V.DURATION_RAND,System.nanoTime()-startTime);
      sequences.addAll(rpg.getAllSequences(0).getData(PTASequenceEngine.truePred));
      sequences.addAll(rpg.getExtraSequences(0).getData(PTASequenceEngine.truePred));
      Pair<Double,Long> randSeq = compareLang(from, to, sequences);
      outcome.setValue(LONG_V.DURATION_RAND, outcome.getValue(LONG_V.DURATION_RAND)+randSeq.secondElem);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    protected void buildSets()
    {
      loadGraph();
      int size = graph.pathroutines.getGraph().getEdges().size()*4;// FIXME: this one ignores parallel edges
        RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),3);// the seed for Random should be the same for each file
      rpg.generatePosNeg(size, experiment.getStageNumber());
      pta = rpg.getAllSequences(percent);
    }
  }
 
  public static Collection<List<String>> getPositiveStrings(DirectedSparseGraph graph, Collection<List<String>> samples){
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    protected void buildSets()
    {
      loadGraph();
      int size = graph.pathroutines.getGraph().getEdges().size()*4;// FIXME: this one ignores parallel edges
        RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),3,null);// the seed for Random should be the same for each file
      rpg.generatePosNeg(size, experiment.getStageNumber());
      pta = rpg.getAllSequences(percent);
    }
  }
 
  public static Collection<List<String>> getPositiveStrings(DirectedSparseGraph graph, Collection<List<String>> samples){
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 2*graph.pathroutines.countEdges();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.  */
      RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
      {
        @Override
        public Pair<Integer,String> CheckWithEndUser(
            @SuppressWarnings("unused"LearnerGraph model,
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    {
      Collection<List<Label>> sequences =new LinkedHashSet<List<Label>>();
      RandomPathGenerator rpg = new RandomPathGenerator(from, new Random(0),4, from.getInit());// the seed for Random should be the same for each file
      long startTime = System.nanoTime();
      rpg.generatePosNeg((graphComplexity+1)*states , 1);
      outcome.setValue(LONG_V.DURATION_RAND,System.nanoTime()-startTime);
      sequences.addAll(rpg.getAllSequences(0).getData(PTASequenceEngine.truePred));
      sequences.addAll(rpg.getExtraSequences(0).getData(PTASequenceEngine.truePred));
      Pair<Double,Long> randSeq = compareLang(from, to, sequences);
      outcome.setValue(LONG_V.DURATION_RAND, outcome.getValue(LONG_V.DURATION_RAND)+randSeq.secondElem);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    {
      Collection<List<Label>> sequences =new LinkedHashSet<List<Label>>();
      RandomPathGenerator rpg = new RandomPathGenerator(from, new Random(0),4, from.getInit());// the seed for Random should be the same for each file
      long startTime = System.nanoTime();
      rpg.generatePosNeg((graphComplexity+1)*states , 1);
      outcome.setValue(LONG_V.DURATION_RAND,System.nanoTime()-startTime);
      sequences.addAll(rpg.getAllSequences(0).getData(PTASequenceEngine.truePred));
      sequences.addAll(rpg.getExtraSequences(0).getData(PTASequenceEngine.truePred));
      Pair<Double,Long> randSeq = compareLang(from, to, sequences);
      outcome.setValue(LONG_V.DURATION_RAND, outcome.getValue(LONG_V.DURATION_RAND)+randSeq.secondElem);
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.