Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/05/11 21:55:55 (13 years ago)
Author:
abeham
Message:

#1614

  • updated branch from trunk
Location:
branches/GeneralizedQAP
Files:
2 deleted
12 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP

  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4

    • Property svn:ignore
      •  

        old new  
        44obj
        55*.vs10x
         6Plugin.cs
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj

    r5809 r6878  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>bin\Debug\</OutputPath>
     43    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    5050    <DebugType>pdbonly</DebugType>
    5151    <Optimize>true</Optimize>
    52     <OutputPath>bin\Release\</OutputPath>
     52    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    5353    <DefineConstants>TRACE</DefineConstants>
    5454    <ErrorReport>prompt</ErrorReport>
     
    5858  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    5959    <DebugSymbols>true</DebugSymbols>
    60     <OutputPath>bin\x64\Debug\</OutputPath>
     60    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    6161    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6262    <DebugType>full</DebugType>
     
    6666  </PropertyGroup>
    6767  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    68     <OutputPath>bin\x64\Release\</OutputPath>
     68    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    6969    <DefineConstants>TRACE</DefineConstants>
    7070    <Optimize>true</Optimize>
     
    7676  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    7777    <DebugSymbols>true</DebugSymbols>
    78     <OutputPath>bin\x86\Debug\</OutputPath>
     78    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    7979    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8080    <DebugType>full</DebugType>
     
    8484  </PropertyGroup>
    8585  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    86     <OutputPath>bin\x86\Release\</OutputPath>
     86    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    8787    <DefineConstants>TRACE</DefineConstants>
    8888    <Optimize>true</Optimize>
     
    9393  </PropertyGroup>
    9494  <ItemGroup>
     95    <Reference Include="ALGLIB-3.1.0, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     96      <HintPath>..\..\bin\ALGLIB-3.1.0.dll</HintPath>
     97    </Reference>
    9598    <Reference Include="System" />
    9699    <Reference Include="System.Core">
     
    110113    <Compile Include="Interfaces\ISymbolicDiscriminantFunctionClassificationModel.cs" />
    111114    <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
     115    <Compile Include="Plugin.cs" />
    112116    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs" />
    113117    <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs" />
     
    134138    </Compile>
    135139    <None Include="HeuristicLab.snk" />
    136     <None Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs.frame" />
    137     <None Include="Properties\AssemblyInfo.frame" />
    138     <Compile Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs" />
     140    <None Include="Plugin.cs.frame" />
     141    <None Include="Properties\AssemblyInfo.cs.frame" />
    139142    <Compile Include="Interfaces\ISymbolicClassificationEvaluator.cs" />
    140143    <Compile Include="Interfaces\ISymbolicClassificationMultiObjectiveEvaluator.cs" />
     
    146149      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    147150      <Name>HeuristicLab.Analysis-3.3</Name>
     151      <Private>False</Private>
    148152    </ProjectReference>
    149153    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    150154      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    151155      <Name>HeuristicLab.Collections-3.3</Name>
     156      <Private>False</Private>
    152157    </ProjectReference>
    153158    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    154159      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    155160      <Name>HeuristicLab.Common-3.3</Name>
     161      <Private>False</Private>
    156162    </ProjectReference>
    157163    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    158164      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    159165      <Name>HeuristicLab.Core-3.3</Name>
     166      <Private>False</Private>
    160167    </ProjectReference>
    161168    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    162169      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    163170      <Name>HeuristicLab.Data-3.3</Name>
     171      <Private>False</Private>
    164172    </ProjectReference>
    165173    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
    166174      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
    167175      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
    168     </ProjectReference>
    169     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
    170       <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
    171       <Name>ALGLIB-3.1.0</Name>
    172     </ProjectReference>
    173     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
    174       <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
    175       <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
     176      <Private>False</Private>
    176177    </ProjectReference>
    177178    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    178179      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    179180      <Name>HeuristicLab.Operators-3.3</Name>
     181      <Private>False</Private>
    180182    </ProjectReference>
    181183    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    182184      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    183185      <Name>HeuristicLab.Optimization-3.3</Name>
     186      <Private>False</Private>
    184187    </ProjectReference>
    185188    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    186189      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    187190      <Name>HeuristicLab.Parameters-3.3</Name>
     191      <Private>False</Private>
    188192    </ProjectReference>
    189193    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    190194      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    191195      <Name>HeuristicLab.Persistence-3.3</Name>
     196      <Private>False</Private>
    192197    </ProjectReference>
    193198    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    194199      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    195200      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     201      <Private>False</Private>
    196202    </ProjectReference>
    197203    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
    198204      <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>
    199205      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
     206      <Private>False</Private>
    200207    </ProjectReference>
    201208    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    202209      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    203210      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
     211      <Private>False</Private>
    204212    </ProjectReference>
    205213  </ItemGroup>
     
    237245
    238246call PreBuildEvent.cmd
    239 SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs"</PreBuildEvent>
     247</PreBuildEvent>
    240248  </PropertyGroup>
    241249</Project>
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5942 r6878  
    5454    public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5555      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    56       IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
     56      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    5757      IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    5858      OnlineCalculatorError errorState;
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5942 r6878  
    3333    public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    3434      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    35       IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
     35      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    3636      OnlineCalculatorError errorState;
    3737      double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r5854 r6878  
    6262      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
    6363
     64      SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
     65
     66      ConfigureGrammarSymbols();
    6467      InitializeOperators();
    6568      UpdateEstimationLimits();
     69    }
     70
     71    private void ConfigureGrammarSymbols() {
     72      var grammar = SymbolicExpressionTreeGrammar as TypeCoherentExpressionGrammar;
     73      if (grammar != null) grammar.ConfigureAsDefaultClassificationGrammar();
    6674    }
    6775
     
    7381
    7482    private void UpdateEstimationLimits() {
    75       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
    76         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
     83      if (ProblemData.TrainingIndizes.Any()) {
     84        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    7785        var mean = targetValues.Average();
    7886        var range = targetValues.Max() - targetValues.Min();
    7987        EstimationLimits.Upper = mean + PunishmentFactor * range;
    8088        EstimationLimits.Lower = mean - PunishmentFactor * range;
     89      } else {
     90        EstimationLimits.Upper = double.MaxValue;
     91        EstimationLimits.Lower = double.MinValue;
    8192      }
    8293    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r5906 r6878  
    5454    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5555      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    56       IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
     56      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    5757      IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    5858
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5942 r6878  
    5454    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5555      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    56       IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
     56      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    5757      IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
    5858      OnlineCalculatorError errorState;
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs

    r5907 r6878  
    7676    public override IOperation Apply() {
    7777      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
     78      var problemData = ProblemDataParameter.ActualValue;
     79      var evaluator = EvaluatorParameter.ActualValue;
    7880      // evaluate on validation partition
    7981      IEnumerable<int> rows = GenerateRowsToEvaluate();
    8082      if (!rows.Any()) return base.Apply();
    81 
    82       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
    83       double[] validationQuality = (from tree in SymbolicExpressionTree
    84                                     select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    85                                    .ToArray();
     83      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
     84      double[] validationQuality = SymbolicExpressionTree
     85        .AsParallel()
     86        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
     87        .ToArray();
    8688      double r = 0.0;
    8789      try {
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs

    r5942 r6878  
    5454    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
    5555      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
    56       IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
     56      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
    5757      OnlineCalculatorError errorState;
    5858      double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r5854 r6878  
    6060      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
    6161
     62      SymbolicExpressionTreeGrammarParameter.ValueChanged += (o, e) => ConfigureGrammarSymbols();
     63
     64      ConfigureGrammarSymbols();
    6265      InitializeOperators();
    6366      UpdateEstimationLimits();
     67    }
     68
     69    private void ConfigureGrammarSymbols() {
     70      var grammar = SymbolicExpressionTreeGrammar as TypeCoherentExpressionGrammar;
     71      if (grammar != null) grammar.ConfigureAsDefaultClassificationGrammar();
    6472    }
    6573
     
    7280
    7381    private void UpdateEstimationLimits() {
    74       if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
    75         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
     82      if (ProblemData.TrainingIndizes.Any()) {
     83        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToList();
    7684        var mean = targetValues.Average();
    7785        var range = targetValues.Max() - targetValues.Min();
    7886        EstimationLimits.Upper = mean + PunishmentFactor * range;
    7987        EstimationLimits.Lower = mean - PunishmentFactor * range;
     88      } else {
     89        EstimationLimits.Upper = double.MaxValue;
     90        EstimationLimits.Lower = double.MinValue;
    8091      }
    8192    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs

    r6604 r6878  
    127127      var rows = problemData.TrainingIndizes;
    128128      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
    129       var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
     129      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
    130130      double alpha;
    131131      double beta;
     
    140140      if (startNode.GetSubtree(0).Symbol is Addition) {
    141141        var addNode = startNode.GetSubtree(0);
    142         if (addNode.SubtreesCount == 2 && addNode.GetSubtree(0).Symbol is Multiplication && addNode.GetSubtree(1).Symbol is Constant) {
     142        if (addNode.SubtreeCount == 2 && addNode.GetSubtree(0).Symbol is Multiplication && addNode.GetSubtree(1).Symbol is Constant) {
    143143          alphaTreeNode = addNode.GetSubtree(1) as ConstantTreeNode;
    144144          var mulNode = addNode.GetSubtree(0);
    145           if (mulNode.SubtreesCount == 2 && mulNode.GetSubtree(1).Symbol is Constant) {
     145          if (mulNode.SubtreeCount == 2 && mulNode.GetSubtree(1).Symbol is Constant) {
    146146            betaTreeNode = mulNode.GetSubtree(1) as ConstantTreeNode;
    147147          }
Note: See TracChangeset for help on using the changeset viewer.