Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5500 for branches


Ignore:
Timestamp:
02/17/11 00:59:36 (14 years ago)
Author:
mkommend
Message:

#1418: Added all single objective symbolic regression analyzers.

Location:
branches/DataAnalysis Refactoring
Files:
18 added
12 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj

    r5474 r5500  
    209209    </BootstrapperPackage>
    210210  </ItemGroup>
    211   <ItemGroup />
     211  <ItemGroup>
     212    <Folder Include="MultiObjective\" />
     213    <Folder Include="SingleObjective\Interfaces\" />
     214  </ItemGroup>
    212215  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    213216  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r5474 r5500  
    108108  </ItemGroup>
    109109  <ItemGroup>
     110    <Compile Include="Interfaces\ISymbolicRegressionEvaluator.cs" />
     111    <Compile Include="Interfaces\ISymbolicRegressionMultiObjectiveEvaluator.cs" />
     112    <Compile Include="Interfaces\ISymbolicRegressionSingleObjectiveEvaluator.cs" />
     113    <Compile Include="MultiObjective\Evaluators\SymbolicRegressionMultiObjectiveEvaluator.cs" />
     114    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectiveEvaluator.cs" />
     115    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs" />
     116    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs" />
    110117    <None Include="HeuristicLab.snk" />
    111118    <None Include="HeuristicLabProblemsDataAnalysisSymbolicRegressionPlugin.cs.frame" />
     
    115122  </ItemGroup>
    116123  <ItemGroup>
    117     <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    118       <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    119       <Name>HeuristicLab.Analysis-3.3</Name>
    120     </ProjectReference>
    121124    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    122125      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     
    139142      <Name>HeuristicLab.Data-3.3</Name>
    140143    </ProjectReference>
    141     <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
    142       <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
    143       <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</Name>
    144     </ProjectReference>
    145     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
    146       <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
    147       <Name>ALGLIB-3.1.0</Name>
    148     </ProjectReference>
    149     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
    150       <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
    151       <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
     144    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
     145      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
     146      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
    152147    </ProjectReference>
    153148    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3.csproj">
     
    183178      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    184179    </ProjectReference>
    185     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.3\HeuristicLab.Problems.DataAnalysis-3.3.csproj">
    186       <Project>{70DFD984-B1D9-46FE-8EB7-4DE92D71A9FC}</Project>
    187       <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name>
     180    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
     181      <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>
     182      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
     183    </ProjectReference>
     184    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
     185      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
     186      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    188187    </ProjectReference>
    189188    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r5498 r5500  
    111111    <None Include="HeuristicLabProblemsDataAnalysisSymbolicPlugin.cs.frame" />
    112112    <None Include="Properties\AssemblyInfo.frame" />
     113    <Compile Include="Evaluators\SymbolicDataAnalysisMultiObjectiveEvaluator.cs" />
     114    <Compile Include="Evaluators\SymbolicDataAnalysisSingleObjectiveEvaluator.cs" />
     115    <Compile Include="Evaluators\SymbolicDataAnalysisEvaluator.cs" />
    113116    <Compile Include="HeuristicLabProblemsDataAnalysisSymbolicPlugin.cs" />
     117    <Compile Include="Interfaces\ISymbolicDataAnalysisInterpreterOperator.cs" />
    114118    <Compile Include="Interfaces\ISymbolicDataAnalysisMultiObjectiveEvaluator.cs" />
    115119    <Compile Include="Interfaces\ISymbolicDataAnalysisBoundedEvaluator.cs" />
     
    220224  </ItemGroup>
    221225  <ItemGroup>
     226    <Folder Include="Analyzers\" />
    222227    <Folder Include="Grammars\" />
    223228  </ItemGroup>
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs

    r5495 r5500  
    2525  public interface ISymbolicDataAnalysisEvaluator : IDataAnalysisEvaluator {
    2626    ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
    27     IValueLookupParameter<IDataAnalysisProblemData> DataAnalysisProblemDataParameter { get; }
    2827    IValueLookupParameter<IntValue> SamplesStartParameter { get; }
    2928    IValueLookupParameter<IntValue> SamplesEndParameter { get; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationEvaluator.cs

    r5496 r5500  
    2222namespace HeuristicLab.Problems.DataAnalysis.Classification {
    2323  public interface IClassificationEvaluator : IDataAnalysisEvaluator {
     24    new IClassificationProblemData ProblemData { get; }
    2425  }
    2526}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisEvaluator.cs

    r5484 r5500  
    2020#endregion
    2121
     22using HeuristicLab.Core;
    2223using HeuristicLab.Optimization;
    2324
    2425namespace HeuristicLab.Problems.DataAnalysis {
    2526  public interface IDataAnalysisEvaluator : IEvaluator {
     27    IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter { get; }
     28    IDataAnalysisProblemData ProblemData { get; }
    2629  }
    2730}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs

    r5494 r5500  
    2727    Dataset Dataset { get; }
    2828    IEnumerable<string> InputVariables { get; }
     29
     30    int TrainingSamplesStart { get; }
     31    int TrainingSamplesEnd { get; }
     32    int TestSamplesStart { get; }
     33    int TestSamplesEnd { get; }
    2934  }
    3035}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionEvaluator.cs

    r5496 r5500  
    2222namespace HeuristicLab.Problems.DataAnalysis {
    2323  public interface IRegressionEvaluator : IDataAnalysisEvaluator {
     24    new IRegressionProblemData ProblemData { get; }
    2425  }
    2526}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblem.cs

    r5496 r5500  
    2121
    2222namespace HeuristicLab.Problems.DataAnalysis {
    23   public interface IRegressionnProblem : IDataAnalysisProblem {
     23  public interface IRegressionProblem : IDataAnalysisProblem {
    2424    new IRegressionProblemData ProblemData { get; }
    2525    new IRegressionEvaluator Evaluator { get; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs

    r5496 r5500  
    2323  public interface IClassificationSolution : IDataAnalysisSolution {
    2424    new IRegressionModel Model { get; }
    25     new IRegressionProblemData Problem { get; }
     25    new IRegressionProblemData ProblemData { get; }
    2626  }
    2727}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineMeanSquaredErrorEvaluator.cs

    r5491 r5500  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324
    2425namespace HeuristicLab.Problems.DataAnalysis {
     
    6061    }
    6162    #endregion
     63
     64    public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) {
     65      IEnumerator<double> firstEnumerator = first.GetEnumerator();
     66      IEnumerator<double> secondEnumerator = second.GetEnumerator();
     67      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
     68
     69      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
     70        double estimated = secondEnumerator.Current;
     71        double original = firstEnumerator.Current;
     72        mseEvaluator.Add(original, estimated);
     73      }
     74
     75      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
     76        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
     77      } else {
     78        return mseEvaluator.MeanSquaredError;
     79      }
     80    }
    6281  }
    6382}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlinePearsonsRSquaredEvaluator.cs

    r5490 r5500  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Common;
    2425
     
    6869      return double.IsNaN(x) || double.IsInfinity(x);
    6970    }
     71
     72    public static double Calculate(IEnumerable<double> first, IEnumerable<double> second) {
     73      IEnumerator<double> firstEnumerator = first.GetEnumerator();
     74      IEnumerator<double> secondEnumerator = second.GetEnumerator();
     75      OnlinePearsonsRSquaredEvaluator rSquaredEvaluator = new OnlinePearsonsRSquaredEvaluator();
     76
     77      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
     78        double estimated = secondEnumerator.Current;
     79        double original = firstEnumerator.Current;
     80        rSquaredEvaluator.Add(original, estimated);
     81      }
     82
     83      if (secondEnumerator.MoveNext() || firstEnumerator.MoveNext()) {
     84        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
     85      } else {
     86        return rSquaredEvaluator.RSquared;
     87      }
     88    }
    7089  }
    7190}
Note: See TracChangeset for help on using the changeset viewer.