Changeset 13992
- Timestamp:
- 07/04/16 22:29:23 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/ZeroR.cs
r13098 r13992 64 64 .MaxItems(kvp => kvp.Value).Select(x => x.Key).First(); 65 65 66 var model = new ConstantModel(dominantClass );66 var model = new ConstantModel(dominantClass, target); 67 67 var solution = model.CreateClassificationSolution(problemData); 68 68 return solution; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeBuilder.cs
r13895 r13992 137 137 int nRows = idx.Count(); 138 138 139 // shuffle variable idx139 // shuffle variable names 140 140 HeuristicLab.Random.ListExtensions.ShuffleInPlace(allowedVariables, random); 141 141 … … 176 176 CreateRegressionTreeFromQueue(maxSize, lossFunction); 177 177 178 return new RegressionTreeModel(tree.ToArray() );178 return new RegressionTreeModel(tree.ToArray(), problemData.TargetVariable, ); 179 179 } 180 180 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs
r13941 r13992 149 149 #endregion 150 150 151 152 153 154 151 [StorableConstructor] 155 152 private RegressionTreeModel(bool serializing) : base(serializing) { } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r13100 r13992 292 292 private IRegressionSolution CreateConstantSolution() { 293 293 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average(); 294 var model = new ConstantModel(averageTrainingTarget );294 var model = new ConstantModel(averageTrainingTarget, ProblemData.TargetVariable); 295 295 var solution = model.CreateRegressionSolution(ProblemData); 296 296 solution.Name = "Baseline (constant)"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationModel.cs
r13941 r13992 55 55 } 56 56 57 [StorableHook(HookType.AfterDeserialization)] 58 private void AfterDeserialization() { 59 // BackwardsCompatibility3.3 60 #region Backwards compatible code, remove with 3.4 61 targetVariable = string.Empty; 62 #endregion 63 } 64 57 65 public abstract IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows); 58 66 public abstract IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r13941 r13992 64 64 65 65 public override IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 66 return new ConstantRegressionSolution(new ConstantModel(constant ), new RegressionProblemData(problemData));66 return new ConstantRegressionSolution(new ConstantModel(constant, TargetVariable), new RegressionProblemData(problemData)); 67 67 } 68 68 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionModel.cs
r13941 r13992 56 56 } 57 57 58 [StorableHook(HookType.AfterDeserialization)] 59 private void AfterDeserialization() { 60 // BackwardsCompatibility3.3 61 #region Backwards compatible code, remove with 3.4 62 targetVariable = string.Empty; 63 #endregion 64 } 58 65 public abstract IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows); 59 66 public abstract IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData);
Note: See TracChangeset
for help on using the changeset viewer.