Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/02/10 15:25:55 (14 years ago)
Author:
gkronber
Message:

commit of local changes in data-analysis feature exploration branch. #1142

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  
    119119      get { return (ILookupParameter<DoubleValue>)Parameters["InitialTrainingQuality"]; }
    120120    }
    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"]; }
    123123    }
    124124    public IValueLookupParameter<DoubleValue> PercentileParameter {
     
    187187      Parameters.Add(new LookupParameter<ResultCollection>("Results"));
    188188      Parameters.Add(new LookupParameter<DoubleValue>("InitialTrainingQuality"));
    189       Parameters.Add(new LookupParameter<DoubleMatrix>("TrainingAndValidationQualities"));
     189      Parameters.Add(new LookupParameter<ItemList<DoubleMatrix>>("TrainingAndValidationQualities"));
    190190      Parameters.Add(new ValueLookupParameter<DoubleValue>("Percentile", new DoubleValue(1)));
    191191
     
    207207      //}
    208208      if (!Parameters.ContainsKey("TrainingAndValidationQualities")) {
    209         Parameters.Add(new LookupParameter<DoubleMatrix>("TrainingAndValidationQualities"));
     209        Parameters.Add(new LookupParameter<ItemList<DoubleMatrix>>("TrainingAndValidationQualities"));
    210210      }
    211211      if (!Parameters.ContainsKey("Percentile")) {
     
    290290      double[] validationArr = new double[n];
    291291      double[] trainingArr = new double[n];
    292       //double[,] qualitiesArr = new double[n, 2];
     292      double[,] qualitiesArr = new double[n, 2];
    293293      for (int i = 0; i < n; i++) {
    294294        validationArr[i] = orderedDistinctPairs[i].Validation;
    295295        trainingArr[i] = orderedDistinctPairs[i].Training;
    296296
    297         //qualitiesArr[i, 0] = trainingArr[i];
    298         //qualitiesArr[i, 1] = validationArr[i];
     297        qualitiesArr[i, 0] = trainingArr[i];
     298        qualitiesArr[i, 1] = validationArr[i];
    299299      }
    300300      double r = alglib.correlation.spearmanrankcorrelation(trainingArr, validationArr, n);
     
    309309
    310310      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));
    312316      return base.Apply();
    313317    }
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs

    r4443 r5010  
    6161          let boundedX = Math.Min(UpperEstimationLimit, Math.Max(LowerEstimationLimit, x))
    6262          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();
    6464      OnEstimatedValuesChanged();
    6565    }
Note: See TracChangeset for help on using the changeset viewer.