Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/10 14:11:12 (14 years ago)
Author:
mkommend
Message:

Implemented VariableCondition symbol (ticket #1325).

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

Legend:

Unmodified
Added
Removed
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs

    r5014 r5060  
    284284        varSymbol.VariableNames = DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
    285285      }
     286      foreach (var varSymbol in FunctionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.VariableCondition>()) {
     287        varSymbol.VariableNames = DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
     288      }
    286289      var globalGrammar = FunctionTreeGrammar as GlobalSymbolicExpressionGrammar;
    287290      if (globalGrammar != null) {
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLab.Problems.DataAnalysis.Views-3.3.csproj

    r5051 r5060  
    250250    <Compile Include="Symbolic\Symbols\ConstantView.Designer.cs">
    251251      <DependentUpon>ConstantView.cs</DependentUpon>
     252    </Compile>
     253    <Compile Include="Symbolic\Symbols\VariableConditionView.cs">
     254      <SubType>UserControl</SubType>
     255    </Compile>
     256    <Compile Include="Symbolic\Symbols\VariableConditionView.Designer.cs">
     257      <DependentUpon>VariableConditionView.cs</DependentUpon>
    252258    </Compile>
    253259    <Compile Include="Symbolic\Symbols\LaggedVariableView.cs">
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableConditionView.Designer.cs

    r5042 r5060  
    2121
    2222namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols {
    23   partial class VariableView {
     23  partial class VariableConditionView {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.weightMuLabel = new System.Windows.Forms.Label();
    48       this.weightMuTextBox = new System.Windows.Forms.TextBox();
     47      this.thresholdInitializationMuLabel = new System.Windows.Forms.Label();
     48      this.thresholdInitializationMuTextBox = new System.Windows.Forms.TextBox();
    4949      this.initializationGroupBox = new System.Windows.Forms.GroupBox();
    50       this.weightSigmaLabel = new System.Windows.Forms.Label();
    51       this.weightSigmaTextBox = new System.Windows.Forms.TextBox();
     50      this.slopeInitializationSigmaLabel = new System.Windows.Forms.Label();
     51      this.slopeInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
     52      this.slopeInitializationMuLabel = new System.Windows.Forms.Label();
     53      this.slopeInitializationMuTextBox = new System.Windows.Forms.TextBox();
     54      this.thresholdInitializationSigmaLabel = new System.Windows.Forms.Label();
     55      this.thresholdInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
    5256      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
    53       this.stdDevWeightChangeLabel = new System.Windows.Forms.Label();
    54       this.weightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
    55       this.meanWeightChangeLabel = new System.Windows.Forms.Label();
    56       this.weightChangeMuTextBox = new System.Windows.Forms.TextBox();
     57      this.slopeChangeSigmaLabel = new System.Windows.Forms.Label();
     58      this.slopeChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     59      this.slopeChangeMuLabel = new System.Windows.Forms.Label();
     60      this.slopeChangeMuTextBox = new System.Windows.Forms.TextBox();
     61      this.thresholdChangeSigmaLabel = new System.Windows.Forms.Label();
     62      this.thresholdChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     63      this.ThresholdChangeMuLabel = new System.Windows.Forms.Label();
     64      this.thresholdChangeMuTextBox = new System.Windows.Forms.TextBox();
    5765      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5866      this.initializationGroupBox.SuspendLayout();
     
    8088      this.descriptionTextBox.Size = new System.Drawing.Size(203, 20);
    8189      //
    82       // weightMuLabel
    83       //
    84       this.weightMuLabel.AutoSize = true;
    85       this.weightMuLabel.Location = new System.Drawing.Point(6, 22);
    86       this.weightMuLabel.Name = "weightMuLabel";
    87       this.weightMuLabel.Size = new System.Drawing.Size(67, 13);
    88       this.weightMuLabel.TabIndex = 6;
    89       this.weightMuLabel.Text = "Weight (mu):";
    90       this.toolTip.SetToolTip(this.weightMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
    91       //
    92       // weightMuTextBox
    93       //
    94       this.weightMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    95                   | System.Windows.Forms.AnchorStyles.Right)));
    96       this.weightMuTextBox.Location = new System.Drawing.Point(92, 19);
    97       this.weightMuTextBox.Name = "weightMuTextBox";
    98       this.weightMuTextBox.Size = new System.Drawing.Size(201, 20);
    99       this.weightMuTextBox.TabIndex = 7;
    100       this.toolTip.SetToolTip(this.weightMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
    101               "al weights.");
    102       this.weightMuTextBox.TextChanged += new System.EventHandler(this.weightMuTextBox_TextChanged);
     90      // thresholdInitializationMuLabel
     91      //
     92      this.thresholdInitializationMuLabel.AutoSize = true;
     93      this.thresholdInitializationMuLabel.Location = new System.Drawing.Point(6, 18);
     94      this.thresholdInitializationMuLabel.Name = "thresholdInitializationMuLabel";
     95      this.thresholdInitializationMuLabel.Size = new System.Drawing.Size(80, 13);
     96      this.thresholdInitializationMuLabel.TabIndex = 6;
     97      this.thresholdInitializationMuLabel.Text = "Threshold (mu):";
     98      this.toolTip.SetToolTip(this.thresholdInitializationMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
     99      //
     100      // thresholdInitializationMuTextBox
     101      //
     102      this.thresholdInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     103                  | System.Windows.Forms.AnchorStyles.Right)));
     104      this.thresholdInitializationMuTextBox.Location = new System.Drawing.Point(114, 15);
     105      this.thresholdInitializationMuTextBox.Name = "thresholdInitializationMuTextBox";
     106      this.thresholdInitializationMuTextBox.Size = new System.Drawing.Size(197, 20);
     107      this.thresholdInitializationMuTextBox.TabIndex = 7;
     108      this.toolTip.SetToolTip(this.thresholdInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
     109              "al thresholds.");
     110      this.thresholdInitializationMuTextBox.TextChanged += new System.EventHandler(this.thresholdMuTextBox_TextChanged);
    103111      //
    104112      // initializationGroupBox
     
    106114      this.initializationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    107115                  | System.Windows.Forms.AnchorStyles.Right)));
    108       this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
    109       this.initializationGroupBox.Controls.Add(this.weightSigmaTextBox);
    110       this.initializationGroupBox.Controls.Add(this.weightMuLabel);
    111       this.initializationGroupBox.Controls.Add(this.weightMuTextBox);
     116      this.initializationGroupBox.Controls.Add(this.slopeInitializationSigmaLabel);
     117      this.initializationGroupBox.Controls.Add(this.slopeInitializationSigmaTextBox);
     118      this.initializationGroupBox.Controls.Add(this.slopeInitializationMuLabel);
     119      this.initializationGroupBox.Controls.Add(this.slopeInitializationMuTextBox);
     120      this.initializationGroupBox.Controls.Add(this.thresholdInitializationSigmaLabel);
     121      this.initializationGroupBox.Controls.Add(this.thresholdInitializationSigmaTextBox);
     122      this.initializationGroupBox.Controls.Add(this.thresholdInitializationMuLabel);
     123      this.initializationGroupBox.Controls.Add(this.thresholdInitializationMuTextBox);
    112124      this.initializationGroupBox.Location = new System.Drawing.Point(3, 79);
    113125      this.initializationGroupBox.Name = "initializationGroupBox";
    114       this.initializationGroupBox.Size = new System.Drawing.Size(320, 73);
     126      this.initializationGroupBox.Size = new System.Drawing.Size(320, 127);
    115127      this.initializationGroupBox.TabIndex = 8;
    116128      this.initializationGroupBox.TabStop = false;
    117129      this.initializationGroupBox.Text = "Initialization";
    118130      //
    119       // weightSigmaLabel
    120       //
    121       this.weightSigmaLabel.AutoSize = true;
    122       this.weightSigmaLabel.Location = new System.Drawing.Point(6, 48);
    123       this.weightSigmaLabel.Name = "weightSigmaLabel";
    124       this.weightSigmaLabel.Size = new System.Drawing.Size(80, 13);
    125       this.weightSigmaLabel.TabIndex = 8;
    126       this.weightSigmaLabel.Text = "Weight (sigma):";
    127       this.toolTip.SetToolTip(this.weightSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
    128       //
    129       // weightSigmaTextBox
    130       //
    131       this.weightSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    132                   | System.Windows.Forms.AnchorStyles.Right)));
    133       this.weightSigmaTextBox.Location = new System.Drawing.Point(92, 45);
    134       this.weightSigmaTextBox.Name = "weightSigmaTextBox";
    135       this.weightSigmaTextBox.Size = new System.Drawing.Size(201, 20);
    136       this.weightSigmaTextBox.TabIndex = 9;
    137       this.toolTip.SetToolTip(this.weightSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
    138               "weights.");
    139       this.weightSigmaTextBox.TextChanged += new System.EventHandler(this.weightSigmaTextBox_TextChanged);
     131      // slopeInitializationSigmaLabel
     132      //
     133      this.slopeInitializationSigmaLabel.AutoSize = true;
     134      this.slopeInitializationSigmaLabel.Location = new System.Drawing.Point(6, 105);
     135      this.slopeInitializationSigmaLabel.Name = "slopeInitializationSigmaLabel";
     136      this.slopeInitializationSigmaLabel.Size = new System.Drawing.Size(73, 13);
     137      this.slopeInitializationSigmaLabel.TabIndex = 12;
     138      this.slopeInitializationSigmaLabel.Text = "Slope (sigma):";
     139      this.toolTip.SetToolTip(this.slopeInitializationSigmaLabel, "The sigma parameter for the normal distribution to use for the initial slopes.");
     140      //
     141      // slopeInitializationSigmaTextBox
     142      //
     143      this.slopeInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     144                  | System.Windows.Forms.AnchorStyles.Right)));
     145      this.slopeInitializationSigmaTextBox.Location = new System.Drawing.Point(114, 102);
     146      this.slopeInitializationSigmaTextBox.Name = "slopeInitializationSigmaTextBox";
     147      this.slopeInitializationSigmaTextBox.Size = new System.Drawing.Size(197, 20);
     148      this.slopeInitializationSigmaTextBox.TabIndex = 13;
     149      this.toolTip.SetToolTip(this.slopeInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
     150              "slopes.");
     151      this.slopeInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.slopeInitializationSigmaTextBox_TextChanged);
     152      //
     153      // slopeInitializationMuLabel
     154      //
     155      this.slopeInitializationMuLabel.AutoSize = true;
     156      this.slopeInitializationMuLabel.Location = new System.Drawing.Point(6, 79);
     157      this.slopeInitializationMuLabel.Name = "slopeInitializationMuLabel";
     158      this.slopeInitializationMuLabel.Size = new System.Drawing.Size(60, 13);
     159      this.slopeInitializationMuLabel.TabIndex = 10;
     160      this.slopeInitializationMuLabel.Text = "Slope (mu):";
     161      this.toolTip.SetToolTip(this.slopeInitializationMuLabel, "The mu (mean) parameter of the normal distribution to use for initial slopes.");
     162      //
     163      // slopeInitializationMuTextBox
     164      //
     165      this.slopeInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     166                  | System.Windows.Forms.AnchorStyles.Right)));
     167      this.slopeInitializationMuTextBox.Location = new System.Drawing.Point(114, 76);
     168      this.slopeInitializationMuTextBox.Name = "slopeInitializationMuTextBox";
     169      this.slopeInitializationMuTextBox.Size = new System.Drawing.Size(197, 20);
     170      this.slopeInitializationMuTextBox.TabIndex = 11;
     171      this.toolTip.SetToolTip(this.slopeInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
     172              "al slopes.");
     173      this.slopeInitializationMuTextBox.TextChanged += new System.EventHandler(this.slopeInitializationMuTextBox_TextChanged);
     174      //
     175      // thresholdInitializationSigmaLabel
     176      //
     177      this.thresholdInitializationSigmaLabel.AutoSize = true;
     178      this.thresholdInitializationSigmaLabel.Location = new System.Drawing.Point(6, 44);
     179      this.thresholdInitializationSigmaLabel.Name = "thresholdInitializationSigmaLabel";
     180      this.thresholdInitializationSigmaLabel.Size = new System.Drawing.Size(93, 13);
     181      this.thresholdInitializationSigmaLabel.TabIndex = 8;
     182      this.thresholdInitializationSigmaLabel.Text = "Threshold (sigma):";
     183      this.toolTip.SetToolTip(this.thresholdInitializationSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
     184      //
     185      // thresholdInitializationSigmaTextBox
     186      //
     187      this.thresholdInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     188                  | System.Windows.Forms.AnchorStyles.Right)));
     189      this.thresholdInitializationSigmaTextBox.Location = new System.Drawing.Point(114, 41);
     190      this.thresholdInitializationSigmaTextBox.Name = "thresholdInitializationSigmaTextBox";
     191      this.thresholdInitializationSigmaTextBox.Size = new System.Drawing.Size(197, 20);
     192      this.thresholdInitializationSigmaTextBox.TabIndex = 9;
     193      this.toolTip.SetToolTip(this.thresholdInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
     194              "thresholds.");
     195      this.thresholdInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.thresholdInitializationSigmaTextBox_TextChanged);
    140196      //
    141197      // mutationGroupBox
     
    143199      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    144200                  | System.Windows.Forms.AnchorStyles.Right)));
    145       this.mutationGroupBox.Controls.Add(this.stdDevWeightChangeLabel);
    146       this.mutationGroupBox.Controls.Add(this.weightChangeSigmaTextBox);
    147       this.mutationGroupBox.Controls.Add(this.meanWeightChangeLabel);
    148       this.mutationGroupBox.Controls.Add(this.weightChangeMuTextBox);
    149       this.mutationGroupBox.Location = new System.Drawing.Point(3, 158);
     201      this.mutationGroupBox.Controls.Add(this.slopeChangeSigmaLabel);
     202      this.mutationGroupBox.Controls.Add(this.slopeChangeSigmaTextBox);
     203      this.mutationGroupBox.Controls.Add(this.slopeChangeMuLabel);
     204      this.mutationGroupBox.Controls.Add(this.slopeChangeMuTextBox);
     205      this.mutationGroupBox.Controls.Add(this.thresholdChangeSigmaLabel);
     206      this.mutationGroupBox.Controls.Add(this.thresholdChangeSigmaTextBox);
     207      this.mutationGroupBox.Controls.Add(this.ThresholdChangeMuLabel);
     208      this.mutationGroupBox.Controls.Add(this.thresholdChangeMuTextBox);
     209      this.mutationGroupBox.Location = new System.Drawing.Point(3, 212);
    150210      this.mutationGroupBox.Name = "mutationGroupBox";
    151       this.mutationGroupBox.Size = new System.Drawing.Size(320, 73);
     211      this.mutationGroupBox.Size = new System.Drawing.Size(320, 127);
    152212      this.mutationGroupBox.TabIndex = 9;
    153213      this.mutationGroupBox.TabStop = false;
    154214      this.mutationGroupBox.Text = "Mutation";
    155215      //
    156       // stdDevWeightChangeLabel
    157       //
    158       this.stdDevWeightChangeLabel.AutoSize = true;
    159       this.stdDevWeightChangeLabel.Location = new System.Drawing.Point(6, 48);
    160       this.stdDevWeightChangeLabel.Name = "stdDevWeightChangeLabel";
    161       this.stdDevWeightChangeLabel.Size = new System.Drawing.Size(119, 13);
    162       this.stdDevWeightChangeLabel.TabIndex = 8;
    163       this.stdDevWeightChangeLabel.Text = "Weight change (sigma):";
    164       this.toolTip.SetToolTip(this.stdDevWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample the change in we" +
    165               "ight.");
    166       //
    167       // weightChangeSigmaTextBox
    168       //
    169       this.weightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    170                   | System.Windows.Forms.AnchorStyles.Right)));
    171       this.weightChangeSigmaTextBox.Location = new System.Drawing.Point(131, 45);
    172       this.weightChangeSigmaTextBox.Name = "weightChangeSigmaTextBox";
    173       this.weightChangeSigmaTextBox.Size = new System.Drawing.Size(162, 20);
    174       this.weightChangeSigmaTextBox.TabIndex = 9;
    175       this.toolTip.SetToolTip(this.weightChangeSigmaTextBox, "The sigma parameter for the normal distribution to use to sample the change in we" +
    176               "ight.");
    177       this.weightChangeSigmaTextBox.TextChanged += new System.EventHandler(this.weightChangeSigmaTextBox_TextChanged);
    178       //
    179       // meanWeightChangeLabel
    180       //
    181       this.meanWeightChangeLabel.AutoSize = true;
    182       this.meanWeightChangeLabel.Location = new System.Drawing.Point(6, 22);
    183       this.meanWeightChangeLabel.Name = "meanWeightChangeLabel";
    184       this.meanWeightChangeLabel.Size = new System.Drawing.Size(106, 13);
    185       this.meanWeightChangeLabel.TabIndex = 6;
    186       this.meanWeightChangeLabel.Text = "Weight change (mu):";
    187       this.toolTip.SetToolTip(this.meanWeightChangeLabel, "The nu (mean) parameter for the normal distribution to sample the change in weigh" +
    188               "t.");
    189       //
    190       // weightChangeMuTextBox
    191       //
    192       this.weightChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    193                   | System.Windows.Forms.AnchorStyles.Right)));
    194       this.weightChangeMuTextBox.Location = new System.Drawing.Point(131, 19);
    195       this.weightChangeMuTextBox.Name = "weightChangeMuTextBox";
    196       this.weightChangeMuTextBox.Size = new System.Drawing.Size(162, 20);
    197       this.weightChangeMuTextBox.TabIndex = 7;
    198       this.toolTip.SetToolTip(this.weightChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the change in weigh" +
    199               "t.");
    200       this.weightChangeMuTextBox.TextChanged += new System.EventHandler(this.weightChangeMuTextBox_TextChanged);
    201       //
    202       // VariableView
     216      // slopeChangeSigmaLabel
     217      //
     218      this.slopeChangeSigmaLabel.AutoSize = true;
     219      this.slopeChangeSigmaLabel.Location = new System.Drawing.Point(6, 102);
     220      this.slopeChangeSigmaLabel.Name = "slopeChangeSigmaLabel";
     221      this.slopeChangeSigmaLabel.Size = new System.Drawing.Size(112, 13);
     222      this.slopeChangeSigmaLabel.TabIndex = 12;
     223      this.slopeChangeSigmaLabel.Text = "Slope change (sigma):";
     224      this.toolTip.SetToolTip(this.slopeChangeSigmaLabel, "The sigma parameter for the normal distribution to use to sample the change in sl" +
     225              "ope.");
     226      //
     227      // slopeChangeSigmaTextBox
     228      //
     229      this.slopeChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     230                  | System.Windows.Forms.AnchorStyles.Right)));
     231      this.slopeChangeSigmaTextBox.Location = new System.Drawing.Point(149, 99);
     232      this.slopeChangeSigmaTextBox.Name = "slopeChangeSigmaTextBox";
     233      this.slopeChangeSigmaTextBox.Size = new System.Drawing.Size(162, 20);
     234      this.slopeChangeSigmaTextBox.TabIndex = 13;
     235      this.toolTip.SetToolTip(this.slopeChangeSigmaTextBox, "The sigma parameter for the normal distribution to use to sample the change in sl" +
     236              "ope.");
     237      this.slopeChangeSigmaTextBox.TextChanged += new System.EventHandler(this.slopeChangeSigmaTextBox_TextChanged);
     238      //
     239      // slopeChangeMuLabel
     240      //
     241      this.slopeChangeMuLabel.AutoSize = true;
     242      this.slopeChangeMuLabel.Location = new System.Drawing.Point(6, 76);
     243      this.slopeChangeMuLabel.Name = "slopeChangeMuLabel";
     244      this.slopeChangeMuLabel.Size = new System.Drawing.Size(99, 13);
     245      this.slopeChangeMuLabel.TabIndex = 10;
     246      this.slopeChangeMuLabel.Text = "Slope change (mu):";
     247      this.toolTip.SetToolTip(this.slopeChangeMuLabel, "The nu (mean) parameter for the normal distribution to sample the change in slope" +
     248              ".");
     249      //
     250      // slopeChangeMuTextBox
     251      //
     252      this.slopeChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     253                  | System.Windows.Forms.AnchorStyles.Right)));
     254      this.slopeChangeMuTextBox.Location = new System.Drawing.Point(149, 73);
     255      this.slopeChangeMuTextBox.Name = "slopeChangeMuTextBox";
     256      this.slopeChangeMuTextBox.Size = new System.Drawing.Size(162, 20);
     257      this.slopeChangeMuTextBox.TabIndex = 11;
     258      this.toolTip.SetToolTip(this.slopeChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the change in slope" +
     259              ".");
     260      this.slopeChangeMuTextBox.TextChanged += new System.EventHandler(this.slopeChangeMuTextBox_TextChanged);
     261      //
     262      // thresholdChangeSigmaLabel
     263      //
     264      this.thresholdChangeSigmaLabel.AutoSize = true;
     265      this.thresholdChangeSigmaLabel.Location = new System.Drawing.Point(6, 44);
     266      this.thresholdChangeSigmaLabel.Name = "thresholdChangeSigmaLabel";
     267      this.thresholdChangeSigmaLabel.Size = new System.Drawing.Size(132, 13);
     268      this.thresholdChangeSigmaLabel.TabIndex = 8;
     269      this.thresholdChangeSigmaLabel.Text = "Threshold change (sigma):";
     270      this.toolTip.SetToolTip(this.thresholdChangeSigmaLabel, "The sigma parameter for the normal distribution to use to sample the change in th" +
     271              "reshold.");
     272      //
     273      // thresholdChangeSigmaTextBox
     274      //
     275      this.thresholdChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     276                  | System.Windows.Forms.AnchorStyles.Right)));
     277      this.thresholdChangeSigmaTextBox.Location = new System.Drawing.Point(149, 41);
     278      this.thresholdChangeSigmaTextBox.Name = "thresholdChangeSigmaTextBox";
     279      this.thresholdChangeSigmaTextBox.Size = new System.Drawing.Size(162, 20);
     280      this.thresholdChangeSigmaTextBox.TabIndex = 9;
     281      this.toolTip.SetToolTip(this.thresholdChangeSigmaTextBox, "The sigma parameter for the normal distribution to use to sample the change in th" +
     282              "reshold.");
     283      this.thresholdChangeSigmaTextBox.TextChanged += new System.EventHandler(this.thresholdChangeSigmaTextBox_TextChanged);
     284      //
     285      // ThresholdChangeMuLabel
     286      //
     287      this.ThresholdChangeMuLabel.AutoSize = true;
     288      this.ThresholdChangeMuLabel.Location = new System.Drawing.Point(6, 18);
     289      this.ThresholdChangeMuLabel.Name = "ThresholdChangeMuLabel";
     290      this.ThresholdChangeMuLabel.Size = new System.Drawing.Size(119, 13);
     291      this.ThresholdChangeMuLabel.TabIndex = 6;
     292      this.ThresholdChangeMuLabel.Text = "Threshold change (mu):";
     293      this.toolTip.SetToolTip(this.ThresholdChangeMuLabel, "The nu (mean) parameter for the normal distribution to sample the change in thres" +
     294              "hold.");
     295      //
     296      // thresholdChangeMuTextBox
     297      //
     298      this.thresholdChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     299                  | System.Windows.Forms.AnchorStyles.Right)));
     300      this.thresholdChangeMuTextBox.Location = new System.Drawing.Point(149, 15);
     301      this.thresholdChangeMuTextBox.Name = "thresholdChangeMuTextBox";
     302      this.thresholdChangeMuTextBox.Size = new System.Drawing.Size(162, 20);
     303      this.thresholdChangeMuTextBox.TabIndex = 7;
     304      this.toolTip.SetToolTip(this.thresholdChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the change in thres" +
     305              "hold.");
     306      this.thresholdChangeMuTextBox.TextChanged += new System.EventHandler(this.thresholdChangeMuTextBox_TextChanged);
     307      //
     308      // VariableConditionView
    203309      //
    204310      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     
    206312      this.Controls.Add(this.mutationGroupBox);
    207313      this.Controls.Add(this.initializationGroupBox);
    208       this.Name = "VariableView";
    209       this.Size = new System.Drawing.Size(326, 235);
     314      this.Name = "VariableConditionView";
     315      this.Size = new System.Drawing.Size(326, 344);
    210316      this.Controls.SetChildIndex(this.initializationGroupBox, 0);
    211317      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
     
    228334    #endregion
    229335
    230     private System.Windows.Forms.Label weightMuLabel;
    231     private System.Windows.Forms.TextBox weightMuTextBox;
     336    private System.Windows.Forms.Label thresholdInitializationMuLabel;
     337    private System.Windows.Forms.TextBox thresholdInitializationMuTextBox;
    232338    protected System.Windows.Forms.GroupBox initializationGroupBox;
    233     private System.Windows.Forms.Label weightSigmaLabel;
    234     private System.Windows.Forms.TextBox weightSigmaTextBox;
     339    private System.Windows.Forms.Label thresholdInitializationSigmaLabel;
     340    private System.Windows.Forms.TextBox thresholdInitializationSigmaTextBox;
    235341    protected System.Windows.Forms.GroupBox mutationGroupBox;
    236     private System.Windows.Forms.Label stdDevWeightChangeLabel;
    237     private System.Windows.Forms.TextBox weightChangeSigmaTextBox;
    238     private System.Windows.Forms.Label meanWeightChangeLabel;
    239     private System.Windows.Forms.TextBox weightChangeMuTextBox;
     342    private System.Windows.Forms.Label thresholdChangeSigmaLabel;
     343    private System.Windows.Forms.TextBox thresholdChangeSigmaTextBox;
     344    private System.Windows.Forms.Label ThresholdChangeMuLabel;
     345    private System.Windows.Forms.TextBox thresholdChangeMuTextBox;
     346    private System.Windows.Forms.Label slopeInitializationSigmaLabel;
     347    private System.Windows.Forms.TextBox slopeInitializationSigmaTextBox;
     348    private System.Windows.Forms.Label slopeInitializationMuLabel;
     349    private System.Windows.Forms.TextBox slopeInitializationMuTextBox;
     350    private System.Windows.Forms.Label slopeChangeSigmaLabel;
     351    private System.Windows.Forms.TextBox slopeChangeSigmaTextBox;
     352    private System.Windows.Forms.Label slopeChangeMuLabel;
     353    private System.Windows.Forms.TextBox slopeChangeMuTextBox;
    240354
    241355  }
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableConditionView.cs

    r5042 r5060  
    2929namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols {
    3030  [View("Variable View")]
    31   [Content(typeof(Variable), true)]
    32   public partial class VariableView : SymbolView {
    33     public new Variable Content {
    34       get { return (Variable)base.Content; }
     31  [Content(typeof(VariableCondition), true)]
     32  public partial class VariableConditionView : SymbolView {
     33    public new VariableCondition Content {
     34      get { return (VariableCondition)base.Content; }
    3535      set { base.Content = value; }
    3636    }
    3737
    38     public VariableView() {
     38    public VariableConditionView() {
    3939      InitializeComponent();
    4040    }
     
    4444      Content.Changed += new EventHandler(Content_Changed);
    4545    }
    46 
    4746    protected override void DeregisterContentEvents() {
    4847      base.DeregisterContentEvents();
    4948      Content.Changed -= new EventHandler(Content_Changed);
    5049    }
    51 
    5250    protected override void OnContentChanged() {
    5351      base.OnContentChanged();
     52      UpdateControl();
     53    }
     54    private void Content_Changed(object sender, EventArgs e) {
    5455      UpdateControl();
    5556    }
     
    5758    protected override void SetEnabledStateOfControls() {
    5859      base.SetEnabledStateOfControls();
    59       weightMuTextBox.Enabled = Content != null;
    60       weightMuTextBox.ReadOnly = ReadOnly;
    61       weightSigmaTextBox.Enabled = Content != null;
    62       weightSigmaTextBox.ReadOnly = ReadOnly;
    63       weightChangeMuTextBox.Enabled = Content != null;
    64       weightChangeMuTextBox.ReadOnly = ReadOnly;
    65       weightChangeSigmaTextBox.Enabled = Content != null;
    66       weightChangeSigmaTextBox.ReadOnly = ReadOnly;
     60      thresholdInitializationMuTextBox.Enabled = Content != null;
     61      thresholdInitializationMuTextBox.ReadOnly = ReadOnly;
     62      thresholdInitializationSigmaTextBox.Enabled = Content != null;
     63      thresholdInitializationSigmaTextBox.ReadOnly = ReadOnly;
     64      slopeInitializationMuTextBox.Enabled = Content != null;
     65      slopeInitializationMuTextBox.ReadOnly = ReadOnly;
     66      slopeInitializationSigmaTextBox.Enabled = Content != null;
     67      slopeInitializationSigmaTextBox.ReadOnly = ReadOnly;
     68
     69      thresholdChangeMuTextBox.Enabled = Content != null;
     70      thresholdChangeMuTextBox.ReadOnly = ReadOnly;
     71      thresholdChangeSigmaTextBox.Enabled = Content != null;
     72      thresholdChangeSigmaTextBox.ReadOnly = ReadOnly;
     73      slopeChangeMuTextBox.Enabled = Content != null;
     74      slopeChangeMuTextBox.ReadOnly = ReadOnly;
     75      slopeChangeSigmaTextBox.Enabled = Content != null;
     76      slopeChangeSigmaTextBox.ReadOnly = ReadOnly;
    6777    }
    6878
    69     #region content event handlers
    70     private void Content_Changed(object sender, EventArgs e) {
    71       UpdateControl();
     79
     80
     81    private void UpdateControl() {
     82      if (Content == null) {
     83        thresholdInitializationMuTextBox.Text = string.Empty;
     84        thresholdInitializationSigmaTextBox.Text = string.Empty;
     85        slopeInitializationMuTextBox.Text = string.Empty;
     86        slopeInitializationSigmaTextBox.Text = string.Empty;
     87        thresholdChangeMuTextBox.Text = string.Empty;
     88        thresholdChangeSigmaTextBox.Text = string.Empty;
     89        slopeChangeMuTextBox.Text = string.Empty;
     90        slopeChangeSigmaTextBox.Text = string.Empty;
     91      } else {
     92        thresholdInitializationMuTextBox.Text = Content.ThresholdInitializerMu.ToString();
     93        thresholdInitializationSigmaTextBox.Text = Content.ThresholdInitializerSigma.ToString();
     94        slopeInitializationMuTextBox.Text = Content.SlopeInitializerMu.ToString();
     95        slopeInitializationSigmaTextBox.Text = Content.SlopeInitializerSigma.ToString();
     96        thresholdChangeMuTextBox.Text = Content.ThresholdManipulatorMu.ToString();
     97        thresholdChangeSigmaTextBox.Text = Content.ThresholdManipulatorSigma.ToString();
     98        slopeChangeMuTextBox.Text = Content.SlopeManipulatorMu.ToString();
     99        slopeChangeSigmaTextBox.Text = Content.SlopeManipulatorSigma.ToString();
     100      }
     101      SetEnabledStateOfControls();
     102    }
     103
     104    #region control events
     105    private void thresholdMuTextBox_TextChanged(object sender, EventArgs e) {
     106      double value;
     107      if (double.TryParse(thresholdInitializationMuTextBox.Text, out value)) {
     108        Content.ThresholdInitializerMu = value;
     109        errorProvider.SetError(thresholdInitializationMuTextBox, string.Empty);
     110      } else errorProvider.SetError(thresholdInitializationMuTextBox, "Invalid value");
     111    }
     112    private void thresholdInitializationSigmaTextBox_TextChanged(object sender, EventArgs e) {
     113      double value;
     114      if (double.TryParse(thresholdInitializationSigmaTextBox.Text, out value)) {
     115        Content.ThresholdInitializerSigma = value;
     116        errorProvider.SetError(thresholdInitializationSigmaTextBox, string.Empty);
     117      } else errorProvider.SetError(thresholdInitializationSigmaTextBox, "Invalid value");
     118    }
     119    private void slopeInitializationMuTextBox_TextChanged(object sender, EventArgs e) {
     120      double value;
     121      if (double.TryParse(slopeInitializationMuTextBox.Text, out value)) {
     122        Content.SlopeInitializerMu = value;
     123        errorProvider.SetError(slopeInitializationMuTextBox, string.Empty);
     124      } else errorProvider.SetError(slopeInitializationMuTextBox, "Invalid value");
     125    }
     126    private void slopeInitializationSigmaTextBox_TextChanged(object sender, EventArgs e) {
     127      double value;
     128      if (double.TryParse(slopeInitializationSigmaTextBox.Text, out value)) {
     129        Content.SlopeInitializerSigma = value;
     130        errorProvider.SetError(slopeInitializationSigmaTextBox, string.Empty);
     131      } else errorProvider.SetError(slopeInitializationSigmaTextBox, "Invalid value");
     132    }
     133
     134    private void thresholdChangeMuTextBox_TextChanged(object sender, EventArgs e) {
     135      double value;
     136      if (double.TryParse(thresholdChangeMuTextBox.Text, out value)) {
     137        Content.ThresholdManipulatorMu = value;
     138        errorProvider.SetError(thresholdChangeMuTextBox, string.Empty);
     139      } else errorProvider.SetError(thresholdChangeMuTextBox, "Invalid value");
     140    }
     141
     142    private void thresholdChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     143      double value;
     144      if (double.TryParse(thresholdChangeSigmaTextBox.Text, out value)) {
     145        Content.ThresholdManipulatorSigma = value;
     146        errorProvider.SetError(thresholdChangeSigmaTextBox, string.Empty);
     147      } else errorProvider.SetError(thresholdChangeSigmaTextBox, "Invalid value");
     148    }
     149    private void slopeChangeMuTextBox_TextChanged(object sender, EventArgs e) {
     150      double value;
     151      if (double.TryParse(slopeChangeMuTextBox.Text, out value)) {
     152        Content.SlopeManipulatorMu = value;
     153        errorProvider.SetError(slopeChangeMuTextBox, string.Empty);
     154      } else errorProvider.SetError(slopeChangeMuTextBox, "Invalid value");
     155    }
     156
     157    private void slopeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     158      double value;
     159      if (double.TryParse(slopeChangeSigmaTextBox.Text, out value)) {
     160        Content.SlopeManipulatorSigma = value;
     161        errorProvider.SetError(slopeChangeSigmaTextBox, string.Empty);
     162      } else errorProvider.SetError(slopeChangeSigmaTextBox, "Invalid value");
    72163    }
    73164    #endregion
    74165
    75     #region control event handlers
    76     private void weightMuTextBox_TextChanged(object sender, EventArgs e) {
    77       double nu;
    78       if (double.TryParse(weightMuTextBox.Text, out nu)) {
    79         Content.WeightMu = nu;
    80         errorProvider.SetError(weightMuTextBox, string.Empty);
    81       } else {
    82         errorProvider.SetError(weightMuTextBox, "Invalid value");
    83       }
    84     }
    85     private void weightSigmaTextBox_TextChanged(object sender, EventArgs e) {
    86       double sigma;
    87       if (double.TryParse(weightSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    88         Content.WeightSigma = sigma;
    89         errorProvider.SetError(weightSigmaTextBox, string.Empty);
    90       } else {
    91         errorProvider.SetError(weightSigmaTextBox, "Invalid value");
    92       }
    93     }
    94 
    95     private void weightChangeMuTextBox_TextChanged(object sender, EventArgs e) {
    96       double nu;
    97       if (double.TryParse(weightChangeMuTextBox.Text, out nu)) {
    98         Content.WeightManipulatorMu = nu;
    99         errorProvider.SetError(weightChangeMuTextBox, string.Empty);
    100       } else {
    101         errorProvider.SetError(weightChangeMuTextBox, "Invalid value");
    102       }
    103     }
    104 
    105     private void weightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
    106       double sigma;
    107       if (double.TryParse(weightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    108         Content.WeightManipulatorSigma = sigma;
    109         errorProvider.SetError(weightChangeSigmaTextBox, string.Empty);
    110       } else {
    111         errorProvider.SetError(weightChangeSigmaTextBox, "Invalid value");
    112       }
    113     }
    114     #endregion
    115 
    116     #region helpers
    117     private void UpdateControl() {
    118       if (Content == null) {
    119         weightMuTextBox.Text = string.Empty;
    120         weightSigmaTextBox.Text = string.Empty;
    121         weightMuTextBox.Text = string.Empty;
    122         weightChangeSigmaTextBox.Text = string.Empty;
    123       } else {
    124         weightMuTextBox.Text = Content.WeightMu.ToString();
    125         weightSigmaTextBox.Text = Content.WeightSigma.ToString();
    126         weightChangeMuTextBox.Text = Content.WeightManipulatorMu.ToString();
    127         weightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString();
    128       }
    129       SetEnabledStateOfControls();
    130     }
    131     #endregion
    132166  }
    133167}
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj

    r5051 r5060  
    156156    <Compile Include="Symbolic\Symbols\Derivative.cs" />
    157157    <Compile Include="Symbolic\Symbols\Integral.cs" />
     158    <Compile Include="Symbolic\Symbols\VariableCondition.cs" />
     159    <Compile Include="Symbolic\Symbols\VariableConditionTreeNode.cs" />
    158160    <Compile Include="TableFileParser.cs" />
    159161    <None Include="HeuristicLab.snk" />
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs

    r5051 r5060  
    6060      var or = new Or();
    6161      var not = new Not();
     62
    6263      var timeLag = new TimeLag();
    6364      timeLag.InitialFrequency = 0.0;
    6465      var integral = new Integral();
    6566      integral.InitialFrequency = 0.0;
    66       var derivativ = new Derivative();
    67       derivativ.InitialFrequency = 0.0;
     67      var derivative = new Derivative();
     68      derivative.InitialFrequency = 0.0;
     69
     70      var variableCondition = new VariableCondition();
     71      variableCondition.InitialFrequency = 0.0;
    6872
    6973      var constant = new Constant();
     
    7478      laggedVariable.InitialFrequency = 0.0;
    7579
    76       var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, timeLag, integral, derivativ, constant, variableSymbol, laggedVariable };
    77       var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not, timeLag, integral, derivativ };
    78       var binaryFunctionSymbols = new List<Symbol>() { gt, lt };
     80      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt,
     81        and, or, not, timeLag, integral, derivative, variableCondition, constant, variableSymbol, laggedVariable };
     82      var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not, timeLag, integral, derivative };
     83      var binaryFunctionSymbols = new List<Symbol>() { gt, lt, variableCondition };
    7984      var functionSymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or };
    8085      var terminalSymbols = new List<Symbol>() { variableSymbol, constant, laggedVariable };
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs

    r5052 r5060  
    7171      public const byte Integral = 23;
    7272      public const byte Derivative = 24;
     73
     74      public const byte VariableCondition = 25;
    7375    }
    7476
     
    9799      { typeof(TimeLag), OpCodes.TimeLag},
    98100      { typeof(Integral), OpCodes.Integral},
    99       { typeof(Derivative), OpCodes.Derivative}
     101      { typeof(Derivative), OpCodes.Derivative},
     102      { typeof(VariableCondition),OpCodes.VariableCondition}
    100103    };
    101104    private const int ARGUMENT_STACK_SIZE = 1024;
     
    147150        var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
    148151        instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
     152      } else if (instr.opCode == OpCodes.VariableCondition) {
     153        var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
     154        instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);
    149155      }
    150156      return instr;
     
    344350            return (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
    345351          }
     352
     353        //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) )
     354        //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function
     355        case OpCodes.VariableCondition: {
     356            var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
     357            double variableValue = dataset[row, currentInstr.iArg0];
     358            double x = variableValue - variableConditionTreeNode.Threshold;
     359            double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
     360
     361            double trueBranch = Evaluate();
     362            double falseBranch = Evaluate();
     363
     364            return trueBranch * p + falseBranch * (1 - p);
     365          }
    346366        default: throw new NotSupportedException();
    347367      }
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs

    r4989 r5060  
    9191    #endregion
    9292    [StorableConstructor]
    93     protected Variable(bool deserializing) : base(deserializing) {
     93    protected Variable(bool deserializing)
     94      : base(deserializing) {
    9495      variableNames = new List<string>();
    9596    }
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs

    r4989 r5060  
    5555
    5656    public override bool HasLocalParameters {
    57       get {
    58         return true;
    59       }
     57      get { return true; }
    6058    }
    6159
Note: See TracChangeset for help on using the changeset viewer.