Changeset 11064 for branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Timestamp:
- 07/01/14 10:53:46 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing
- Property svn:mergeinfo changed
/trunk/sources merged: 11008,11012-11014,11019,11024-11027,11031,11034-11035,11048,11050-11052,11056-11058,11060
- Property svn:mergeinfo changed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression merged: 11025-11026
- Property svn:mergeinfo changed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPruningOperator.cs
r10538 r11064 1 using System.Linq; 1 #region License Information 2 3 /* HeuristicLab 4 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 * 6 * This file is part of HeuristicLab. 7 * 8 * HeuristicLab is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * HeuristicLab is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #endregion 23 24 using System.Linq; 2 25 using HeuristicLab.Common; 3 26 using HeuristicLab.Core; … … 10 33 public class SymbolicRegressionPruningOperator : SymbolicDataAnalysisExpressionPruningOperator { 11 34 private const string ImpactValuesCalculatorParameterName = "ImpactValuesCalculator"; 12 private const string ImpactValuesCalculatorParameterDescription = "The impact values calculator to be used for figuring out the node impacts.";13 14 private const string EvaluatorParameterName = "Evaluator";15 16 public ILookupParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter {17 get { return (ILookupParameter<ISymbolicRegressionSingleObjectiveEvaluator>)Parameters[EvaluatorParameterName]; }18 }19 35 20 36 protected SymbolicRegressionPruningOperator(SymbolicRegressionPruningOperator original, Cloner cloner) … … 30 46 public SymbolicRegressionPruningOperator() { 31 47 var impactValuesCalculator = new SymbolicRegressionSolutionImpactValuesCalculator(); 32 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisSolutionImpactValuesCalculator>(ImpactValuesCalculatorParameterName, ImpactValuesCalculatorParameterDescription, impactValuesCalculator)); 33 Parameters.Add(new LookupParameter<ISymbolicRegressionSingleObjectiveEvaluator>(EvaluatorParameterName)); 48 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisSolutionImpactValuesCalculator>(ImpactValuesCalculatorParameterName, "The impact values calculator to be used for figuring out the node impacts.", impactValuesCalculator)); 34 49 } 35 50 … … 41 56 var regressionModel = (IRegressionModel)model; 42 57 var regressionProblemData = (IRegressionProblemData)ProblemData; 43 var trainingIndices = ProblemData.TrainingIndices.ToList();58 var trainingIndices = Enumerable.Range(FitnessCalculationPartition.Start, FitnessCalculationPartition.Size); 44 59 var estimatedValues = regressionModel.GetEstimatedValues(ProblemData.Dataset, trainingIndices); // also bounds the values 45 60 var targetValues = ProblemData.Dataset.GetDoubleValues(regressionProblemData.TargetVariable, trainingIndices);
Note: See TracChangeset
for help on using the changeset viewer.