Changeset 2411 for trunk/sources/HeuristicLab.SupportVectorMachines
- Timestamp:
- 10/06/09 09:40:25 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.SupportVectorMachines/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/PredictorView.Designer.cs
r2373 r2411 54 54 this.minTimeOffsetLabel = new System.Windows.Forms.Label(); 55 55 this.SuspendLayout(); 56 // 57 // textBox 58 // 59 this.textBox.Location = new System.Drawing.Point(0, 238); 60 this.textBox.Size = new System.Drawing.Size(324, 130); 56 61 // 57 62 // lowerPredictionLimit … … 136 141 this.Controls.Add(this.lowerPredictionLimit); 137 142 this.Name = "PredictorView"; 138 this.Size = new System.Drawing.Size(252, 240); 143 this.Size = new System.Drawing.Size(324, 371); 144 this.Controls.SetChildIndex(this.textBox, 0); 139 145 this.Controls.SetChildIndex(this.lowerPredictionLimit, 0); 140 146 this.Controls.SetChildIndex(this.lowerLimitTextbox, 0); -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModelView.Designer.cs
r2322 r2411 55 55 this.kernelType = new System.Windows.Forms.TextBox(); 56 56 this.gamma = new System.Windows.Forms.TextBox(); 57 this.textBox = new System.Windows.Forms.TextBox(); 57 58 this.SuspendLayout(); 58 59 // … … 142 143 this.gamma.TabIndex = 12; 143 144 // 145 // textBox 146 // 147 this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 148 | System.Windows.Forms.AnchorStyles.Left) 149 | System.Windows.Forms.AnchorStyles.Right))); 150 this.textBox.Location = new System.Drawing.Point(0, 134); 151 this.textBox.Multiline = true; 152 this.textBox.Name = "textBox"; 153 this.textBox.ReadOnly = true; 154 this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; 155 this.textBox.Size = new System.Drawing.Size(283, 171); 156 this.textBox.TabIndex = 13; 157 this.textBox.WordWrap = false; 158 // 144 159 // SVMModelView 145 160 // 146 161 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 147 162 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 163 this.Controls.Add(this.textBox); 148 164 this.Controls.Add(this.gamma); 149 165 this.Controls.Add(this.kernelType); … … 157 173 this.Controls.Add(this.numberSupportVectorsLabel); 158 174 this.Name = "SVMModelView"; 159 this.Size = new System.Drawing.Size(2 53, 135);175 this.Size = new System.Drawing.Size(283, 308); 160 176 this.ResumeLayout(false); 161 177 this.PerformLayout(); … … 175 191 private System.Windows.Forms.TextBox kernelType; 176 192 private System.Windows.Forms.TextBox gamma; 193 protected System.Windows.Forms.TextBox textBox; 177 194 } 178 195 } -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModelView.cs
r2328 r2411 29 29 using System.Windows.Forms; 30 30 using HeuristicLab.Core; 31 using System.IO; 31 32 32 33 namespace HeuristicLab.SupportVectorMachines { 33 34 public partial class SVMModelView : ViewBase { 34 35 private SVMModel model; 35 public SVMModelView() : base() { 36 public SVMModelView() 37 : base() { 36 38 InitializeComponent(); 37 } 38 public SVMModelView(SVMModel model) : base() { 39 } 40 public SVMModelView(SVMModel model) 41 : base() { 39 42 InitializeComponent(); 40 43 this.model = model; … … 46 49 kernelType.DataBindings.Add(new Binding("Text", model.Model.Parameter, "KernelType")); 47 50 gamma.DataBindings.Add(new Binding("Text", model.Model.Parameter, "Gamma")); 51 StringBuilder builder = new StringBuilder(); 52 builder.AppendLine("RangeTransform:"); 53 using (MemoryStream stream = new MemoryStream()) { 54 SVM.RangeTransform.Write(stream, model.RangeTransform); 55 stream.Seek(0, System.IO.SeekOrigin.Begin); 56 StreamReader reader = new StreamReader(stream); 57 builder.AppendLine(reader.ReadToEnd()); 58 } 59 builder.AppendLine("Model:"); 60 using (MemoryStream stream = new MemoryStream()) { 61 SVM.Model.Write(stream, model.Model); 62 stream.Seek(0, System.IO.SeekOrigin.Begin); 63 StreamReader reader = new StreamReader(stream); 64 builder.AppendLine(reader.ReadToEnd()); 65 } 66 67 textBox.Text = builder.ToString(); 48 68 } 49 69 }
Note: See TracChangeset
for help on using the changeset viewer.