- Timestamp:
- 12/02/10 15:25:55 (14 years ago)
- Location:
- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/OverfittingAnalyzer.cs
r4326 r5010 119 119 get { return (ILookupParameter<DoubleValue>)Parameters["InitialTrainingQuality"]; } 120 120 } 121 public ILookupParameter< DoubleMatrix> TrainingAndValidationQualitiesParameter {122 get { return (ILookupParameter< DoubleMatrix>)Parameters["TrainingAndValidationQualities"]; }121 public ILookupParameter<ItemList<DoubleMatrix>> TrainingAndValidationQualitiesParameter { 122 get { return (ILookupParameter<ItemList<DoubleMatrix>>)Parameters["TrainingAndValidationQualities"]; } 123 123 } 124 124 public IValueLookupParameter<DoubleValue> PercentileParameter { … … 187 187 Parameters.Add(new LookupParameter<ResultCollection>("Results")); 188 188 Parameters.Add(new LookupParameter<DoubleValue>("InitialTrainingQuality")); 189 Parameters.Add(new LookupParameter< DoubleMatrix>("TrainingAndValidationQualities"));189 Parameters.Add(new LookupParameter<ItemList<DoubleMatrix>>("TrainingAndValidationQualities")); 190 190 Parameters.Add(new ValueLookupParameter<DoubleValue>("Percentile", new DoubleValue(1))); 191 191 … … 207 207 //} 208 208 if (!Parameters.ContainsKey("TrainingAndValidationQualities")) { 209 Parameters.Add(new LookupParameter< DoubleMatrix>("TrainingAndValidationQualities"));209 Parameters.Add(new LookupParameter<ItemList<DoubleMatrix>>("TrainingAndValidationQualities")); 210 210 } 211 211 if (!Parameters.ContainsKey("Percentile")) { … … 290 290 double[] validationArr = new double[n]; 291 291 double[] trainingArr = new double[n]; 292 //double[,] qualitiesArr = new double[n, 2];292 double[,] qualitiesArr = new double[n, 2]; 293 293 for (int i = 0; i < n; i++) { 294 294 validationArr[i] = orderedDistinctPairs[i].Validation; 295 295 trainingArr[i] = orderedDistinctPairs[i].Training; 296 296 297 //qualitiesArr[i, 0] = trainingArr[i];298 //qualitiesArr[i, 1] = validationArr[i];297 qualitiesArr[i, 0] = trainingArr[i]; 298 qualitiesArr[i, 1] = validationArr[i]; 299 299 } 300 300 double r = alglib.correlation.spearmanrankcorrelation(trainingArr, validationArr, n); … … 309 309 310 310 OverfittingParameter.ActualValue = new BoolValue(overfitting); 311 //TrainingAndValidationQualitiesParameter.ActualValue = new DoubleMatrix(qualitiesArr); 311 ItemList<DoubleMatrix> list = TrainingAndValidationQualitiesParameter.ActualValue; 312 if (list == null) { 313 TrainingAndValidationQualitiesParameter.ActualValue = new ItemList<DoubleMatrix>(); 314 } 315 TrainingAndValidationQualitiesParameter.ActualValue.Add(new DoubleMatrix(qualitiesArr)); 312 316 return base.Apply(); 313 317 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs
r4443 r5010 61 61 let boundedX = Math.Min(UpperEstimationLimit, Math.Max(LowerEstimationLimit, x)) 62 62 select double.IsNaN(boundedX) ? UpperEstimationLimit : boundedX; 63 estimatedValues = Enumerable.Repeat( double.NaN, Math.Abs(minLag)).Concat(calculatedValues).ToList();63 estimatedValues = Enumerable.Repeat(UpperEstimationLimit, Math.Abs(minLag)).Concat(calculatedValues).ToList(); 64 64 OnEstimatedValuesChanged(); 65 65 }
Note: See TracChangeset
for help on using the changeset viewer.