- Timestamp:
- 08/03/09 12:26:42 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/CoefficientOfDeterminationEvaluator.cs
r2136 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Core;27 using HeuristicLab.Data;28 using HeuristicLab.Operators;29 23 using HeuristicLab.Modeling; 30 24 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs
r2034 r2222 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Core; 27 23 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 24 30 25 namespace HeuristicLab.GP.StructureIdentification { -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs
r2130 r2222 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Core; 27 23 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 24 using HeuristicLab.DataAnalysis; 25 using HeuristicLab.GP.Interfaces; 30 26 31 27 namespace HeuristicLab.GP.StructureIdentification { … … 34 30 : base() { 35 31 AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In)); 36 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IFunctionTree), VariableKind.In)); 37 AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In)); 32 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In)); 38 33 AddVariableInfo(new VariableInfo("Dataset", "Dataset with all samples on which to apply the function", typeof(Dataset), VariableKind.In)); 39 34 AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In)); … … 51 46 int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data; 52 47 Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true); 53 I FunctionTree functionTree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);48 IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true); 54 49 double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data; 55 int treeSize = scope.GetVariableValue<IntData>("TreeSize", true).Data;56 50 double totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data; 57 51 int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data; … … 61 55 bool useEstimatedValues = GetVariableValue<BoolData>("UseEstimatedTargetValue", scope, true).Data; 62 56 ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true); 63 evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, functionTree);57 evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, gpModel.FunctionTree); 64 58 65 59 double[] backupValues = null; … … 86 80 87 81 // update the value of total evaluated nodes 88 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end - start);82 scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + gpModel.Size * (end - start); 89 83 return null; 90 84 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs
r2136 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Core;27 using HeuristicLab.Data;28 using HeuristicLab.Operators;29 23 using HeuristicLab.Modeling; 30 using HeuristicLab.DataAnalysis;31 24 32 25 namespace HeuristicLab.GP.StructureIdentification { -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanAbsolutePercentageOfRangeErrorEvaluator.cs
r2136 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Core;27 using HeuristicLab.Data;28 using HeuristicLab.Operators;29 23 using HeuristicLab.Modeling; 30 using HeuristicLab.DataAnalysis;31 24 32 25 namespace HeuristicLab.GP.StructureIdentification { -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/MeanSquaredErrorEvaluator.cs
r2136 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Core;27 using HeuristicLab.Data;28 using HeuristicLab.Operators;29 using HeuristicLab.DataAnalysis;30 23 using HeuristicLab.Modeling; 31 24 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleEvaluator.cs
r2041 r2222 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Core; 27 23 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 24 using HeuristicLab.DataAnalysis; 30 25 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/SimpleGPEvaluatorBase.cs
r1894 r2222 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Core; 27 23 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 24 using HeuristicLab.DataAnalysis; 30 25 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs
r2034 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 23 using HeuristicLab.Core; 27 24 using HeuristicLab.Data; 28 using HeuristicLab.Operators;29 using HeuristicLab.DataAnalysis;30 25 using HeuristicLab.Random; 31 26 -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableEvaluationImpactCalculator.cs
r2165 r2222 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 using System.Xml;26 22 using HeuristicLab.Core; 27 23 using HeuristicLab.Data; 28 24 using HeuristicLab.DataAnalysis; 29 using System.Linq;25 using HeuristicLab.GP.Interfaces; 30 26 31 27 namespace HeuristicLab.GP.StructureIdentification { … … 35 31 : base() { 36 32 AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In)); 37 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(I FunctionTree), VariableKind.In));33 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In)); 38 34 AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In)); 39 35 AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In)); … … 43 39 protected override double[] GetOutputs(IScope scope, Dataset dataset, int targetVariable, int start, int end) { 44 40 ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true); 45 I FunctionTree tree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);41 IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true); 46 42 double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data; 47 evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, tree);43 evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, gpModel.FunctionTree); 48 44 49 45 double[] result = new double[end - start]; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VariableQualityImpactCalculator.cs
r2165 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Text;25 using System.Xml;26 23 using HeuristicLab.Core; 27 24 using HeuristicLab.Data; 28 25 using HeuristicLab.DataAnalysis; 29 using System.Linq;26 using HeuristicLab.GP.Interfaces; 30 27 31 28 namespace HeuristicLab.GP.StructureIdentification { … … 35 32 : base() { 36 33 AddVariableInfo(new VariableInfo("TreeEvaluator", "The evaluator that should be used to evaluate the expression tree", typeof(ITreeEvaluator), VariableKind.In)); 37 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(I FunctionTree), VariableKind.In));34 AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IGeneticProgrammingModel), VariableKind.In)); 38 35 AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In)); 39 36 AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In)); … … 42 39 protected override double CalculateQuality(IScope scope, Dataset dataset, int targetVariable, int start, int end) { 43 40 ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true); 44 I FunctionTree tree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);41 IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true); 45 42 double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data; 46 evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, tree);43 evaluator.PrepareForEvaluation(dataset, targetVariable, start, end, punishmentFactor, gpModel.FunctionTree); 47 44 48 45 double[,] result = new double[end - start, 2]; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/VarianceAccountedForEvaluator.cs
r2136 r2222 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Core;27 using HeuristicLab.Data;28 using HeuristicLab.Operators;29 using HeuristicLab.DataAnalysis;30 23 using HeuristicLab.Modeling; 31 24
Note: See TracChangeset
for help on using the changeset viewer.