Changeset 668
- Timestamp:
- 10/15/08 12:26:48 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/AccuracyEvaluator.cs
r656 r668 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class AccuracyEvaluator : GPEvaluatorBase { 32 32 private const double EPSILON = 1.0E-6; -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ClassificationMeanSquaredErrorEvaluator.cs
r656 r668 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class ClassificationMeanSquaredErrorEvaluator : MeanSquaredErrorEvaluator { 32 32 private const double EPSILON = 1.0E-6; -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ConfusionMatrixEvaluator.cs
r658 r668 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class ConfusionMatrixEvaluator : GPEvaluatorBase { 32 32 private const double EPSILON = 1.0E-6; -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/CrossValidation.cs
r656 r668 28 28 using HeuristicLab.DataAnalysis; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class CrossValidation : OperatorBase { 32 32 … … 88 88 rotatedSet.Columns = origDataset.Columns; 89 89 rotatedSet.Samples = samples; 90 childScope.AddVariable(new Variable(scope.TranslateName(DATASET), rotatedSet));91 childScope.AddVariable(new Variable(scope.TranslateName(TRAININGSAMPLESSTART), new IntData(newTrainingSamplesStart)));92 childScope.AddVariable(new Variable(scope.TranslateName(TRAININGSAMPLESEND), new IntData(newTrainingSamplesEnd)));93 childScope.AddVariable(new Variable(scope.TranslateName(VALIDATIONSAMPLESSTART), new IntData(newValidationSamplesStart)));94 childScope.AddVariable(new Variable(scope.TranslateName(VALIDATIONSAMPLESEND), new IntData(newValidationSamplesEnd)));95 childScope.AddVariable(new Variable(scope.TranslateName(TESTSAMPLESSTART), new IntData(newTestSamplesStart)));96 childScope.AddVariable(new Variable(scope.TranslateName(TESTSAMPLESEND), new IntData(newTestSamplesEnd)));90 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(DATASET), rotatedSet)); 91 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TRAININGSAMPLESSTART), new IntData(newTrainingSamplesStart))); 92 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TRAININGSAMPLESEND), new IntData(newTrainingSamplesEnd))); 93 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(VALIDATIONSAMPLESSTART), new IntData(newValidationSamplesStart))); 94 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(VALIDATIONSAMPLESEND), new IntData(newValidationSamplesEnd))); 95 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TESTSAMPLESSTART), new IntData(newTestSamplesStart))); 96 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TESTSAMPLESEND), new IntData(newTestSamplesEnd))); 97 97 98 98 scope.AddSubScope(childScope); -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/FunctionLibraryInjector.cs
r656 r668 30 30 using StructId = HeuristicLab.GP.StructureIdentification; 31 31 32 namespace HeuristicLab.GP. Classification {32 namespace HeuristicLab.GP.StructureIdentification.Classification { 33 33 public class FunctionLibraryInjector : OperatorBase { 34 34 private const string TARGETVARIABLE = "TargetVariable"; … … 65 65 } 66 66 67 scope.AddVariable(new Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));67 scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary)); 68 68 return null; 69 69 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/HeuristicLab.GP.StructureIdentification.Classification.csproj
r667 r668 9 9 <OutputType>Library</OutputType> 10 10 <AppDesignerFolder>Properties</AppDesignerFolder> 11 <RootNamespace>HeuristicLab.GP. Classification</RootNamespace>11 <RootNamespace>HeuristicLab.GP.StructureIdentification.Classification</RootNamespace> 12 12 <AssemblyName>HeuristicLab.GP.StructureIdentification.Classification-3.2</AssemblyName> 13 13 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/HeuristicLabGPClassificationPlugin.cs
r656 r668 25 25 using HeuristicLab.PluginInfrastructure; 26 26 27 namespace HeuristicLab.GP. Classification {27 namespace HeuristicLab.GP.StructureIdentification.Classification { 28 28 [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification.Classification-3.2")] 29 29 [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification.Classification-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MCCEvaluator.cs
r656 r668 28 28 using HeuristicLab.GP.StructureIdentification; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class MCCEvaluator : GPEvaluatorBase { 32 32 private double limit; -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MulticlassModeller.cs
r656 r668 28 28 using HeuristicLab.DataAnalysis; 29 29 30 namespace HeuristicLab.GP. Classification {30 namespace HeuristicLab.GP.StructureIdentification.Classification { 31 31 public class MulticlassModeller : OperatorBase { 32 32 … … 130 130 Scope childScope = new Scope(classAValue+" vs. "+classBValue); 131 131 132 childScope.AddVariable(new Variable(scope.TranslateName(TARGETCLASSVALUES), binaryClassValues));133 childScope.AddVariable(new Variable(scope.TranslateName(CLASSAVALUE), new DoubleData(classAValue)));134 childScope.AddVariable(new Variable(scope.TranslateName(CLASSBVALUE), new DoubleData(classBValue)));135 childScope.AddVariable(new Variable(scope.TranslateName(TRAININGSAMPLESSTART), new IntData(trainingSamplesStart)));136 childScope.AddVariable(new Variable(scope.TranslateName(TRAININGSAMPLESEND), new IntData(trainingSamplesEnd)));137 childScope.AddVariable(new Variable(scope.TranslateName(VALIDATIONSAMPLESSTART), new IntData(validationSamplesStart)));138 childScope.AddVariable(new Variable(scope.TranslateName(VALIDATIONSAMPLESEND), new IntData(validationSamplesEnd)));139 childScope.AddVariable(new Variable(scope.TranslateName(DATASET), dataset));132 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TARGETCLASSVALUES), binaryClassValues)); 133 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(CLASSAVALUE), new DoubleData(classAValue))); 134 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(CLASSBVALUE), new DoubleData(classBValue))); 135 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TRAININGSAMPLESSTART), new IntData(trainingSamplesStart))); 136 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(TRAININGSAMPLESEND), new IntData(trainingSamplesEnd))); 137 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(VALIDATIONSAMPLESSTART), new IntData(validationSamplesStart))); 138 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(VALIDATIONSAMPLESEND), new IntData(validationSamplesEnd))); 139 childScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(DATASET), dataset)); 140 140 scope.AddSubScope(childScope); 141 141 } -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MulticlassOneVsOneAnalyzer.cs
r656 r668 29 29 using HeuristicLab.GP.StructureIdentification; 30 30 31 namespace HeuristicLab.GP. Classification {31 namespace HeuristicLab.GP.StructureIdentification.Classification { 32 32 public class MulticlassOneVsOneAnalyzer : OperatorBase { 33 33 -
trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ROCAnalyser.cs
r667 r668 29 29 30 30 31 namespace HeuristicLab.GP. Classification {31 namespace HeuristicLab.GP.StructureIdentification.Classification { 32 32 public class ROCAnalyser : OperatorBase { 33 private ItemList values;34 33 35 34 public override string Description { … … 56 55 rocValues.Clear(); 57 56 57 //ROC Curve starts at 0,0 58 ItemList row = new ItemList(); 59 row.Add(new DoubleData(0)); 60 row.Add(new DoubleData(0)); 61 rocValues.Add(row); 62 58 63 //calculate new ROC Values 64 double estimated; 65 double original; 66 double positiveClassKey; 67 double negativeClassKey; 68 double truePositiveRate; 69 double falsePositiveRate; 59 70 71 //initialize classes dictionary 72 Dictionary<double, List<double>> classes = new Dictionary<double, List<double>>(); 73 foreach (ItemList value in values) { 74 estimated = ((DoubleData)value[0]).Data; 75 original = ((DoubleData)value[1]).Data; 76 if (!classes.ContainsKey(original)) 77 classes[original] = new List<double>(); 78 classes[original].Add(estimated); 79 } 80 81 //check for 2 classes classification problem 82 if (classes.Keys.Count != 2) 83 throw new Exception("ROCAnalyser only handles 2 class classification problems"); 84 85 //sort estimated values in classes dictionary 86 foreach (List<double> estimatedValues in classes.Values) 87 estimatedValues.Sort(); 88 89 //calculate truePosivite- & falsePositiveRate 90 positiveClassKey = classes.Keys.Min<double>(); 91 negativeClassKey = classes.Keys.Max<double>(); 92 for (int i = 0; i < classes[negativeClassKey].Count; i++) { 93 truePositiveRate = classes[positiveClassKey].Count<double>(value => value < classes[negativeClassKey][i]) / classes[positiveClassKey].Count; 94 //stop calculation if truePositiveRate = 1; save runtime 95 if (truePositiveRate == 1) 96 break; 97 falsePositiveRate = (i) / classes[negativeClassKey].Count; 98 row = new ItemList(); 99 row.Add(new DoubleData(falsePositiveRate)); 100 row.Add(new DoubleData(truePositiveRate)); 101 rocValues.Add(row); 102 } 103 104 //ROC ends at 1,1 105 row = new ItemList(); 106 row.Add(new DoubleData(1)); 107 row.Add(new DoubleData(1)); 108 rocValues.Add(row); 60 109 61 110 return null; -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/HeuristicLab.GP.StructureIdentification.TimeSeries.csproj
r656 r668 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 21022</ProductVersion>6 <ProductVersion>9.0.30729</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{6084CFB5-733F-449D-9F92-2E40D13F0514}</ProjectGuid> 9 9 <OutputType>Library</OutputType> 10 10 <AppDesignerFolder>Properties</AppDesignerFolder> 11 <RootNamespace>HeuristicLab.GP. TimeSeries</RootNamespace>11 <RootNamespace>HeuristicLab.GP.StructureIdentification.TimeSeries</RootNamespace> 12 12 <AssemblyName>HeuristicLab.GP.StructureIdentification.TimeSeries-3.2</AssemblyName> 13 13 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
Note: See TracChangeset
for help on using the changeset viewer.