Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/12 15:21:28 (13 years ago)
Author:
sforsten
Message:

#1784: changes have been applied, according to the review comments of mkommend

Location:
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r7758 r7805  
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Problems.Instances;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    3132  [StorableClass]
    3233  [Creatable("Problems")]
    33   public class SymbolicRegressionMultiObjectiveProblem : SymbolicDataAnalysisMultiObjectiveProblem<IRegressionProblemData, ISymbolicRegressionMultiObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem {
     34  public class SymbolicRegressionMultiObjectiveProblem : SymbolicDataAnalysisMultiObjectiveProblem<IRegressionProblemData, ISymbolicRegressionMultiObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem,
     35    IProblemInstanceConsumer<IRegressionProblemData>, IProblemInstanceExporter<IRegressionProblemData> {
    3436    private const double PunishmentFactor = 10;
    3537    private const int InitialMaximumTreeDepth = 8;
     
    111113      }
    112114    }
     115
     116    #region Import & Export
     117    public new void Load(IRegressionProblemData data) {
     118      base.Load(data);
     119    }
     120
     121    public IRegressionProblemData Export() {
     122      if (ProblemData is IRegressionProblemData)
     123        return ProblemData;
     124      else {
     125        IRegressionProblemData regData = new RegressionProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable);
     126        return base.Export(regData);
     127      }
     128    }
     129    #endregion
    113130  }
    114131}
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r7770 r7805  
    3232  [Creatable("Problems")]
    3333  public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem,
    34     IProblemInstanceConsumer<RegressionProblemData>, IProblemInstanceExporter<RegressionProblemData> {
     34    IProblemInstanceConsumer<IRegressionProblemData>, IProblemInstanceExporter<IRegressionProblemData> {
    3535    private const double PunishmentFactor = 10;
    3636    private const int InitialMaximumTreeDepth = 8;
     
    115115
    116116    #region Import & Export
    117     public void Load(RegressionProblemData data) {
     117    public new void Load(IRegressionProblemData data) {
    118118      base.Load(data);
    119119    }
    120120
    121     public RegressionProblemData Export() {
    122       if (ProblemData is RegressionProblemData)
    123         return (RegressionProblemData)ProblemData;
     121    public IRegressionProblemData Export() {
     122      if (ProblemData is IRegressionProblemData)
     123        return ProblemData;
    124124      else {
    125         RegressionProblemData regData = new RegressionProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable);
    126         return (RegressionProblemData)base.Export(regData);
     125        IRegressionProblemData regData = new RegressionProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable);
     126        return base.Export(regData);
    127127      }
    128128    }
Note: See TracChangeset for help on using the changeset viewer.