#region License Information
/* HeuristicLab
* Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using HeuristicLab.Problems.DataAnalysis;
using HeuristicLab.Problems.Instances.DataAnalysis;
namespace HeuristicLab.Problems.Instances.Regression.TrentMcConaghy {
public class TrentMcConaghyInstanceProvider : ResourceRegressionInstanceProvider {
public override string Name {
get { return "Trent McConaghy Benchmark Problems"; }
}
public override string Description {
get {
return "Paper: Deterministic Symbolic Regression Technology, Genetic Programming Theory and Practice IX" + Environment.NewLine
+ "High-Dimensional Statistical Modeling and Analysis of Custom Integrated Circuits" + Environment.NewLine
+ "Authors: T. McConaghy" + Environment.NewLine
+ "Website: http://trent.st/ffx/";
}
}
public override Uri WebLink {
get { return new Uri("http://trent.st/ffx/"); }
}
public override string ReferencePublication {
get { return ""; }
}
protected override string FileName { get { return "TrentMcConaghy"; } }
public override IRegressionProblemData LoadData(IDataDescriptor id) {
IRegressionProblemData regData = base.LoadData(id);
string targetVar = regData.InputVariables.First().Value;
IEnumerable allowedInputVars = regData.InputVariables.Where(x => !x.Equals(regData.TargetVariable)).Select(x => x.Value);
RegressionProblemData newRegData = new RegressionProblemData(regData.Dataset, allowedInputVars, targetVar);
return regData;
}
/**
* has to be overriden to get the ResourceName of this Assembly
*/
protected override string GetResourceName(string fileName) {
return Assembly.GetExecutingAssembly().GetManifestResourceNames()
.Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault();
}
}
}