Examples of RandomAssignmentSystem


Examples of org.mitre.medfacts.i2b2.util.RandomAssignmentSystem

    // public void hello() {}

     @Test
     public void testRandomAssignmentSystemSimple()
     {
       RandomAssignmentSystem system = new RandomAssignmentSystem();
       system.setTrainingRatio(0.8f);

       for (int i=0; i < 10; i++)
       {
         system.addItem(i);
       }

       system.createSets();

       Set<RandomAssignmentItem> trainingSet = system.getTrainingSetSorted();
       Set<RandomAssignmentItem> testSet = system.getTestSetSorted();

       System.out.println("=== TRAINING SET begin ===");
       printoutSet(trainingSet);
       System.out.println("=== TRAINING SET begin ===");
       System.out.println();
View Full Code Here

Examples of org.mitre.medfacts.i2b2.util.RandomAssignmentSystem

  }

  public void createTrainingSplit()
  {
    List<TrainingInstance> masterTrainingList = getMasterTrainingInstanceListTraining();
    RandomAssignmentSystem system = new RandomAssignmentSystem();
    system.setTrainingRatio(0.8f);

    system.addZeroInclusiveToNExclusive(masterTrainingList.size());

    for (int i=0; i < 10; i++)
    {
      system.addItem(i);
    }

    system.createSets();

    Set<Integer> trainingSet = system.getTrainingPositions();
    Set<Integer> testSet = system.getTestPositions();

    trainingSplitList = new ArrayList<TrainingInstance>();
    testSplitList = new ArrayList<TrainingInstance>();

    for (int i : trainingSet)
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.