Changeset 11571 for branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Timestamp:
- 11/24/14 15:16:59 (10 years ago)
- Location:
- branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationModel.cs
r11171 r11571 41 41 : base(tree, interpreter, lowerEstimationLimit, upperEstimationLimit) { } 42 42 43 public abstract IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows);43 public abstract IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows); 44 44 public abstract void RecalculateModelParameters(IClassificationProblemData problemData, IEnumerable<int> rows); 45 45 -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
r11171 r11571 88 88 var classValuesArr = classValues.ToArray(); 89 89 var thresholdsArr = thresholds.ToArray(); 90 if (thresholdsArr.Length != classValuesArr.Length || thresholdsArr.Length < 1) 90 if (thresholdsArr.Length != classValuesArr.Length || thresholdsArr.Length < 1) 91 91 throw new ArgumentException(); 92 if (!double.IsNegativeInfinity(thresholds.First())) 92 if (!double.IsNegativeInfinity(thresholds.First())) 93 93 throw new ArgumentException(); 94 94 … … 107 107 } 108 108 109 public IEnumerable<double> GetEstimatedValues( Dataset dataset, IEnumerable<int> rows) {109 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 110 110 return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows).LimitToRange(LowerEstimationLimit, UpperEstimationLimit); 111 111 } 112 112 113 public override IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {113 public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 114 114 if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current symbolic classification model."); 115 115 foreach (var x in GetEstimatedValues(dataset, rows)) { -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicNearestNeighbourClassificationModel.cs
r11171 r11571 66 66 } 67 67 68 public override IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {68 public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 69 69 var estimatedValues = Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows) 70 70 .LimitToRange(LowerEstimationLimit, UpperEstimationLimit);
Note: See TracChangeset
for help on using the changeset viewer.