Changeset 14615
- Timestamp:
- 01/27/17 16:01:28 (8 years ago)
- Location:
- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneFactorClassificationModel.cs
r14242 r14615 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Diagnostics.Eventing.Reader;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 32 31 [StorableClass] 33 32 [Item("OneFactor Classification Model", "A model that uses only one categorical feature (factor) to determine the class.")] 34 public class OneFactorClassificationModel : ClassificationModel {33 public sealed class OneFactorClassificationModel : ClassificationModel { 35 34 public override IEnumerable<string> VariablesUsedForPrediction { 36 35 get { return new[] { Variable }; } … … 38 37 39 38 [Storable] 40 pr otectedstring variable;39 private string variable; 41 40 public string Variable { 42 41 get { return variable; } … … 44 43 45 44 [Storable] 46 pr otectedstring[] variableValues;45 private string[] variableValues; 47 46 public string[] VariableValues { 48 47 get { return variableValues; } … … 50 49 51 50 [Storable] 52 pr otecteddouble[] classes;51 private double[] classes; 53 52 public double[] Classes { 54 53 get { return classes; } … … 56 55 57 56 [Storable] 58 pr otecteddouble defaultClass;57 private double defaultClass; 59 58 public double DefaultClass { 60 59 get { return defaultClass; } … … 62 61 63 62 [StorableConstructor] 64 pr otectedOneFactorClassificationModel(bool deserializing) : base(deserializing) { }65 pr otectedOneFactorClassificationModel(OneFactorClassificationModel original, Cloner cloner)63 private OneFactorClassificationModel(bool deserializing) : base(deserializing) { } 64 private OneFactorClassificationModel(OneFactorClassificationModel original, Cloner cloner) 66 65 : base(original, cloner) { 67 66 this.variable = (string)original.variable; -
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneFactorClassificationSolution.cs
r14242 r14615 28 28 [StorableClass] 29 29 [Item(Name = "OneR Classification Solution", Description = "Represents a OneR classification solution which uses only a single factor for class prediction.")] 30 public class OneFactorClassificationSolution : ClassificationSolution {30 public sealed class OneFactorClassificationSolution : ClassificationSolution { 31 31 public new OneFactorClassificationModel Model { 32 32 get { return (OneFactorClassificationModel)base.Model; } … … 35 35 36 36 [StorableConstructor] 37 pr otectedOneFactorClassificationSolution(bool deserializing) : base(deserializing) { }38 pr otectedOneFactorClassificationSolution(OneFactorClassificationSolution original, Cloner cloner) : base(original, cloner) { }37 private OneFactorClassificationSolution(bool deserializing) : base(deserializing) { } 38 private OneFactorClassificationSolution(OneFactorClassificationSolution original, Cloner cloner) : base(original, cloner) { } 39 39 public OneFactorClassificationSolution(OneFactorClassificationModel model, IClassificationProblemData problemData) 40 40 : base(model, problemData) { -
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneRClassificationModel.cs
r14242 r14615 31 31 [StorableClass] 32 32 [Item("OneR Classification Model", "A model that uses intervals for one variable to determine the class.")] 33 public class OneRClassificationModel : ClassificationModel {33 public sealed class OneRClassificationModel : ClassificationModel { 34 34 public override IEnumerable<string> VariablesUsedForPrediction { 35 35 get { return new[] { Variable }; } … … 37 37 38 38 [Storable] 39 pr otectedstring variable;39 private string variable; 40 40 public string Variable { 41 41 get { return variable; } … … 43 43 44 44 [Storable] 45 pr otecteddouble[] splits;45 private double[] splits; 46 46 public double[] Splits { 47 47 get { return splits; } … … 49 49 50 50 [Storable] 51 pr otecteddouble[] classes;51 private double[] classes; 52 52 public double[] Classes { 53 53 get { return classes; } … … 55 55 56 56 [Storable] 57 pr otecteddouble missingValuesClass;57 private double missingValuesClass; 58 58 public double MissingValuesClass { 59 59 get { return missingValuesClass; } … … 61 61 62 62 [StorableConstructor] 63 pr otectedOneRClassificationModel(bool deserializing) : base(deserializing) { }64 pr otectedOneRClassificationModel(OneRClassificationModel original, Cloner cloner)63 private OneRClassificationModel(bool deserializing) : base(deserializing) { } 64 private OneRClassificationModel(OneRClassificationModel original, Cloner cloner) 65 65 : base(original, cloner) { 66 66 this.variable = (string)original.variable; -
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneRClassificationSolution.cs
r14185 r14615 28 28 [StorableClass] 29 29 [Item(Name = "OneR Classification Solution", Description = "Represents a OneR classification solution which uses only a single feature with potentially multiple thresholds for class prediction.")] 30 public class OneRClassificationSolution : ClassificationSolution {30 public sealed class OneRClassificationSolution : ClassificationSolution { 31 31 public new OneRClassificationModel Model { 32 32 get { return (OneRClassificationModel)base.Model; } … … 35 35 36 36 [StorableConstructor] 37 pr otectedOneRClassificationSolution(bool deserializing) : base(deserializing) { }38 pr otectedOneRClassificationSolution(OneRClassificationSolution original, Cloner cloner) : base(original, cloner) { }37 private OneRClassificationSolution(bool deserializing) : base(deserializing) { } 38 private OneRClassificationSolution(OneRClassificationSolution original, Cloner cloner) : base(original, cloner) { } 39 39 public OneRClassificationSolution(OneRClassificationModel model, IClassificationProblemData problemData) 40 40 : base(model, problemData) { -
branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs
r14240 r14615 104 104 var varName = kvp.Key; 105 105 var cats = kvp.Value; 106 var catCount = cats.Count(); 107 if (catCount == 0) continue; 106 if (!cats.Any()) continue; 108 107 foreach (var cat in cats) { 109 108 var values = dataset.GetStringValues(varName, rows);
Note: See TracChangeset
for help on using the changeset viewer.