- Timestamp:
- 05/14/09 13:46:57 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/AveragePercentageChangeEvaluator.cs
r1529 r1796 42 42 } 43 43 44 public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {44 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, IFunctionTree tree, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 45 45 bool differential = GetVariableValue<BoolData>("Differential", scope, true).Data; 46 46 DoubleData apc = GetVariableValue<DoubleData>("APC", scope, false, false); … … 58 58 prevOriginal = dataset.GetValue(sample - 1, targetVariable); 59 59 originalPercentageChange = (dataset.GetValue(sample, targetVariable) - prevOriginal) / prevOriginal; 60 estimatedPercentageChange = (evaluator.Evaluate( sample) - prevOriginal) / prevOriginal;60 estimatedPercentageChange = (evaluator.Evaluate(tree, sample) - prevOriginal) / prevOriginal; 61 61 if (updateTargetValues) { 62 62 dataset.SetValue(sample, targetVariable, estimatedPercentageChange * prevOriginal + prevOriginal); … … 64 64 } else { 65 65 originalPercentageChange = dataset.GetValue(sample, targetVariable); 66 estimatedPercentageChange = evaluator.Evaluate( sample);66 estimatedPercentageChange = evaluator.Evaluate(tree, sample); 67 67 if (updateTargetValues) { 68 68 dataset.SetValue(sample, targetVariable, estimatedPercentageChange); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/ProfitEvaluator.cs
r1529 r1796 43 43 } 44 44 45 public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {45 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, IFunctionTree tree, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 46 46 int exchangeRateVarIndex = GetVariableValue<IntData>("ExchangeRate", scope, true).Data; 47 47 double transactionCost = GetVariableValue<DoubleData>("TransactionCost", scope, true).Data; … … 58 58 exchangeRate = dataset.GetValue(sample, exchangeRateVarIndex); 59 59 double originalPercentageChange = dataset.GetValue(sample, targetVariable); 60 double estimatedPercentageChange = evaluator.Evaluate( sample);60 double estimatedPercentageChange = evaluator.Evaluate(tree, sample); 61 61 if (updateTargetValues) { 62 62 dataset.SetValue(sample, targetVariable, estimatedPercentageChange); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/TheilInequalityCoefficientEvaluator.cs
r1529 r1796 54 54 } 55 55 56 public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {56 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, IFunctionTree tree, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 57 57 #region create result variables 58 58 DoubleData theilInequaliy = GetVariableValue<DoubleData>("TheilInequalityCoefficient", scope, false, false); … … 85 85 for (int sample = start; sample < end; sample++) { 86 86 double prevValue = dataset.GetValue(sample - 1, targetVariable); 87 double estimatedChange = evaluator.Evaluate( sample) - prevValue;87 double estimatedChange = evaluator.Evaluate(tree, sample) - prevValue; 88 88 double originalChange = dataset.GetValue(sample, targetVariable) - prevValue; 89 89 if (updateTargetValues) {
Note: See TracChangeset
for help on using the changeset viewer.