Changeset 2619 for trunk/sources/HeuristicLab.Modeling
- Timestamp:
- 01/10/10 21:01:03 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Modeling/3.2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2/IPredictor.cs
r2381 r2619 30 30 double UpperPredictionLimit { get; set; } 31 31 double LowerPredictionLimit { get; set; } 32 double[]Predict(Dataset dataset, int start, int end);32 IEnumerable<double> Predict(Dataset dataset, int start, int end); 33 33 IEnumerable<string> GetInputVariables(); 34 34 } -
trunk/sources/HeuristicLab.Modeling/3.2/PredictorBase.cs
r2381 r2619 31 31 public double UpperPredictionLimit { get; set; } 32 32 public double LowerPredictionLimit { get; set; } 33 public abstract double[]Predict(Dataset dataset, int start, int end);33 public abstract IEnumerable<double> Predict(Dataset dataset, int start, int end); 34 34 public abstract IEnumerable<string> GetInputVariables(); 35 35 -
trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs
r2559 r2619 85 85 Dataset dirtyDataset = (Dataset)dataset.Clone(); 86 86 IPredictor dirtyPredictor = (IPredictor)predictor.Clone(); 87 double[] referenceValues = predictor.Predict(dataset, start, end) ;87 double[] referenceValues = predictor.Predict(dataset, start, end).ToArray(); 88 88 89 89 double mean; … … 101 101 mean = dataset.GetMean(variableName, start, end); 102 102 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); 103 newValues = dirtyPredictor.Predict(dirtyDataset, start, end) ;103 newValues = dirtyPredictor.Predict(dirtyDataset, start, end).ToArray(); 104 104 evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues); 105 105 dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end); -
trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs
r2559 r2619 85 85 IPredictor dirtyPredictor = (IPredictor)predictor.Clone(); 86 86 87 double[] predictedValues = predictor.Predict(dataset, start, end) ;87 double[] predictedValues = predictor.Predict(dataset, start, end).ToArray(); 88 88 double[] targetValues = dataset.GetVariableValues(targetVariableName, start, end); 89 89 … … 105 105 mean = dataset.GetMean(variableName, start, end); 106 106 oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end); 107 predictedValues = dirtyPredictor.Predict(dirtyDataset, start, end) ;107 predictedValues = dirtyPredictor.Predict(dirtyDataset, start, end).ToArray(); 108 108 newMSE = CalculateMSE(predictedValues, targetValues); 109 109 evaluationImpacts[variableName] = newMSE / oldMSE;
Note: See TracChangeset
for help on using the changeset viewer.