Changeset 3892 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 06/02/10 19:10:35 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/LinearRegression.cs
r3886 r3892 120 120 121 121 protected override void Problem_Reset(object sender, EventArgs e) { 122 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 123 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 122 UpdateAlgorithmParameterValues(); 124 123 base.Problem_Reset(sender, e); 125 124 } … … 129 128 solutionCreator.DataAnalysisProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 130 129 evaluator.RegressionProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 131 analyzer.ProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 132 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 133 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 130 analyzer.ProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 131 UpdateAlgorithmParameterValues(); 134 132 Problem.Reset += new EventHandler(Problem_Reset); 135 133 base.OnProblemChanged(); 136 134 } 135 137 136 138 137 #endregion … … 145 144 solutionCreator.SymbolicExpressionTreeParameter.ActualName = LinearRegressionModelParameterName; 146 145 147 evaluator.LowerEstimationLimitParameter.Value = new DoubleValue(double.NegativeInfinity);148 evaluator.UpperEstimationLimitParameter.Value = new DoubleValue(double.PositiveInfinity);149 146 evaluator.SymbolicExpressionTreeParameter.ActualName = solutionCreator.SymbolicExpressionTreeParameter.ActualName; 150 147 evaluator.SymbolicExpressionTreeInterpreterParameter.ActualName = ModelInterpreterParameter.Name; … … 161 158 analyzer.QualityParameter.Depth = 0; 162 159 analyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = ModelInterpreterParameter.Name; 163 analyzer.LowerEstimationLimitParameter.Value = new DoubleValue(double.NegativeInfinity);164 analyzer.UpperEstimationLimitParameter.Value = new DoubleValue(double.PositiveInfinity);165 160 166 161 if (Problem != null) { … … 171 166 } 172 167 } 168 169 private void UpdateAlgorithmParameterValues() { 170 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 171 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 172 //var targetValues = 173 // Problem.DataAnalysisProblemData.Dataset.GetVariableValues(Problem.DataAnalysisProblemData.TargetVariable.Value, 174 // TrainingSamplesStartParameter.Value.Value, TrainingSamplesEndParameter.Value.Value); 175 //double range = targetValues.Max() - targetValues.Min(); 176 //double lowerEstimationLimit = targetValues.Average() - 10.0 * range; 177 //double upperEstimationLimit = targetValues.Average() + 10.0 * range; 178 //evaluator.LowerEstimationLimitParameter.Value = new DoubleValue(lowerEstimationLimit); 179 //evaluator.UpperEstimationLimitParameter.Value = new DoubleValue(upperEstimationLimit); 180 //analyzer.LowerEstimationLimitParameter.Value = new DoubleValue(lowerEstimationLimit); 181 //analyzer.UpperEstimationLimitParameter.Value = new DoubleValue(upperEstimationLimit); 182 } 173 183 #endregion 174 184 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/SupportVectorMachine.cs
r3884 r3892 169 169 170 170 protected override void Problem_Reset(object sender, EventArgs e) { 171 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 172 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 171 UpdateAlgorithmParameters(); 173 172 base.Problem_Reset(sender, e); 174 173 } … … 179 178 evaluator.DataAnalysisProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 180 179 analyzer.ProblemDataParameter.ActualName = Problem.DataAnalysisProblemDataParameter.Name; 181 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 182 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 180 UpdateAlgorithmParameters(); 183 181 Problem.Reset += new EventHandler(Problem_Reset); 184 182 base.OnProblemChanged(); … … 210 208 analyzer.QualityParameter.ActualName = mseEvaluator.MeanSquaredErrorParameter.ActualName; 211 209 analyzer.QualityParameter.Depth = 0; 212 analyzer.LowerEstimationLimitParameter.Value = new DoubleValue(double.NegativeInfinity);213 analyzer.UpperEstimationLimitParameter.Value = new DoubleValue(double.PositiveInfinity);214 210 215 211 if (Problem != null) { … … 220 216 } 221 217 } 218 219 private void UpdateAlgorithmParameters() { 220 TrainingSamplesStartParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesStart; 221 TrainingSamplesEndParameter.ActualValue = Problem.DataAnalysisProblemData.TrainingSamplesEnd; 222 } 222 223 #endregion 223 224 }
Note: See TracChangeset
for help on using the changeset viewer.