Changeset 7770 for branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Timestamp:
- 04/30/12 12:52:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r7759 r7770 111 111 } 112 112 113 #region Import & Export 113 114 public void Load(ClassificationProblemData data) { 114 Name = data.Name; 115 Description = data.Description; 116 ProblemData = new ClassificationProblemData(data.Dataset, data.AllowedInputVariables, data.TargetVariable); 117 ProblemData.TrainingPartition.Start = data.TrainingPartition.Start; 118 ProblemData.TrainingPartition.End = data.TrainingPartition.End; 119 ProblemData.TestPartition.Start = data.TestPartition.Start; 120 ProblemData.TestPartition.End = data.TestPartition.End; 121 OnReset(); 115 base.Load(data); 122 116 } 123 117 124 118 public ClassificationProblemData Export() { 125 ClassificationProblemData claData = new ClassificationProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable); 126 claData.Name = Name; 127 claData.Description = Description; 128 claData.TrainingPartition.Start = ProblemData.TrainingPartition.Start; 129 claData.TrainingPartition.End = ProblemData.TrainingPartition.End; 130 claData.TestPartition.Start = ProblemData.TestPartition.Start; 131 claData.TestPartition.End = ProblemData.TestPartition.End; 132 return claData; 119 if (ProblemData is ClassificationProblemData) { 120 return (ClassificationProblemData)ProblemData; 121 } else { 122 ClassificationProblemData claData = new ClassificationProblemData(ProblemData.Dataset, ProblemData.AllowedInputVariables, ProblemData.TargetVariable); 123 return (ClassificationProblemData)base.Export(claData); 124 } 133 125 } 126 #endregion 134 127 } 135 128 }
Note: See TracChangeset
for help on using the changeset viewer.