- Timestamp:
- 10/07/09 11:58:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/PredictorView.cs
r2413 r2415 29 29 using System.Windows.Forms; 30 30 using HeuristicLab.Core; 31 using System.IO; 31 32 32 33 namespace HeuristicLab.SupportVectorMachines { … … 50 51 } 51 52 52 protected override string GetModelString() { 53 StringBuilder builder = new StringBuilder(); 54 builder.Append("LowerPredictionLimit: ").AppendLine(predictor.LowerPredictionLimit.ToString()); 55 builder.Append("UpperPredictionLimit: ").AppendLine(predictor.UpperPredictionLimit.ToString()); 56 builder.Append("MaxTimeOffset: ").AppendLine(predictor.MaxTimeOffset.ToString()); 57 builder.Append("MinTimeOffset: ").AppendLine(predictor.MinTimeOffset.ToString()); 58 builder.Append("InputVariables :"); 59 builder.Append(predictor.GetInputVariables().First()); 60 foreach (string variable in predictor.GetInputVariables().Skip(1)) { 61 builder.Append("; ").Append(variable); 53 protected override void UpdateControls() { 54 base.UpdateControls(); 55 textBox.Text = GetModelString(); 56 } 57 58 private string GetModelString() { 59 if (predictor == null) return ""; 60 using (MemoryStream s = new MemoryStream()) { 61 Predictor.Export(predictor, s); 62 s.Flush(); 63 s.Seek(0, System.IO.SeekOrigin.Begin); 64 StreamReader reader = new StreamReader(s); 65 return reader.ReadToEnd(); 62 66 } 63 builder.AppendLine();64 builder.Append(base.GetModelString());65 return builder.ToString();66 67 } 67 68 }
Note: See TracChangeset
for help on using the changeset viewer.