Changeset 5326
- Timestamp:
- 01/18/11 16:09:35 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolView.Designer.cs
r3824 r5326 66 66 // 67 67 this.initialFrequencyLabel.AutoSize = true; 68 this.initialFrequencyLabel.Location = new System.Drawing.Point( 6, 56);68 this.initialFrequencyLabel.Location = new System.Drawing.Point(3, 56); 69 69 this.initialFrequencyLabel.Name = "initialFrequencyLabel"; 70 70 this.initialFrequencyLabel.Size = new System.Drawing.Size(84, 13); … … 88 88 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 89 89 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 90 this.Controls.Add(this.initialFrequencyTextBox); 90 91 this.Controls.Add(this.initialFrequencyLabel); 91 this.Controls.Add(this.initialFrequencyTextBox);92 92 this.Name = "SymbolView"; 93 93 this.Size = new System.Drawing.Size(320, 79); 94 this.Controls.SetChildIndex(this.initialFrequencyLabel, 0); 94 95 this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0); 95 this.Controls.SetChildIndex(this.initialFrequencyLabel, 0);96 96 this.Controls.SetChildIndex(this.nameLabel, 0); 97 97 this.Controls.SetChildIndex(this.descriptionLabel, 0); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.Designer.cs
r4990 r5326 51 51 this.maxValueTextBox = new System.Windows.Forms.TextBox(); 52 52 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(); 57 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 58 58 this.initializationGroupBox.SuspendLayout(); … … 67 67 // 68 68 this.errorProvider.SetIconAlignment(this.initialFrequencyTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 69 this.initialFrequencyTextBox.Size = new System.Drawing.Size(2 03, 20);69 this.initialFrequencyTextBox.Size = new System.Drawing.Size(275, 20); 70 70 // 71 71 // nameTextBox … … 73 73 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 74 74 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 75 this.nameTextBox.Size = new System.Drawing.Size(2 03, 20);75 this.nameTextBox.Size = new System.Drawing.Size(275, 20); 76 76 // 77 77 // descriptionTextBox 78 78 // 79 79 this.errorProvider.SetIconAlignment(this.descriptionTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 80 this.descriptionTextBox.Size = new System.Drawing.Size(2 03, 20);80 this.descriptionTextBox.Size = new System.Drawing.Size(275, 20); 81 81 // 82 82 // weightNuLabel … … 97 97 this.minValueTextBox.Location = new System.Drawing.Point(92, 19); 98 98 this.minValueTextBox.Name = "minValueTextBox"; 99 this.minValueTextBox.Size = new System.Drawing.Size(2 22, 20);99 this.minValueTextBox.Size = new System.Drawing.Size(291, 20); 100 100 this.minValueTextBox.TabIndex = 7; 101 101 this.toolTip.SetToolTip(this.minValueTextBox, "The minimal value to use for random initialization of constants."); … … 112 112 this.initializationGroupBox.Location = new System.Drawing.Point(3, 79); 113 113 this.initializationGroupBox.Name = "initializationGroupBox"; 114 this.initializationGroupBox.Size = new System.Drawing.Size(3 20, 73);114 this.initializationGroupBox.Size = new System.Drawing.Size(389, 73); 115 115 this.initializationGroupBox.TabIndex = 8; 116 116 this.initializationGroupBox.TabStop = false; … … 134 134 this.maxValueTextBox.Location = new System.Drawing.Point(92, 45); 135 135 this.maxValueTextBox.Name = "maxValueTextBox"; 136 this.maxValueTextBox.Size = new System.Drawing.Size(2 22, 20);136 this.maxValueTextBox.Size = new System.Drawing.Size(291, 20); 137 137 this.maxValueTextBox.TabIndex = 9; 138 138 this.toolTip.SetToolTip(this.maxValueTextBox, "The maximal value to use for random initialization of constants."); … … 143 143 this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 144 144 | 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); 149 149 this.mutationGroupBox.Location = new System.Drawing.Point(3, 158); 150 150 this.mutationGroupBox.Name = "mutationGroupBox"; 151 this.mutationGroupBox.Size = new System.Drawing.Size(3 20, 73);151 this.mutationGroupBox.Size = new System.Drawing.Size(389, 73); 152 152 this.mutationGroupBox.TabIndex = 9; 153 153 this.mutationGroupBox.TabStop = false; 154 154 this.mutationGroupBox.Text = "Mutation"; 155 155 // 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); 201 203 // 202 204 // ConstantView … … 207 209 this.Controls.Add(this.initializationGroupBox); 208 210 this.Name = "ConstantView"; 209 this.Size = new System.Drawing.Size(3 26, 235);211 this.Size = new System.Drawing.Size(398, 237); 210 212 this.Controls.SetChildIndex(this.initializationGroupBox, 0); 211 213 this.Controls.SetChildIndex(this.initialFrequencyTextBox, 0); … … 234 236 private System.Windows.Forms.TextBox maxValueTextBox; 235 237 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; 240 242 241 243 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs
r4990 r5326 61 61 maxValueTextBox.Enabled = Content != null; 62 62 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; 67 67 } 68 68 … … 93 93 } 94 94 95 private void valueChangeMuTextBox_TextChanged(object sender, EventArgs e) {96 double nu;97 if (double.TryParse( valueChangeMuTextBox.Text, out nu)) {98 Content.Manipulator Mu = 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); 100 100 } else { 101 errorProvider.SetError( valueChangeMuTextBox, "Invalid value");101 errorProvider.SetError(additiveChangeSigmaTextBox, "Invalid value"); 102 102 } 103 103 } 104 104 105 private void valueChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {105 private void multiplicativeChangeSigmaTextBox_TextChanged(object sender, EventArgs e) { 106 106 double sigma; 107 if (double.TryParse( valueChangeSigmaTextBox.Text, out sigma) && sigma >= 0.0) {108 Content.M anipulatorSigma = 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); 110 110 } else { 111 errorProvider.SetError( valueChangeSigmaTextBox, "Invalid value");111 errorProvider.SetError(multiplicativeChangeSigmaTextBox, "Invalid value"); 112 112 } 113 113 } … … 120 120 maxValueTextBox.Text = string.Empty; 121 121 minValueTextBox.Text = string.Empty; 122 valueChangeSigmaTextBox.Text = string.Empty; 122 multiplicativeChangeSigmaTextBox.Text = string.Empty; 123 additiveChangeSigmaTextBox.Text = string.Empty; 123 124 } else { 124 125 minValueTextBox.Text = Content.MinValue.ToString(); 125 126 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(); 128 129 } 129 130 SetEnabledStateOfControls(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.Designer.cs
r4990 r5326 46 46 private void InitializeComponent() { 47 47 this.weightMuLabel = new System.Windows.Forms.Label(); 48 this.weight MuTextBox = new System.Windows.Forms.TextBox();48 this.weightInitializationMuTextBox = new System.Windows.Forms.TextBox(); 49 49 this.initializationGroupBox = new System.Windows.Forms.GroupBox(); 50 50 this.weightSigmaLabel = new System.Windows.Forms.Label(); 51 this.weight SigmaTextBox = new System.Windows.Forms.TextBox();51 this.weightInitializationSigmaTextBox = new System.Windows.Forms.TextBox(); 52 52 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(); 57 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 58 58 this.initializationGroupBox.SuspendLayout(); … … 90 90 this.toolTip.SetToolTip(this.weightMuLabel, "The mu (mean) parameter of the normal distribution to use for initial weights."); 91 91 // 92 // weight MuTextBox93 // 94 this.weight MuTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)95 | System.Windows.Forms.AnchorStyles.Right))); 96 this.weight MuTextBox.Location = new System.Drawing.Point(92, 19);97 this.weight MuTextBox.Name = "weightMuTextBox";98 this.weight MuTextBox.Size = new System.Drawing.Size(201, 20);99 this.weight MuTextBox.TabIndex = 7;100 this.toolTip.SetToolTip(this.weight MuTextBox, "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" + 101 101 "al weights."); 102 this.weight MuTextBox.TextChanged += new System.EventHandler(this.weightMuTextBox_TextChanged);102 this.weightInitializationMuTextBox.TextChanged += new System.EventHandler(this.weightMuTextBox_TextChanged); 103 103 // 104 104 // initializationGroupBox … … 107 107 | System.Windows.Forms.AnchorStyles.Right))); 108 108 this.initializationGroupBox.Controls.Add(this.weightSigmaLabel); 109 this.initializationGroupBox.Controls.Add(this.weight SigmaTextBox);109 this.initializationGroupBox.Controls.Add(this.weightInitializationSigmaTextBox); 110 110 this.initializationGroupBox.Controls.Add(this.weightMuLabel); 111 this.initializationGroupBox.Controls.Add(this.weight MuTextBox);111 this.initializationGroupBox.Controls.Add(this.weightInitializationMuTextBox); 112 112 this.initializationGroupBox.Location = new System.Drawing.Point(3, 79); 113 113 this.initializationGroupBox.Name = "initializationGroupBox"; … … 127 127 this.toolTip.SetToolTip(this.weightSigmaLabel, "The sigma parameter for the normal distribution to use for the initial weights."); 128 128 // 129 // weight SigmaTextBox130 // 131 this.weight SigmaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)132 | System.Windows.Forms.AnchorStyles.Right))); 133 this.weight SigmaTextBox.Location = new System.Drawing.Point(92, 45);134 this.weight SigmaTextBox.Name = "weightSigmaTextBox";135 this.weight SigmaTextBox.Size = new System.Drawing.Size(201, 20);136 this.weight SigmaTextBox.TabIndex = 9;137 this.toolTip.SetToolTip(this.weight SigmaTextBox, "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 " + 138 138 "weights."); 139 this.weight SigmaTextBox.TextChanged += new System.EventHandler(this.weightSigmaTextBox_TextChanged);139 this.weightInitializationSigmaTextBox.TextChanged += new System.EventHandler(this.weightSigmaTextBox_TextChanged); 140 140 // 141 141 // mutationGroupBox … … 143 143 this.mutationGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 144 144 | 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); 149 149 this.mutationGroupBox.Location = new System.Drawing.Point(3, 158); 150 150 this.mutationGroupBox.Name = "mutationGroupBox"; … … 154 154 this.mutationGroupBox.Text = "Mutation"; 155 155 // 156 // stdDevWeightChangeLabel157 // 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 // weightChangeSigmaTextBox168 // 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 // meanWeightChangeLabel180 // 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 // weightChangeMuTextBox191 // 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); 201 201 // 202 202 // VariableView … … 229 229 230 230 private System.Windows.Forms.Label weightMuLabel; 231 private System.Windows.Forms.TextBox weight MuTextBox;231 private System.Windows.Forms.TextBox weightInitializationMuTextBox; 232 232 protected System.Windows.Forms.GroupBox initializationGroupBox; 233 233 private System.Windows.Forms.Label weightSigmaLabel; 234 private System.Windows.Forms.TextBox weight SigmaTextBox;234 private System.Windows.Forms.TextBox weightInitializationSigmaTextBox; 235 235 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; 240 240 241 241 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs
r4990 r5326 57 57 protected override void SetEnabledStateOfControls() { 58 58 base.SetEnabledStateOfControls(); 59 weight MuTextBox.Enabled = Content != null;60 weight MuTextBox.ReadOnly = ReadOnly;61 weight SigmaTextBox.Enabled = Content != null;62 weight SigmaTextBox.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; 67 67 } 68 68 … … 76 76 private void weightMuTextBox_TextChanged(object sender, EventArgs e) { 77 77 double nu; 78 if (double.TryParse(weight MuTextBox.Text, out nu)) {78 if (double.TryParse(weightInitializationMuTextBox.Text, out nu)) { 79 79 Content.WeightMu = nu; 80 errorProvider.SetError(weight MuTextBox, string.Empty);80 errorProvider.SetError(weightInitializationMuTextBox, string.Empty); 81 81 } else { 82 errorProvider.SetError(weight MuTextBox, "Invalid value");82 errorProvider.SetError(weightInitializationMuTextBox, "Invalid value"); 83 83 } 84 84 } 85 85 private void weightSigmaTextBox_TextChanged(object sender, EventArgs e) { 86 86 double sigma; 87 if (double.TryParse(weight SigmaTextBox.Text, out sigma) && sigma >= 0.0) {87 if (double.TryParse(weightInitializationSigmaTextBox.Text, out sigma) && sigma >= 0.0) { 88 88 Content.WeightSigma = sigma; 89 errorProvider.SetError(weight SigmaTextBox, string.Empty);89 errorProvider.SetError(weightInitializationSigmaTextBox, string.Empty); 90 90 } else { 91 errorProvider.SetError(weight SigmaTextBox, "Invalid value");91 errorProvider.SetError(weightInitializationSigmaTextBox, "Invalid value"); 92 92 } 93 93 } 94 94 95 private void weightChangeMuTextBox_TextChanged(object sender, EventArgs e) {96 double nu;97 if (double.TryParse( weightChangeMuTextBox.Text, out nu)) {98 Content.WeightManipulator Mu = 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); 100 100 } else { 101 errorProvider.SetError( weightChangeMuTextBox, "Invalid value");101 errorProvider.SetError(additiveWeightChangeSigmaTextBox, "Invalid value"); 102 102 } 103 103 } 104 104 105 private void weightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) {105 private void multiplicativeWeightChangeSigmaTextBox_TextChanged(object sender, EventArgs e) { 106 106 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); 110 110 } else { 111 errorProvider.SetError( weightChangeSigmaTextBox, "Invalid value");111 errorProvider.SetError(multiplicativeWeightChangeSigmaTextBox, "Invalid value"); 112 112 } 113 113 } … … 117 117 private void UpdateControl() { 118 118 if (Content == null) { 119 weight MuTextBox.Text = string.Empty;120 weight SigmaTextBox.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; 123 123 } else { 124 weight MuTextBox.Text = Content.WeightMu.ToString();125 weight SigmaTextBox.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(); 128 128 } 129 129 SetEnabledStateOfControls(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs
r4989 r5326 30 30 [Item("Constant", "Represents a constant value.")] 31 31 public sealed class Constant : Symbol { 32 #region Prope ties32 #region Properties 33 33 [Storable] 34 34 private double minValue; … … 76 76 } 77 77 } 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 78 91 #endregion 79 92 [StorableConstructor] … … 85 98 manipulatorMu = original.manipulatorMu; 86 99 manipulatorSigma = original.manipulatorSigma; 100 multiplicativeManipulatorSigma = original.multiplicativeManipulatorSigma; 87 101 } 88 102 public Constant() … … 90 104 manipulatorMu = 0.0; 91 105 manipulatorSigma = 1.0; 106 multiplicativeManipulatorSigma = 0.03; 92 107 minValue = -20.0; 93 108 maxValue = 20.0; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs
r4989 r5326 63 63 public override void ShakeLocalParameters(IRandom random, double shakingFactor) { 64 64 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 } 67 73 } 68 74 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs
r4989 r5326 78 78 } 79 79 } 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 } 80 92 private List<string> variableNames; 81 93 [Storable] … … 91 103 #endregion 92 104 [StorableConstructor] 93 protected Variable(bool deserializing) : base(deserializing) { 105 protected Variable(bool deserializing) 106 : base(deserializing) { 94 107 variableNames = new List<string>(); 95 108 } … … 101 114 weightManipulatorMu = original.weightManipulatorMu; 102 115 weightManipulatorSigma = original.weightManipulatorSigma; 116 multiplicativeWeightManipulatorSigma = original.multiplicativeWeightManipulatorSigma; 103 117 } 104 118 public Variable() : this("Variable", "Represents a variable value.") { } … … 109 123 weightManipulatorMu = 0.0; 110 124 weightManipulatorSigma = 1.0; 125 multiplicativeWeightManipulatorSigma = 0.03; 111 126 variableNames = new List<string>(); 112 127 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
r4989 r5326 68 68 public override void ShakeLocalParameters(IRandom random, double shakingFactor) { 69 69 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 } 72 78 variableName = Symbol.VariableNames.SelectRandom(random); 73 79 }
Note: See TracChangeset
for help on using the changeset viewer.