Changeset 11571 for branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 11/24/14 15:16:59 (10 years ago)
- Location:
- branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
r11171 r11571 67 67 } 68 68 69 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors( Dataset dataset, IEnumerable<int> rows) {69 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) { 70 70 var estimatedValuesEnumerators = (from model in models 71 71 select model.GetEstimatedClassValues(dataset, rows).GetEnumerator()) … … 82 82 #region IClassificationModel Members 83 83 84 public IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {84 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 85 85 foreach (var estimatedValuesVector in GetEstimatedClassValueVectors(dataset, rows)) { 86 86 // return the class which is most often occuring -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
r11171 r11571 231 231 } 232 232 233 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors( Dataset dataset, IEnumerable<int> rows) {233 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) { 234 234 if (!Model.Models.Any()) yield break; 235 235 var estimatedValuesEnumerators = (from model in Model.Models -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r11171 r11571 300 300 } 301 301 302 public ClassificationProblemData( Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)302 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 303 303 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 304 304 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); … … 313 313 } 314 314 315 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables( Dataset dataset) {315 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) { 316 316 int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows); 317 317 var validTargetVariables = (from v in dataset.DoubleVariables -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r11171 r11571 111 111 112 112 113 public IEnumerable<double> GetEstimatedValues( Dataset dataset, IEnumerable<int> rows) {113 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 114 114 return model.GetEstimatedValues(dataset, rows); 115 115 } 116 116 117 public IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {117 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 118 118 if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model."); 119 119 foreach (var x in GetEstimatedValues(dataset, rows)) {
Note: See TracChangeset
for help on using the changeset viewer.