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.Classification/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r7758 r7805  
    2525using HeuristicLab.Parameters;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Problems.Instances;
    2728
    2829namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    3031  [StorableClass]
    3132  [Creatable("Problems")]
    32   public class SymbolicClassificationMultiObjectiveProblem : SymbolicDataAnalysisMultiObjectiveProblem<IClassificationProblemData, ISymbolicClassificationMultiObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem {
     33  public class SymbolicClassificationMultiObjectiveProblem : SymbolicDataAnalysisMultiObjectiveProblem<IClassificationProblemData, ISymbolicClassificationMultiObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem,
     34    IProblemInstanceConsumer<IClassificationProblemData>, IProblemInstanceExporter<IClassificationProblemData> {
    3335    private const double PunishmentFactor = 10;
    3436    private const int InitialMaximumTreeDepth = 8;
     
    107109      }
    108110    }
     111
     112    #region Import & Export
     113    public new void Load(IClassificationProblemData data) {
     114      base.Load(data);
     115    }
     116
     117    public IClassificationProblemData Export() {
     118      if (ProblemData is IClassificationProblemData) {
     119        return ProblemData;
     120      } else {
     121        ClassificationProblemData claData = new ClassificationProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable);
     122        return base.Export(claData);
     123      }
     124    }
     125    #endregion
    109126  }
    110127}
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r7770 r7805  
    3131  [Creatable("Problems")]
    3232  public class SymbolicClassificationSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IClassificationProblemData, ISymbolicClassificationSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IClassificationProblem,
    33     IProblemInstanceConsumer<ClassificationProblemData>, IProblemInstanceExporter<ClassificationProblemData> {
     33    IProblemInstanceConsumer<IClassificationProblemData>, IProblemInstanceExporter<IClassificationProblemData> {
    3434    private const double PunishmentFactor = 10;
    3535    private const int InitialMaximumTreeDepth = 8;
     
    112112
    113113    #region Import & Export
    114     public void Load(ClassificationProblemData data) {
     114    public new void Load(IClassificationProblemData data) {
    115115      base.Load(data);
    116116    }
    117117
    118     public ClassificationProblemData Export() {
    119       if (ProblemData is ClassificationProblemData) {
    120         return (ClassificationProblemData)ProblemData;
     118    public IClassificationProblemData Export() {
     119      if (ProblemData is IClassificationProblemData) {
     120        return ProblemData;
    121121      } else {
    122122        ClassificationProblemData claData = new ClassificationProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable);
    123         return (ClassificationProblemData)base.Export(claData);
     123        return base.Export(claData);
    124124      }
    125125    }
Note: See TracChangeset for help on using the changeset viewer.