Changeset 12515 for branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 06/25/15 18:21:19 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis (added) merged: 12485,12492,12504,12509,12511
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
r12012 r12515 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/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
r12012 r12515 35 35 [StorableClass] 36 36 [Item("Classification Ensemble Solution", "A classification solution that contains an ensemble of multiple classification models")] 37 [Creatable( "Data Analysis - Ensembles")]37 [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 110)] 38 38 public sealed class ClassificationEnsembleSolution : ClassificationSolutionBase, IClassificationEnsembleSolution { 39 39 private readonly Dictionary<int, double> trainingEvaluationCache = new Dictionary<int, double>(); … … 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/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r12012 r12515 27 27 [StorableClass] 28 28 [Item("Classification Problem", "A general classification problem.")] 29 [Creatable("Problems")]30 29 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent { 31 30 public string Filename { get; set; } -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r12067 r12515 324 324 } 325 325 326 public ClassificationProblemData( Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)326 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 327 327 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 328 328 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); … … 338 338 } 339 339 340 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables( Dataset dataset) {340 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) { 341 341 int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows); 342 342 var validTargetVariables = (from v in dataset.DoubleVariables -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs
r12012 r12515 30 30 /// </summary> 31 31 [StorableClass] 32 public abstractclass ClassificationSolution : ClassificationSolutionBase {32 public class ClassificationSolution : ClassificationSolutionBase { 33 33 protected readonly Dictionary<int, double> evaluationCache; 34 34 … … 46 46 evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows); 47 47 CalculateClassificationResults(); 48 } 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new ClassificationSolution(this, cloner); 48 52 } 49 53 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r12012 r12515 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.