Package org.jamesii.asf.portfolios.ga

Examples of org.jamesii.asf.portfolios.ga.GeneticAlgorithmPortfolioSelector


                        for (int problemClasses : numOfProblemClasses) {
                          PerformanceDataGenerator generator =
                              new PerformanceDataGenerator(clusterNumber,
                                  algosPerCluster, problemNumber,
                                  clusterDistance, problemClasses, datReps);
                          GeneticAlgorithmPortfolioSelector gaps =
                              new GeneticAlgorithmPortfolioSelector();
                          gaps.setAbortCriterion(ABORT);
                          gaps.setFitness(FITNESS);
                          gaps.setNumIndividuals(popSize);
                          gaps.setMutationRate(MUTATION_RATE);
                          String[] desc =
                              new String[] { "" + clusterNumber,
                                  "" + algosPerCluster, "" + clusterDistance,
                                  "" + problemNumber, "" + popSize,
                                  "" + problemClasses };
View Full Code Here


      PortfolioProblemDescription pdd =
          new PortfolioProblemDescription(
              new PortfolioPerformanceData[] { portPerfData }, ACCEPTABLE_RISK,
              new boolean[] { false }, MIN_PORTFOLIO_SIZE, MAX_PORTFOLIO_SIZE);
      GeneticAlgorithmPortfolioSelector gaps =
          new GeneticAlgorithmPortfolioSelector();
      gaps.setAbortCriterion(new GenerationCountAbort(NUM_GENERATIONS));
      gaps.setFitness(new ASRFitness());
      gaps.setNumIndividuals(NUM_INDIVIDUALS);
      gaps.setMutationRate(0.001);
      gaps.setIndividualFactory(new ListIndividualFactory());

      double[] gaPortfolio = gaps.portfolio(pdd);
      double[] completePortfolio = new double[gaPortfolio.length];
      for (int i = 0; i < completePortfolio.length; i++) {
        completePortfolio[i] = 1.0 / completePortfolio.length;
      }
View Full Code Here

    System.out.println("Number of Algorithm: " + perfData.performances.length);
    System.out
        .println("Number of Problems: " + perfData.performances[0].length);
    printMatrix(perfData.performances);

    GeneticAlgorithmPortfolioSelector gaps =
        new GeneticAlgorithmPortfolioSelector();
    gaps.setAbortCriterion(ABORT);
    gaps.setFitness(FITNESS);
    gaps.setNumIndividuals(NUM_OF_IND);
    gaps.setMutationRate(MUTATION_RATE);
    gaps.setFactoryGenePool(FACTORY_GENE_POOL);
    gaps.setIndividualFactory(FACTORY_INDIVIDUAL);
    double[] vector =
        gaps.portfolio(new PortfolioProblemDescription(perfData, 0, MAXIMIZE,
            MIN_SIZE, MAX_SIZE));

    System.out.println("PerformanceTest finished.");
    System.out.println("Vector:");
    for (int i = 0; i < vector.length; i++) {
View Full Code Here

  @Override
  public void setUp() {
    problemDescription =
        new PortfolioProblemDescription(new PortfolioPerformanceData(
            problemMatrix), 0, true, MIN_SIZE, MAX_SIZE);
    gaps = new GeneticAlgorithmPortfolioSelector();
    gaps.setFactoryGenePool(FACTORY_GENE_POOL);
  }
View Full Code Here

TOP

Related Classes of org.jamesii.asf.portfolios.ga.GeneticAlgorithmPortfolioSelector

Copyright © 2018 www.massapicom. 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.