- Timestamp:
- 06/09/09 14:34:56 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs
r1891 r2034 45 45 // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE 46 46 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 47 double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;47 double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, true).Data; 48 48 DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false); 49 49 if (mse == null) { -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs
r1891 r2034 40 40 AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In)); 41 41 AddVariableInfo(new VariableInfo("TotalEvaluatedNodes", "Number of evaluated nodes", typeof(DoubleData), VariableKind.In | VariableKind.Out)); 42 AddVariableInfo(new VariableInfo("TrainingSamplesStart", "Start index of training samples in dataset", typeof(IntData), VariableKind.In)); 43 AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "End index of training samples in dataset", typeof(IntData), VariableKind.In)); 42 44 AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); 43 45 AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In)); … … 51 53 IFunctionTree functionTree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true); 52 54 double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data; 53 int treeSize = scope.GetVariableValue<IntData>("TreeSize", false).Data;55 int treeSize = scope.GetVariableValue<IntData>("TreeSize", true).Data; 54 56 double totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data; 57 int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data; 58 int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data; 55 59 int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data; 56 60 int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data; 57 61 bool useEstimatedValues = GetVariableValue<BoolData>("UseEstimatedTargetValue", scope, true).Data; 58 62 ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true); 59 evaluator.PrepareForEvaluation( functionTree);63 evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, functionTree); 60 64 61 65 double[] backupValues = null; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs
r1891 r2034 51 51 // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE 52 52 public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) { 53 double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;53 double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, true).Data; 54 54 int minSamples = GetVariableValue<IntData>("MinEvaluatedSamples", scope, true).Data; 55 55 MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
Note: See TracChangeset
for help on using the changeset viewer.