Changeset 6666 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
- Timestamp:
- 08/17/11 14:37:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r6439 r6666 34 34 [Item("RegressionProblemData", "Represents an item containing all data defining a regression problem.")] 35 35 public class RegressionProblemData : DataAnalysisProblemData, IRegressionProblemData { 36 pr ivateconst string TargetVariableParameterName = "TargetVariable";36 protected const string TargetVariableParameterName = "TargetVariable"; 37 37 38 38 #region default data … … 68 68 private static string defaultTargetVariable; 69 69 70 private static RegressionProblemData emptyProblemData; 71 public static RegressionProblemData EmptyProblemData { 72 get { return emptyProblemData; } 73 } 74 70 75 static RegressionProblemData() { 71 76 defaultDataset = new Dataset(new string[] { "y", "x" }, kozaF1); … … 74 79 defaultAllowedInputVariables = new List<string>() { "x" }; 75 80 defaultTargetVariable = "y"; 81 82 var problemData = new RegressionProblemData(); 83 problemData.Parameters.Clear(); 84 problemData.Name = "Empty Regression ProblemData"; 85 problemData.Description = "This ProblemData acts as place holder before the correct problem data is loaded."; 86 problemData.isEmpty = true; 87 88 problemData.Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", new Dataset())); 89 problemData.Parameters.Add(new FixedValueParameter<ReadOnlyCheckedItemList<StringValue>>(InputVariablesParameterName, "")); 90 problemData.Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", (IntRange)new IntRange(0, 0).AsReadOnly())); 91 problemData.Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", (IntRange)new IntRange(0, 0).AsReadOnly())); 92 problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>())); 93 emptyProblemData = problemData; 76 94 } 77 95 #endregion … … 91 109 } 92 110 93 94 111 protected RegressionProblemData(RegressionProblemData original, Cloner cloner) 95 112 : base(original, cloner) { 96 113 RegisterParameterEvents(); 97 114 } 98 public override IDeepCloneable Clone(Cloner cloner) { return new RegressionProblemData(this, cloner); } 115 public override IDeepCloneable Clone(Cloner cloner) { 116 if (this == emptyProblemData) return emptyProblemData; 117 return new RegressionProblemData(this, cloner); 118 } 99 119 100 120 public RegressionProblemData()
Note: See TracChangeset
for help on using the changeset viewer.