Free cookie consent management tool by TermsFeed Policy Generator

Changeset 668 for trunk/sources


Ignore:
Timestamp:
10/15/08 12:26:48 (16 years ago)
Author:
mkommend
Message:

namespaces changed to HeuristicLab.GP.StructureIdentification.Classification
(ticket #177)

Location:
trunk/sources
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/AccuracyEvaluator.cs

    r656 r668  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class AccuracyEvaluator : GPEvaluatorBase {
    3232    private const double EPSILON = 1.0E-6;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ClassificationMeanSquaredErrorEvaluator.cs

    r656 r668  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class ClassificationMeanSquaredErrorEvaluator : MeanSquaredErrorEvaluator {
    3232    private const double EPSILON = 1.0E-6;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ConfusionMatrixEvaluator.cs

    r658 r668  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class ConfusionMatrixEvaluator : GPEvaluatorBase {
    3232    private const double EPSILON = 1.0E-6;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/CrossValidation.cs

    r656 r668  
    2828using HeuristicLab.DataAnalysis;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class CrossValidation : OperatorBase {
    3232
     
    8888        rotatedSet.Columns = origDataset.Columns;
    8989        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)));
    9797
    9898        scope.AddSubScope(childScope);
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/FunctionLibraryInjector.cs

    r656 r668  
    3030using StructId = HeuristicLab.GP.StructureIdentification;
    3131
    32 namespace HeuristicLab.GP.Classification {
     32namespace HeuristicLab.GP.StructureIdentification.Classification {
    3333  public class FunctionLibraryInjector : OperatorBase {
    3434    private const string TARGETVARIABLE = "TargetVariable";
     
    6565      }
    6666
    67       scope.AddVariable(new Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
     67      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
    6868      return null;
    6969    }
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/HeuristicLab.GP.StructureIdentification.Classification.csproj

    r667 r668  
    99    <OutputType>Library</OutputType>
    1010    <AppDesignerFolder>Properties</AppDesignerFolder>
    11     <RootNamespace>HeuristicLab.GP.Classification</RootNamespace>
     11    <RootNamespace>HeuristicLab.GP.StructureIdentification.Classification</RootNamespace>
    1212    <AssemblyName>HeuristicLab.GP.StructureIdentification.Classification-3.2</AssemblyName>
    1313    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/HeuristicLabGPClassificationPlugin.cs

    r656 r668  
    2525using HeuristicLab.PluginInfrastructure;
    2626
    27 namespace HeuristicLab.GP.Classification {
     27namespace HeuristicLab.GP.StructureIdentification.Classification {
    2828  [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification.Classification-3.2")]
    2929  [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification.Classification-3.2.dll", Filetype = PluginFileType.Assembly)]
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MCCEvaluator.cs

    r656 r668  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class MCCEvaluator : GPEvaluatorBase {
    3232    private double limit;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MulticlassModeller.cs

    r656 r668  
    2828using HeuristicLab.DataAnalysis;
    2929
    30 namespace HeuristicLab.GP.Classification {
     30namespace HeuristicLab.GP.StructureIdentification.Classification {
    3131  public class MulticlassModeller : OperatorBase {
    3232
     
    130130          Scope childScope = new Scope(classAValue+" vs. "+classBValue);
    131131
    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));
    140140          scope.AddSubScope(childScope);
    141141        }
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/MulticlassOneVsOneAnalyzer.cs

    r656 r668  
    2929using HeuristicLab.GP.StructureIdentification;
    3030
    31 namespace HeuristicLab.GP.Classification {
     31namespace HeuristicLab.GP.StructureIdentification.Classification {
    3232  public class MulticlassOneVsOneAnalyzer : OperatorBase {
    3333
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Classification/ROCAnalyser.cs

    r667 r668  
    2929
    3030
    31 namespace HeuristicLab.GP.Classification {
     31namespace HeuristicLab.GP.StructureIdentification.Classification {
    3232  public class ROCAnalyser : OperatorBase {
    33     private ItemList values;
    3433
    3534    public override string Description {
     
    5655        rocValues.Clear();
    5756
     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
    5863      //calculate new ROC Values
     64      double estimated;
     65      double original;
     66      double positiveClassKey;
     67      double negativeClassKey;
     68      double truePositiveRate;
     69      double falsePositiveRate;
    5970
     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);
    60109
    61110      return null;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/HeuristicLab.GP.StructureIdentification.TimeSeries.csproj

    r656 r668  
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    55    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    6     <ProductVersion>9.0.21022</ProductVersion>
     6    <ProductVersion>9.0.30729</ProductVersion>
    77    <SchemaVersion>2.0</SchemaVersion>
    88    <ProjectGuid>{6084CFB5-733F-449D-9F92-2E40D13F0514}</ProjectGuid>
    99    <OutputType>Library</OutputType>
    1010    <AppDesignerFolder>Properties</AppDesignerFolder>
    11     <RootNamespace>HeuristicLab.GP.TimeSeries</RootNamespace>
     11    <RootNamespace>HeuristicLab.GP.StructureIdentification.TimeSeries</RootNamespace>
    1212    <AssemblyName>HeuristicLab.GP.StructureIdentification.TimeSeries-3.2</AssemblyName>
    1313    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
Note: See TracChangeset for help on using the changeset viewer.