1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using System.Linq;
|
---|
25 | using System.Reflection;
|
---|
26 | using System.Text.RegularExpressions;
|
---|
27 | using HeuristicLab.Problems.DataAnalysis;
|
---|
28 | using HeuristicLab.Problems.Instances.DataAnalysis;
|
---|
29 |
|
---|
30 | namespace HeuristicLab.Problems.Instances.Regression.TrentMcConaghy {
|
---|
31 | public class TrentMcConaghyInstanceProvider : ResourceRegressionInstanceProvider {
|
---|
32 | public override string Name {
|
---|
33 | get { return "Trent McConaghy Benchmark Problems"; }
|
---|
34 | }
|
---|
35 | public override string Description {
|
---|
36 | get {
|
---|
37 | return "Paper: Deterministic Symbolic Regression Technology, Genetic Programming Theory and Practice IX" + Environment.NewLine
|
---|
38 | + "High-Dimensional Statistical Modeling and Analysis of Custom Integrated Circuits" + Environment.NewLine
|
---|
39 | + "Authors: T. McConaghy" + Environment.NewLine
|
---|
40 | + "Website: http://trent.st/ffx/";
|
---|
41 | }
|
---|
42 | }
|
---|
43 | public override Uri WebLink {
|
---|
44 | get { return new Uri("http://trent.st/ffx/"); }
|
---|
45 | }
|
---|
46 | public override string ReferencePublication {
|
---|
47 | get { return ""; }
|
---|
48 | }
|
---|
49 |
|
---|
50 | protected override string FileName { get { return "TrentMcConaghy"; } }
|
---|
51 |
|
---|
52 | public override IRegressionProblemData LoadData(IDataDescriptor id) {
|
---|
53 | IRegressionProblemData regData = base.LoadData(id);
|
---|
54 | string targetVar = regData.InputVariables.First().Value;
|
---|
55 | IEnumerable<string> allowedInputVars = regData.InputVariables.Where(x => !x.Equals(regData.TargetVariable)).Select(x => x.Value);
|
---|
56 | RegressionProblemData newRegData = new RegressionProblemData(regData.Dataset, allowedInputVars, targetVar);
|
---|
57 |
|
---|
58 | return regData;
|
---|
59 | }
|
---|
60 |
|
---|
61 | /**
|
---|
62 | * has to be overriden to get the ResourceName of this Assembly
|
---|
63 | */
|
---|
64 | protected override string GetResourceName(string fileName) {
|
---|
65 | return Assembly.GetExecutingAssembly().GetManifestResourceNames()
|
---|
66 | .Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault();
|
---|
67 | }
|
---|
68 | }
|
---|
69 | }
|
---|