Changeset 7805 for branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 05/14/12 15:21:28 (13 years ago)
- 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 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.Instances; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 31 32 [StorableClass] 32 33 [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> { 34 36 private const double PunishmentFactor = 10; 35 37 private const int InitialMaximumTreeDepth = 8; … … 111 113 } 112 114 } 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 113 130 } 114 131 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r7770 r7805 32 32 [Creatable("Problems")] 33 33 public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem, 34 IProblemInstanceConsumer< RegressionProblemData>, IProblemInstanceExporter<RegressionProblemData> {34 IProblemInstanceConsumer<IRegressionProblemData>, IProblemInstanceExporter<IRegressionProblemData> { 35 35 private const double PunishmentFactor = 10; 36 36 private const int InitialMaximumTreeDepth = 8; … … 115 115 116 116 #region Import & Export 117 public void Load(RegressionProblemData data) {117 public new void Load(IRegressionProblemData data) { 118 118 base.Load(data); 119 119 } 120 120 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; 124 124 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); 127 127 } 128 128 }
Note: See TracChangeset
for help on using the changeset viewer.