Examples of IMinBanditPolicy


Examples of org.jamesii.simspex.adaptiverunner.policies.plugintype.IMinBanditPolicy

    return random;
  }
 
  @Override
  public IMinBanditPolicy getNewInitializedCopy() {
    IMinBanditPolicy newPolicy = new RandomSelection();
    newPolicy.init(getNumOfArms(), getHorizon());
    return newPolicy;
  }
View Full Code Here

Examples of org.jamesii.simspex.adaptiverunner.policies.plugintype.IMinBanditPolicy

    List<Integer> selHistory = policyObserver.getSelectionHistory();
    assertEquals(replications * MODEL_SETUPS, selHistory.size());

    // Tricky: stochastic policies might not always identify all options that
    // need to be quarantined - so a heuristic bound is used instead...
    IMinBanditPolicy policy = policyObserver.getPolicy();
    List<Pair<Integer, Double>> rewardHistory =
        policyObserver.getRewardHistory();
    assertTrue(replications * MODEL_SETUPS >= rewardHistory.size()
        + policy.getQuarantinedOptions().size() * MODEL_SETUPS);

    assertTrue(replications * MODEL_SETUPS - 5 <= rewardHistory.size()
        + policy.getQuarantinedOptions().size() * MODEL_SETUPS);
  }
View Full Code Here

Examples of org.jamesii.simspex.adaptiverunner.policies.plugintype.IMinBanditPolicy

      aggregatedData.setPortfolioQuality(generator.evaluatePortfolio(portfolios
          .getFirstValue()));

      for (MinBanditPolicyFactory policyFactory : policyFactories) {
        IMinBanditPolicy policy = policyFactory.create(new ParameterBlock(), SimSystem.getRegistry().createContext());
        SimSystem.report(Level.INFO, "\tExecuting policy:" + policy.getClass());
        aggregatedData.registerGAPerformance(
            description,
            Strings.dispClassName(policy.getClass()),
            runPolicyOnPortfolio(configDesc + "_r" + i + "_", policy,
                generator, portfolios.getFirstValue()));
        // If there is a stochastic portfolio, generate this as well
        if (portfolios.getSecondValue() != null) {
          aggregatedData.registerStochPerformance(
              description,
              Strings.dispClassName(policy.getClass()),
              runPolicyOnPortfolio("stoch__" + configDesc + "_r" + i + "_",
                  policy, generator, portfolios.getSecondValue()));
        }
        // TODO: Output policy data
      }
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.