Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/06/10 10:28:34 (13 years ago)
Author:
mkommend
Message:

Added branched projects for new GP symbols (ticket #1256).

Location:
branches/GP.Symbols (TimeLag, Diff, Integral)
Files:
3 added
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/GP.Symbols (TimeLag, Diff, Integral)

    • Property svn:ignore set to
      GP.Symbols.suo
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj

    r5013 r5026  
    9191  </PropertyGroup>
    9292  <ItemGroup>
     93    <Reference Include="ALGLIB-3.1.0, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     94      <HintPath>c:\Program Files\HeuristicLab 3.3\ALGLIB-3.1.0.dll</HintPath>
     95    </Reference>
     96    <Reference Include="HeuristicLab.ALGLIB-3.1.0, Version=2.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     97      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.ALGLIB-3.1.0.dll</HintPath>
     98    </Reference>
     99    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     100      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     101    </Reference>
     102    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     103      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     104    </Reference>
     105    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     106      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     107    </Reference>
     108    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     109      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
     110    </Reference>
     111    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     112      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
     113    </Reference>
     114    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     115      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
     116    </Reference>
     117    <Reference Include="HeuristicLab.LibSVM-1.6.3, Version=1.6.3.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     118      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.LibSVM-1.6.3.dll</HintPath>
     119    </Reference>
     120    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     121      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Operators-3.3.dll</HintPath>
     122    </Reference>
     123    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     124      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
     125    </Reference>
     126    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     127      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Parameters-3.3.dll</HintPath>
     128    </Reference>
     129    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     130      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
     131    </Reference>
     132    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     133      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     134    </Reference>
     135    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     136      <HintPath>c:\Program Files\HeuristicLab 3.3\HeuristicLab.Random-3.3.dll</HintPath>
     137    </Reference>
     138    <Reference Include="LibSVM-1.6.3, Version=1.6.3.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
     139      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\LibSVM-1.6.3.dll</HintPath>
     140    </Reference>
    93141    <Reference Include="System" />
    94142    <Reference Include="System.Core">
     
    129177    <Compile Include="Evaluators\SimpleVarianceAccountedForEvaluator.cs" />
    130178    <Compile Include="HeuristicLabProblemsDataAnalysisPlugin.cs" />
     179    <Compile Include="Interfaces\ILaggedTreeNode.cs" />
    131180    <Compile Include="Interfaces\ISingleObjectiveDataAnalysisProblem.cs" />
    132181    <Compile Include="Interfaces\IDataAnalysisModel.cs" />
     
    147196    <Compile Include="Symbolic\SymbolicSimplifier.cs" />
    148197    <Compile Include="Symbolic\Symbols\Addition.cs" />
     198    <Compile Include="Symbolic\Symbols\LaggedSymbol.cs" />
    149199    <Compile Include="Symbolic\Symbols\Constant.cs" />
    150200    <Compile Include="Symbolic\Symbols\ConstantTreeNode.cs" />
     201    <Compile Include="Symbolic\Symbols\LaggedTreeNode.cs" />
    151202    <Compile Include="Symbolic\Symbols\LaggedVariable.cs" />
    152203    <Compile Include="Symbolic\Symbols\LaggedVariableTreeNode.cs" />
     
    166217    <Compile Include="Symbolic\Symbols\Multiplication.cs" />
    167218    <Compile Include="Symbolic\Symbols\Subtraction.cs" />
     219    <Compile Include="Symbolic\Symbols\TimeLag.cs" />
    168220    <Compile Include="Symbolic\Symbols\Variable.cs" />
    169221    <Compile Include="Symbolic\Symbols\VariableTreeNode.cs" />
     
    171223  </ItemGroup>
    172224  <ItemGroup>
    173     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    174       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    175       <Name>HeuristicLab.Collections-3.3</Name>
    176     </ProjectReference>
    177     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    178       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    179       <Name>HeuristicLab.Common.Resources-3.3</Name>
    180     </ProjectReference>
    181     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    182       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    183       <Name>HeuristicLab.Common-3.3</Name>
    184     </ProjectReference>
    185     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    186       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    187       <Name>HeuristicLab.Core-3.3</Name>
    188     </ProjectReference>
    189     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    190       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    191       <Name>HeuristicLab.Data-3.3</Name>
    192     </ProjectReference>
    193     <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
    194       <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
    195       <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
    196     </ProjectReference>
    197225    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
    198226      <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
    199227      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</Name>
    200     </ProjectReference>
    201     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
    202       <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
    203       <Name>ALGLIB-3.1.0</Name>
    204     </ProjectReference>
    205     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
    206       <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
    207       <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
    208     </ProjectReference>
    209     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3.csproj">
    210       <Project>{89B50302-9CEE-4D13-9779-633EADCAE624}</Project>
    211       <Name>HeuristicLab.LibSVM-1.6.3 %28HeuristicLab.ExtLibs\HeuristicLab.LibSVM\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3%29</Name>
    212     </ProjectReference>
    213     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\LibSVM-1.6.3\LibSVM-1.6.3.csproj">
    214       <Project>{A16F23B5-FB62-499E-A831-26953AA56FE2}</Project>
    215       <Name>LibSVM-1.6.3</Name>
    216     </ProjectReference>
    217     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    218       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    219       <Name>HeuristicLab.Operators-3.3</Name>
    220     </ProjectReference>
    221     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    222       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    223       <Name>HeuristicLab.Optimization-3.3</Name>
    224     </ProjectReference>
    225     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    226       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    227       <Name>HeuristicLab.Parameters-3.3</Name>
    228     </ProjectReference>
    229     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    230       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    231       <Name>HeuristicLab.Persistence-3.3</Name>
    232     </ProjectReference>
    233     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    234       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    235       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    236     </ProjectReference>
    237     <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
    238       <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
    239       <Name>HeuristicLab.Random-3.3</Name>
    240228    </ProjectReference>
    241229  </ItemGroup>
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs

    r4722 r5026  
    6060      var or = new Or();
    6161      var not = new Not();
     62      var timeLag = new TimeLag();
     63      timeLag.InitialFrequency = 0.0;
    6264      var constant = new Constant();
    6365      constant.MinValue = -20;
     
    6769      laggedVariable.InitialFrequency = 0.0;
    6870
    69       var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, constant, variableSymbol, laggedVariable };
    70       var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not };
     71      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, timeLag, constant, variableSymbol, laggedVariable };
     72      var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not, timeLag };
    7173      var binaryFunctionSymbols = new List<Symbol>() { gt, lt };
    7274      var functionSymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or };
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs

    r4722 r5026  
    6666      public const byte Constant = 20;
    6767      public const byte Arg = 21;
     68
     69      public const byte TimeLag = 22;
    6870    }
    6971
     
    9092      { typeof(Constant), OpCodes.Constant },
    9193      { typeof(Argument), OpCodes.Arg },
     94      { typeof(TimeLag), OpCodes.TimeLag},
    9295    };
    9396    private const int ARGUMENT_STACK_SIZE = 1024;
     
    290293            return constTreeNode.Value;
    291294          }
     295        case OpCodes.TimeLag: {
     296            var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
     297            row += timeLagTreeNode.Lag;
     298            if (row < 0 || row >= dataset.Rows) {
     299              row -= timeLagTreeNode.Lag;
     300              return double.NaN;
     301            }
     302            double result = Evaluate();
     303            row -= timeLagTreeNode.Lag;
     304            return result;
     305          }
    292306        default: throw new NotSupportedException();
    293307      }
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedTreeNode.cs

    r5005 r5026  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Random;
    2727namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
    2828  [StorableClass]
    29   public class VariableTreeNode : SymbolicExpressionTreeTerminalNode {
    30     public new Variable Symbol {
    31       get { return (Variable)base.Symbol; }
     29  public class LaggedTreeNode : SymbolicExpressionTreeNode, ILaggedTreeNode {
     30    public new LaggedSymbol Symbol {
     31      get { return (LaggedSymbol)base.Symbol; }
    3232    }
    3333    [Storable]
    34     private double weight;
    35     public double Weight {
    36       get { return weight; }
    37       set { weight = value; }
    38     }
    39     [Storable]
    40     private string variableName;
    41     public string VariableName {
    42       get { return variableName; }
    43       set { variableName = value; }
     34    private int lag;
     35    public int Lag {
     36      get { return lag; }
     37      set { lag = value; }
    4438    }
    4539
    4640    [StorableConstructor]
    47     protected VariableTreeNode(bool deserializing) : base(deserializing) { }
    48     protected VariableTreeNode(VariableTreeNode original, Cloner cloner)
     41    protected LaggedTreeNode(bool deserializing) : base(deserializing) { }
     42    protected LaggedTreeNode(LaggedTreeNode original, Cloner cloner)
    4943      : base(original, cloner) {
    50       weight = original.weight;
    51       variableName = original.variableName;
     44      lag = original.lag;
    5245    }
    53     protected VariableTreeNode() { }
    54     public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { }
     46    public LaggedTreeNode(LaggedSymbol timeLagSymbol) : base(timeLagSymbol) { }
    5547
    5648    public override bool HasLocalParameters {
    57       get {
    58         return true;
    59       }
     49      get { return true; }
    6050    }
    6151
    6252    public override void ResetLocalParameters(IRandom random) {
    6353      base.ResetLocalParameters(random);
    64       weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma);
    65       variableName = Symbol.VariableNames.SelectRandom(random);
     54      lag = random.Next(Symbol.MinLag, Symbol.MaxLag + 1);
    6655    }
    6756
    6857    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    6958      base.ShakeLocalParameters(random, shakingFactor);
    70       double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
    71       weight = weight + x * shakingFactor;
    72       variableName = Symbol.VariableNames.SelectRandom(random);
     59      lag = Math.Min(Symbol.MaxLag, Math.Max(Symbol.MinLag, lag + random.Next(-1, 2)));
    7360    }
    7461
    7562    public override IDeepCloneable Clone(Cloner cloner) {
    76       return new VariableTreeNode(this, cloner);
     63      return new LaggedTreeNode(this, cloner);
    7764    }
    7865
    7966    public override string ToString() {
    80       if (weight.IsAlmost(1.0)) return variableName;
    81       else return weight.ToString("E4") + " " + variableName;
     67      return base.ToString() + " " + lag.ToString();
    8268    }
    8369  }
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs

    r4722 r5026  
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
    2727  [StorableClass]
    28   public sealed class LaggedVariableTreeNode : VariableTreeNode {
     28  public sealed class LaggedVariableTreeNode : VariableTreeNode, ILaggedTreeNode {
    2929    public new LaggedVariable Symbol {
    3030      get { return (LaggedVariable)base.Symbol; }
Note: See TracChangeset for help on using the changeset viewer.