Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/21/11 16:23:48 (13 years ago)
Author:
sforsten
Message:

#1669: benchmark problems of Nguyen, Korns and Keijzer from http://groups.csail.mit.edu/EVO-DesignOpt/GPBenchmarks/ have been added. The benchmark problems from http://www.vanillamodeling.com/ have been adapted to the ones from Vladislavleva.

Not all benchmarks are working correctly so far, but they will be tested soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs

    r6968 r7025  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using System.Windows.Forms;
     
    5859    private void loadButton_Click(object sender, EventArgs e) {
    5960      if (benchmarkComboBox.SelectedItem != null)
    60         Content.CreateProblemDataFromBenchmark((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem);
     61        Content.ProblemData = ((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem).GenerateProblemData();
    6162    }
    6263
     
    6465      base.OnContentChanged();
    6566      benchmarkComboBox.Items.Clear();
    66       benchmarkComboBox.Items.AddRange(Content.GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray());
     67      benchmarkComboBox.Items.AddRange(GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray());
    6768      if (benchmarkComboBox.Items.Count > 0)
    6869        benchmarkComboBox.SelectedIndex = 0;
    6970    }
     71
     72    protected IEnumerable<IDataAnalysisBenchmarkProblemDataGenerator> GetBenchmarkProblemDataGenerators() {
     73      if (Content is IRegressionProblem)
     74        return ApplicationManager.Manager.GetInstances<IRegressionBenchmarkProblemDataGenerator>();
     75      else if (Content is IClassificationProblem)
     76        return ApplicationManager.Manager.GetInstances<IClassificationBenchmarkProblemDataGenerator>();
     77      else if (Content is ITimeSeriesPrognosisProblem)
     78        return ApplicationManager.Manager.GetInstances<ITimeSeriesBenchmarkProblemDataGenerator>();
     79      else if (Content is IClusteringProblem)
     80        return ApplicationManager.Manager.GetInstances<IClusteringBenchmarkProblemDataGenerator>();
     81      return new List<IDataAnalysisBenchmarkProblemDataGenerator>();
     82    }
    7083  }
    7184}
Note: See TracChangeset for help on using the changeset viewer.