Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5326


Ignore:
Timestamp:
01/18/11 16:09:35 (14 years ago)
Author:
gkronber
Message:

Implemented multiplicative manipulation of constants and variable weights. #1384

Location:
trunk/sources
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolView.Designer.cs

    r3824 r5326  
    6666      //
    6767      this.initialFrequencyLabel.AutoSize = true;
    68       this.initialFrequencyLabel.Location = new System.Drawing.Point(6, 56);
     68      this.initialFrequencyLabel.Location = new System.Drawing.Point(3, 56);
    6969      this.initialFrequencyLabel.Name = "initialFrequencyLabel";
    7070      this.initialFrequencyLabel.Size = new System.Drawing.Size(84, 13);
     
    8888      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    8989      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     90      this.Controls.Add(this.initialFrequencyTextBox);
    9091      this.Controls.Add(this.initialFrequencyLabel);
    91       this.Controls.Add(this.initialFrequencyTextBox);
    9292      this.Name = "SymbolView";
    9393      this.Size = new System.Drawing.Size(320, 79);
     94      this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
    9495      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
    95       this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);
    9696      this.Controls.SetChildIndex(this.nameLabel, 0);
    9797      this.Controls.SetChildIndex(this.descriptionLabel, 0);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.Designer.cs

    r4990 r5326  
    5151      this.maxValueTextBox = new System.Windows.Forms.TextBox();
    5252      this.mutationGroupBox = new System.Windows.Forms.GroupBox();
    53       this.stdDevWeightChangeLabel = new System.Windows.Forms.Label();
    54       this.valueChangeSigmaTextBox = new System.Windows.Forms.TextBox();
    55       this.meanWeightChangeLabel = new System.Windows.Forms.Label();
    56       this.valueChangeMuTextBox = new System.Windows.Forms.TextBox();
     53      this.multiplicativeChangeLabel = new System.Windows.Forms.Label();
     54      this.multiplicativeChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     55      this.additiveChangeLabel = new System.Windows.Forms.Label();
     56      this.additiveChangeSigmaTextBox = new System.Windows.Forms.TextBox();
    5757      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5858      this.initializationGroupBox.SuspendLayout();
     
    6767      //
    6868      this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    69       this.initialFrequencyTextBox.Size = new System.Drawing.Size(203, 20);
     69      this.initialFrequencyTextBox.Size = new System.Drawing.Size(275, 20);
    7070      //
    7171      // nameTextBox
     
    7373      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    7474      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    75       this.nameTextBox.Size = new System.Drawing.Size(203, 20);
     75      this.nameTextBox.Size = new System.Drawing.Size(275, 20);
    7676      //
    7777      // descriptionTextBox
    7878      //
    7979      this.errorProvider.SetIconAlignment(this.descriptionTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    80       this.descriptionTextBox.Size = new System.Drawing.Size(203, 20);
     80      this.descriptionTextBox.Size = new System.Drawing.Size(275, 20);
    8181      //
    8282      // weightNuLabel
     
    9797      this.minValueTextBox.Location = new System.Drawing.Point(92, 19);
    9898      this.minValueTextBox.Name = "minValueTextBox";
    99       this.minValueTextBox.Size = new System.Drawing.Size(222, 20);
     99      this.minValueTextBox.Size = new System.Drawing.Size(291, 20);
    100100      this.minValueTextBox.TabIndex = 7;
    101101      this.toolTip.SetToolTip(this.minValueTextBox, "The minimal value to use for random initialization of constants.");
     
    112112      this.initializationGroupBox.Location = new System.Drawing.Point(3, 79);
    113113      this.initializationGroupBox.Name = "initializationGroupBox";
    114       this.initializationGroupBox.Size = new System.Drawing.Size(320, 73);
     114      this.initializationGroupBox.Size = new System.Drawing.Size(389, 73);
    115115      this.initializationGroupBox.TabIndex = 8;
    116116      this.initializationGroupBox.TabStop = false;
     
    134134      this.maxValueTextBox.Location = new System.Drawing.Point(92, 45);
    135135      this.maxValueTextBox.Name = "maxValueTextBox";
    136       this.maxValueTextBox.Size = new System.Drawing.Size(222, 20);
     136      this.maxValueTextBox.Size = new System.Drawing.Size(291, 20);
    137137      this.maxValueTextBox.TabIndex = 9;
    138138      this.toolTip.SetToolTip(this.maxValueTextBox, "The maximal value to use for random initialization of constants.");
     
    143143      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    144144                  | System.Windows.Forms.AnchorStyles.Right)));
    145       this.mutationGroupBox.Controls.Add(this.stdDevWeightChangeLabel);
    146       this.mutationGroupBox.Controls.Add(this.valueChangeSigmaTextBox);
    147       this.mutationGroupBox.Controls.Add(this.meanWeightChangeLabel);
    148       this.mutationGroupBox.Controls.Add(this.valueChangeMuTextBox);
     145      this.mutationGroupBox.Controls.Add(this.multiplicativeChangeLabel);
     146      this.mutationGroupBox.Controls.Add(this.multiplicativeChangeSigmaTextBox);
     147      this.mutationGroupBox.Controls.Add(this.additiveChangeLabel);
     148      this.mutationGroupBox.Controls.Add(this.additiveChangeSigmaTextBox);
    149149      this.mutationGroupBox.Location = new System.Drawing.Point(3, 158);
    150150      this.mutationGroupBox.Name = "mutationGroupBox";
    151       this.mutationGroupBox.Size = new System.Drawing.Size(320, 73);
     151      this.mutationGroupBox.Size = new System.Drawing.Size(389, 73);
    152152      this.mutationGroupBox.TabIndex = 9;
    153153      this.mutationGroupBox.TabStop = false;
    154154      this.mutationGroupBox.Text = "Mutation";
    155155      //
    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(112, 13);
    162       this.stdDevWeightChangeLabel.TabIndex = 8;
    163       this.stdDevWeightChangeLabel.Text = "Value change (sigma):";
    164       this.toolTip.SetToolTip(this.stdDevWeightChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to use to sample the " +
    165               "value change.");
    166       //
    167       // valueChangeSigmaTextBox
    168       //
    169       this.valueChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    170                   | System.Windows.Forms.AnchorStyles.Right)));
    171       this.errorProvider.SetIconAlignment(this.valueChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    172       this.valueChangeSigmaTextBox.Location = new System.Drawing.Point(136, 45);
    173       this.valueChangeSigmaTextBox.Name = "valueChangeSigmaTextBox";
    174       this.valueChangeSigmaTextBox.Size = new System.Drawing.Size(178, 20);
    175       this.valueChangeSigmaTextBox.TabIndex = 9;
    176       this.toolTip.SetToolTip(this.valueChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample the " +
    177               "value change.");
    178       this.valueChangeSigmaTextBox.TextChanged += new System.EventHandler(this.valueChangeSigmaTextBox_TextChanged);
    179       //
    180       // meanWeightChangeLabel
    181       //
    182       this.meanWeightChangeLabel.AutoSize = true;
    183       this.meanWeightChangeLabel.Location = new System.Drawing.Point(6, 22);
    184       this.meanWeightChangeLabel.Name = "meanWeightChangeLabel";
    185       this.meanWeightChangeLabel.Size = new System.Drawing.Size(99, 13);
    186       this.meanWeightChangeLabel.TabIndex = 6;
    187       this.meanWeightChangeLabel.Text = "Value change (mu):";
    188       this.toolTip.SetToolTip(this.meanWeightChangeLabel, "The mu (mean) parameter for the normal distribution to sample the value change.");
    189       //
    190       // valueChangeMuTextBox
    191       //
    192       this.valueChangeMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    193                   | System.Windows.Forms.AnchorStyles.Right)));
    194       this.errorProvider.SetIconAlignment(this.valueChangeMuTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    195       this.valueChangeMuTextBox.Location = new System.Drawing.Point(136, 19);
    196       this.valueChangeMuTextBox.Name = "valueChangeMuTextBox";
    197       this.valueChangeMuTextBox.Size = new System.Drawing.Size(178, 20);
    198       this.valueChangeMuTextBox.TabIndex = 7;
    199       this.toolTip.SetToolTip(this.valueChangeMuTextBox, "The mu (mean) parameter for the normal distribution to sample the value change.");
    200       this.valueChangeMuTextBox.TextChanged += new System.EventHandler(this.valueChangeMuTextBox_TextChanged);
     156      // multiplicativeChangeLabel
     157      //
     158      this.multiplicativeChangeLabel.AutoSize = true;
     159      this.multiplicativeChangeLabel.Location = new System.Drawing.Point(6, 48);
     160      this.multiplicativeChangeLabel.Name = "multiplicativeChangeLabel";
     161      this.multiplicativeChangeLabel.Size = new System.Drawing.Size(146, 13);
     162      this.multiplicativeChangeLabel.TabIndex = 8;
     163      this.multiplicativeChangeLabel.Text = "Multiplicative change (sigma):";
     164      this.toolTip.SetToolTip(this.multiplicativeChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to use to sample the " +
     165              "multiplicative change.");
     166      //
     167      // multiplicativeChangeSigmaTextBox
     168      //
     169      this.multiplicativeChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     170                  | System.Windows.Forms.AnchorStyles.Right)));
     171      this.errorProvider.SetIconAlignment(this.multiplicativeChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     172      this.multiplicativeChangeSigmaTextBox.Location = new System.Drawing.Point(168, 45);
     173      this.multiplicativeChangeSigmaTextBox.Name = "multiplicativeChangeSigmaTextBox";
     174      this.multiplicativeChangeSigmaTextBox.Size = new System.Drawing.Size(215, 20);
     175      this.multiplicativeChangeSigmaTextBox.TabIndex = 9;
     176      this.toolTip.SetToolTip(this.multiplicativeChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample a mu" +
     177              "ltiplicative change.");
     178      this.multiplicativeChangeSigmaTextBox.TextChanged += new System.EventHandler(this.multiplicativeChangeSigmaTextBox_TextChanged);
     179      //
     180      // additiveChangeLabel
     181      //
     182      this.additiveChangeLabel.AutoSize = true;
     183      this.additiveChangeLabel.Location = new System.Drawing.Point(6, 22);
     184      this.additiveChangeLabel.Name = "additiveChangeLabel";
     185      this.additiveChangeLabel.Size = new System.Drawing.Size(123, 13);
     186      this.additiveChangeLabel.TabIndex = 6;
     187      this.additiveChangeLabel.Text = "Additive change (sigma):";
     188      this.toolTip.SetToolTip(this.additiveChangeLabel, "The sigma (std. dev.) parameter for the normal distribution to sample the additiv" +
     189              "e change.");
     190      //
     191      // additiveChangeSigmaTextBox
     192      //
     193      this.additiveChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     194                  | System.Windows.Forms.AnchorStyles.Right)));
     195      this.errorProvider.SetIconAlignment(this.additiveChangeSigmaTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     196      this.additiveChangeSigmaTextBox.Location = new System.Drawing.Point(168, 19);
     197      this.additiveChangeSigmaTextBox.Name = "additiveChangeSigmaTextBox";
     198      this.additiveChangeSigmaTextBox.Size = new System.Drawing.Size(215, 20);
     199      this.additiveChangeSigmaTextBox.TabIndex = 7;
     200      this.toolTip.SetToolTip(this.additiveChangeSigmaTextBox, "The sigma (std. dev.) parameter for the normal distribution to use to sample an a" +
     201              "dditive change.");
     202      this.additiveChangeSigmaTextBox.TextChanged += new System.EventHandler(this.additiveChangeSigmaTextBox_TextChanged);
    201203      //
    202204      // ConstantView
     
    207209      this.Controls.Add(this.initializationGroupBox);
    208210      this.Name = "ConstantView";
    209       this.Size = new System.Drawing.Size(326, 235);
     211      this.Size = new System.Drawing.Size(398, 237);
    210212      this.Controls.SetChildIndex(this.initializationGroupBox, 0);
    211213      this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0);
     
    234236    private System.Windows.Forms.TextBox maxValueTextBox;
    235237    protected System.Windows.Forms.GroupBox mutationGroupBox;
    236     private System.Windows.Forms.Label stdDevWeightChangeLabel;
    237     private System.Windows.Forms.TextBox valueChangeSigmaTextBox;
    238     private System.Windows.Forms.Label meanWeightChangeLabel;
    239     private System.Windows.Forms.TextBox valueChangeMuTextBox;
     238    private System.Windows.Forms.Label multiplicativeChangeLabel;
     239    private System.Windows.Forms.TextBox multiplicativeChangeSigmaTextBox;
     240    private System.Windows.Forms.Label additiveChangeLabel;
     241    private System.Windows.Forms.TextBox additiveChangeSigmaTextBox;
    240242
    241243  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs

    r4990 r5326  
    6161      maxValueTextBox.Enabled = Content != null;
    6262      maxValueTextBox.ReadOnly = ReadOnly;
    63       valueChangeMuTextBox.Enabled = Content != null;
    64       valueChangeMuTextBox.ReadOnly = ReadOnly;
    65       valueChangeSigmaTextBox.Enabled = Content != null;
    66       valueChangeSigmaTextBox.ReadOnly = ReadOnly;
     63      additiveChangeSigmaTextBox.Enabled = Content != null;
     64      additiveChangeSigmaTextBox.ReadOnly = ReadOnly;
     65      multiplicativeChangeSigmaTextBox.Enabled = Content != null;
     66      multiplicativeChangeSigmaTextBox.ReadOnly = ReadOnly;
    6767    }
    6868
     
    9393    }
    9494
    95     private void valueChangeMuTextBox_TextChanged(object sender, EventArgs e) {
    96       double nu;
    97       if (double.TryParse(valueChangeMuTextBox.Text, out nu)) {
    98         Content.ManipulatorMu = nu;
    99         errorProvider.SetError(valueChangeMuTextBox, string.Empty);
     95    private void additiveChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     96      double sigma;
     97      if (double.TryParse(additiveChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
     98        Content.ManipulatorSigma = sigma;
     99        errorProvider.SetError(additiveChangeSigmaTextBox, string.Empty);
    100100      } else {
    101         errorProvider.SetError(valueChangeMuTextBox, "Invalid value");
     101        errorProvider.SetError(additiveChangeSigmaTextBox, "Invalid value");
    102102      }
    103103    }
    104104
    105     private void valueChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     105    private void multiplicativeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
    106106      double sigma;
    107       if (double.TryParse(valueChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    108         Content.ManipulatorSigma = sigma;
    109         errorProvider.SetError(valueChangeSigmaTextBox, string.Empty);
     107      if (double.TryParse(multiplicativeChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
     108        Content.MultiplicativeManipulatorSigma = sigma;
     109        errorProvider.SetError(multiplicativeChangeSigmaTextBox, string.Empty);
    110110      } else {
    111         errorProvider.SetError(valueChangeSigmaTextBox, "Invalid value");
     111        errorProvider.SetError(multiplicativeChangeSigmaTextBox, "Invalid value");
    112112      }
    113113    }
     
    120120        maxValueTextBox.Text = string.Empty;
    121121        minValueTextBox.Text = string.Empty;
    122         valueChangeSigmaTextBox.Text = string.Empty;
     122        multiplicativeChangeSigmaTextBox.Text = string.Empty;
     123        additiveChangeSigmaTextBox.Text = string.Empty;
    123124      } else {
    124125        minValueTextBox.Text = Content.MinValue.ToString();
    125126        maxValueTextBox.Text = Content.MaxValue.ToString();
    126         valueChangeMuTextBox.Text = Content.ManipulatorMu.ToString();
    127         valueChangeSigmaTextBox.Text = Content.ManipulatorSigma.ToString();
     127        additiveChangeSigmaTextBox.Text = Content.ManipulatorSigma.ToString();
     128        multiplicativeChangeSigmaTextBox.Text = Content.MultiplicativeManipulatorSigma.ToString();
    128129      }
    129130      SetEnabledStateOfControls();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.Designer.cs

    r4990 r5326  
    4646    private void InitializeComponent() {
    4747      this.weightMuLabel = new System.Windows.Forms.Label();
    48       this.weightMuTextBox = new System.Windows.Forms.TextBox();
     48      this.weightInitializationMuTextBox = new System.Windows.Forms.TextBox();
    4949      this.initializationGroupBox = new System.Windows.Forms.GroupBox();
    5050      this.weightSigmaLabel = new System.Windows.Forms.Label();
    51       this.weightSigmaTextBox = new System.Windows.Forms.TextBox();
     51      this.weightInitializationSigmaTextBox = new System.Windows.Forms.TextBox();
    5252      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();
     53      this.multiplicativeWeightChangeLabel = new System.Windows.Forms.Label();
     54      this.multiplicativeWeightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
     55      this.additiveWeightChangeLabel = new System.Windows.Forms.Label();
     56      this.additiveWeightChangeSigmaTextBox = new System.Windows.Forms.TextBox();
    5757      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5858      this.initializationGroupBox.SuspendLayout();
     
    9090      this.toolTip.SetToolTip(this.weightMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights.");
    9191      //
    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" +
     92      // weightInitializationMuTextBox
     93      //
     94      this.weightInitializationMuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     95                  | System.Windows.Forms.AnchorStyles.Right)));
     96      this.weightInitializationMuTextBox.Location = new System.Drawing.Point(92, 19);
     97      this.weightInitializationMuTextBox.Name = "weightInitializationMuTextBox";
     98      this.weightInitializationMuTextBox.Size = new System.Drawing.Size(222, 20);
     99      this.weightInitializationMuTextBox.TabIndex = 7;
     100      this.toolTip.SetToolTip(this.weightInitializationMuTextBox, "The mu (mean) parameter of the normal distribution from which to sample the initi" +
    101101              "al weights.");
    102       this.weightMuTextBox.TextChanged += new System.EventHandler(this.weightMuTextBox_TextChanged);
     102      this.weightInitializationMuTextBox.TextChanged += new System.EventHandler(this.weightMuTextBox_TextChanged);
    103103      //
    104104      // initializationGroupBox
     
    107107                  | System.Windows.Forms.AnchorStyles.Right)));
    108108      this.initializationGroupBox.Controls.Add(this.weightSigmaLabel);
    109       this.initializationGroupBox.Controls.Add(this.weightSigmaTextBox);
     109      this.initializationGroupBox.Controls.Add(this.weightInitializationSigmaTextBox);
    110110      this.initializationGroupBox.Controls.Add(this.weightMuLabel);
    111       this.initializationGroupBox.Controls.Add(this.weightMuTextBox);
     111      this.initializationGroupBox.Controls.Add(this.weightInitializationMuTextBox);
    112112      this.initializationGroupBox.Location = new System.Drawing.Point(3, 79);
    113113      this.initializationGroupBox.Name = "initializationGroupBox";
     
    127127      this.toolTip.SetToolTip(this.weightSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights.");
    128128      //
    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 " +
     129      // weightInitializationSigmaTextBox
     130      //
     131      this.weightInitializationSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     132                  | System.Windows.Forms.AnchorStyles.Right)));
     133      this.weightInitializationSigmaTextBox.Location = new System.Drawing.Point(92, 45);
     134      this.weightInitializationSigmaTextBox.Name = "weightInitializationSigmaTextBox";
     135      this.weightInitializationSigmaTextBox.Size = new System.Drawing.Size(222, 20);
     136      this.weightInitializationSigmaTextBox.TabIndex = 9;
     137      this.toolTip.SetToolTip(this.weightInitializationSigmaTextBox, "The sigma parameter for the normal distribution from which to sample the initial " +
    138138              "weights.");
    139       this.weightSigmaTextBox.TextChanged += new System.EventHandler(this.weightSigmaTextBox_TextChanged);
     139      this.weightInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.weightSigmaTextBox_TextChanged);
    140140      //
    141141      // mutationGroupBox
     
    143143      this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    144144                  | 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);
     145      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeLabel);
     146      this.mutationGroupBox.Controls.Add(this.multiplicativeWeightChangeSigmaTextBox);
     147      this.mutationGroupBox.Controls.Add(this.additiveWeightChangeLabel);
     148      this.mutationGroupBox.Controls.Add(this.additiveWeightChangeSigmaTextBox);
    149149      this.mutationGroupBox.Location = new System.Drawing.Point(3, 158);
    150150      this.mutationGroupBox.Name = "mutationGroupBox";
     
    154154      this.mutationGroupBox.Text = "Mutation";
    155155      //
    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);
     156      // multiplicativeWeightChangeLabel
     157      //
     158      this.multiplicativeWeightChangeLabel.AutoSize = true;
     159      this.multiplicativeWeightChangeLabel.Location = new System.Drawing.Point(6, 48);
     160      this.multiplicativeWeightChangeLabel.Name = "multiplicativeWeightChangeLabel";
     161      this.multiplicativeWeightChangeLabel.Size = new System.Drawing.Size(180, 13);
     162      this.multiplicativeWeightChangeLabel.TabIndex = 8;
     163      this.multiplicativeWeightChangeLabel.Text = "Multiplicative weight change (sigma):";
     164      this.toolTip.SetToolTip(this.multiplicativeWeightChangeLabel, "The sigma parameter for the normal distribution to use to sample a multiplicative" +
     165              " change in weight.");
     166      //
     167      // multiplicativeWeightChangeSigmaTextBox
     168      //
     169      this.multiplicativeWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     170                  | System.Windows.Forms.AnchorStyles.Right)));
     171      this.multiplicativeWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 45);
     172      this.multiplicativeWeightChangeSigmaTextBox.Name = "multiplicativeWeightChangeSigmaTextBox";
     173      this.multiplicativeWeightChangeSigmaTextBox.Size = new System.Drawing.Size(113, 20);
     174      this.multiplicativeWeightChangeSigmaTextBox.TabIndex = 9;
     175      this.toolTip.SetToolTip(this.multiplicativeWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample a multiplica" +
     176              "tive change in weight.");
     177      this.multiplicativeWeightChangeSigmaTextBox.TextChanged += new System.EventHandler(this.multiplicativeWeightChangeSigmaTextBox_TextChanged);
     178      //
     179      // additiveWeightChangeLabel
     180      //
     181      this.additiveWeightChangeLabel.AutoSize = true;
     182      this.additiveWeightChangeLabel.Location = new System.Drawing.Point(6, 22);
     183      this.additiveWeightChangeLabel.Name = "additiveWeightChangeLabel";
     184      this.additiveWeightChangeLabel.Size = new System.Drawing.Size(157, 13);
     185      this.additiveWeightChangeLabel.TabIndex = 6;
     186      this.additiveWeightChangeLabel.Text = "Additive weight change (sigma):";
     187      this.toolTip.SetToolTip(this.additiveWeightChangeLabel, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
     188              "change in weight.");
     189      //
     190      // additiveWeightChangeSigmaTextBox
     191      //
     192      this.additiveWeightChangeSigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     193                  | System.Windows.Forms.AnchorStyles.Right)));
     194      this.additiveWeightChangeSigmaTextBox.Location = new System.Drawing.Point(201, 19);
     195      this.additiveWeightChangeSigmaTextBox.Name = "additiveWeightChangeSigmaTextBox";
     196      this.additiveWeightChangeSigmaTextBox.Size = new System.Drawing.Size(113, 20);
     197      this.additiveWeightChangeSigmaTextBox.TabIndex = 7;
     198      this.toolTip.SetToolTip(this.additiveWeightChangeSigmaTextBox, "The sigma (std.dev.) parameter for the normal distribution to sample an additive " +
     199              "change in weight.");
     200      this.additiveWeightChangeSigmaTextBox.TextChanged += new System.EventHandler(this.additiveWeightChangeSigmaTextBox_TextChanged);
    201201      //
    202202      // VariableView
     
    229229
    230230    private System.Windows.Forms.Label weightMuLabel;
    231     private System.Windows.Forms.TextBox weightMuTextBox;
     231    private System.Windows.Forms.TextBox weightInitializationMuTextBox;
    232232    protected System.Windows.Forms.GroupBox initializationGroupBox;
    233233    private System.Windows.Forms.Label weightSigmaLabel;
    234     private System.Windows.Forms.TextBox weightSigmaTextBox;
     234    private System.Windows.Forms.TextBox weightInitializationSigmaTextBox;
    235235    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;
     236    private System.Windows.Forms.Label multiplicativeWeightChangeLabel;
     237    private System.Windows.Forms.TextBox multiplicativeWeightChangeSigmaTextBox;
     238    private System.Windows.Forms.Label additiveWeightChangeLabel;
     239    private System.Windows.Forms.TextBox additiveWeightChangeSigmaTextBox;
    240240
    241241  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs

    r4990 r5326  
    5757    protected override void SetEnabledStateOfControls() {
    5858      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;
     59      weightInitializationMuTextBox.Enabled = Content != null;
     60      weightInitializationMuTextBox.ReadOnly = ReadOnly;
     61      weightInitializationSigmaTextBox.Enabled = Content != null;
     62      weightInitializationSigmaTextBox.ReadOnly = ReadOnly;
     63      additiveWeightChangeSigmaTextBox.Enabled = Content != null;
     64      additiveWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
     65      multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null;
     66      multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly;
    6767    }
    6868
     
    7676    private void weightMuTextBox_TextChanged(object sender, EventArgs e) {
    7777      double nu;
    78       if (double.TryParse(weightMuTextBox.Text, out nu)) {
     78      if (double.TryParse(weightInitializationMuTextBox.Text, out nu)) {
    7979        Content.WeightMu = nu;
    80         errorProvider.SetError(weightMuTextBox, string.Empty);
     80        errorProvider.SetError(weightInitializationMuTextBox, string.Empty);
    8181      } else {
    82         errorProvider.SetError(weightMuTextBox, "Invalid value");
     82        errorProvider.SetError(weightInitializationMuTextBox, "Invalid value");
    8383      }
    8484    }
    8585    private void weightSigmaTextBox_TextChanged(object sender, EventArgs e) {
    8686      double sigma;
    87       if (double.TryParse(weightSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
     87      if (double.TryParse(weightInitializationSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    8888        Content.WeightSigma = sigma;
    89         errorProvider.SetError(weightSigmaTextBox, string.Empty);
     89        errorProvider.SetError(weightInitializationSigmaTextBox, string.Empty);
    9090      } else {
    91         errorProvider.SetError(weightSigmaTextBox, "Invalid value");
     91        errorProvider.SetError(weightInitializationSigmaTextBox, "Invalid value");
    9292      }
    9393    }
    9494
    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);
     95    private void additiveWeightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     96      double sigma;
     97      if (double.TryParse(additiveWeightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
     98        Content.WeightManipulatorSigma = sigma;
     99        errorProvider.SetError(additiveWeightChangeSigmaTextBox, string.Empty);
    100100      } else {
    101         errorProvider.SetError(weightChangeMuTextBox, "Invalid value");
     101        errorProvider.SetError(additiveWeightChangeSigmaTextBox, "Invalid value");
    102102      }
    103103    }
    104104
    105     private void weightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
     105    private void multiplicativeWeightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {
    106106      double sigma;
    107       if (double.TryParse(weightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
    108         Content.WeightManipulatorSigma = sigma;
    109         errorProvider.SetError(weightChangeSigmaTextBox, string.Empty);
     107      if (double.TryParse(multiplicativeWeightChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {
     108        Content.MultiplicativeWeightManipulatorSigma = sigma;
     109        errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, string.Empty);
    110110      } else {
    111         errorProvider.SetError(weightChangeSigmaTextBox, "Invalid value");
     111        errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, "Invalid value");
    112112      }
    113113    }
     
    117117    private void UpdateControl() {
    118118      if (Content == null) {
    119         weightMuTextBox.Text = string.Empty;
    120         weightSigmaTextBox.Text = string.Empty;
    121         weightMuTextBox.Text = string.Empty;
    122         weightChangeSigmaTextBox.Text = string.Empty;
     119        weightInitializationMuTextBox.Text = string.Empty;
     120        weightInitializationSigmaTextBox.Text = string.Empty;
     121        additiveWeightChangeSigmaTextBox.Text = string.Empty;
     122        multiplicativeWeightChangeSigmaTextBox.Text = string.Empty;
    123123      } 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();
     124        weightInitializationMuTextBox.Text = Content.WeightMu.ToString();
     125        weightInitializationSigmaTextBox.Text = Content.WeightSigma.ToString();
     126        additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString();
     127        multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString();
    128128      }
    129129      SetEnabledStateOfControls();
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs

    r4989 r5326  
    3030  [Item("Constant", "Represents a constant value.")]
    3131  public sealed class Constant : Symbol {
    32     #region Propeties
     32    #region Properties
    3333    [Storable]
    3434    private double minValue;
     
    7676      }
    7777    }
     78    [Storable(DefaultValue = 0.0)]
     79    private double multiplicativeManipulatorSigma;
     80    public double MultiplicativeManipulatorSigma {
     81      get { return multiplicativeManipulatorSigma; }
     82      set {
     83        if (value < 0) throw new ArgumentException();
     84        if (value != multiplicativeManipulatorSigma) {
     85          multiplicativeManipulatorSigma = value;
     86          OnChanged(EventArgs.Empty);
     87        }
     88      }
     89    }
     90
    7891    #endregion
    7992    [StorableConstructor]
     
    8598      manipulatorMu = original.manipulatorMu;
    8699      manipulatorSigma = original.manipulatorSigma;
     100      multiplicativeManipulatorSigma = original.multiplicativeManipulatorSigma;
    87101    }
    88102    public Constant()
     
    90104      manipulatorMu = 0.0;
    91105      manipulatorSigma = 1.0;
     106      multiplicativeManipulatorSigma = 0.03;
    92107      minValue = -20.0;
    93108      maxValue = 20.0;
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs

    r4989 r5326  
    6363    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    6464      base.ShakeLocalParameters(random, shakingFactor);
    65       double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorMu, Symbol.ManipulatorSigma);
    66       Value = Value + x * shakingFactor;
     65      // 50% additive & 50% multiplicative
     66      if (random.NextDouble() < 0.5) {
     67        double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorMu, Symbol.ManipulatorSigma);
     68        Value = Value + x * shakingFactor;
     69      } else {
     70        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeManipulatorSigma);
     71        Value = Value * x;
     72      }
    6773    }
    6874
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs

    r4989 r5326  
    7878      }
    7979    }
     80    [Storable(DefaultValue = 0.0)]
     81    private double multiplicativeWeightManipulatorSigma;
     82    public double MultiplicativeWeightManipulatorSigma {
     83      get { return multiplicativeWeightManipulatorSigma; }
     84      set {
     85        if (multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
     86        if (value != multiplicativeWeightManipulatorSigma) {
     87          multiplicativeWeightManipulatorSigma = value;
     88          OnChanged(EventArgs.Empty);
     89        }
     90      }
     91    }
    8092    private List<string> variableNames;
    8193    [Storable]
     
    91103    #endregion
    92104    [StorableConstructor]
    93     protected Variable(bool deserializing) : base(deserializing) {
     105    protected Variable(bool deserializing)
     106      : base(deserializing) {
    94107      variableNames = new List<string>();
    95108    }
     
    101114      weightManipulatorMu = original.weightManipulatorMu;
    102115      weightManipulatorSigma = original.weightManipulatorSigma;
     116      multiplicativeWeightManipulatorSigma = original.multiplicativeWeightManipulatorSigma;
    103117    }
    104118    public Variable() : this("Variable", "Represents a variable value.") { }
     
    109123      weightManipulatorMu = 0.0;
    110124      weightManipulatorSigma = 1.0;
     125      multiplicativeWeightManipulatorSigma = 0.03;
    111126      variableNames = new List<string>();
    112127    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs

    r4989 r5326  
    6868    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    6969      base.ShakeLocalParameters(random, shakingFactor);
    70       double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
    71       weight = weight + x * shakingFactor;
     70      // 50% additive & 50% multiplicative
     71      if (random.NextDouble() < 0) {
     72        double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
     73        weight = weight + x * shakingFactor;
     74      } else {       
     75        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
     76        weight = weight * x;
     77      }
    7278      variableName = Symbol.VariableNames.SelectRandom(random);
    7379    }
Note: See TracChangeset for help on using the changeset viewer.