Changeset 2413
- Timestamp:
- 10/06/09 10:49:30 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.SupportVectorMachines/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/Predictor.cs
r2412 r2413 24 24 using System.Text; 25 25 using System.Xml; 26 using System.Linq; 26 27 using HeuristicLab.Core; 27 28 using System.Globalization; … … 94 95 95 96 public override IEnumerable<string> GetInputVariables() { 96 return variableNames.Keys; 97 return from pair in variableNames 98 orderby pair.Value 99 select pair.Key; 97 100 } 98 101 -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/PredictorView.cs
r2373 r2413 41 41 public PredictorView(Predictor predictor) 42 42 : base(predictor.Model) { 43 this.predictor = predictor; 43 44 InitializeComponent(); 44 this.predictor = predictor;45 UpdateControls();46 45 lowerLimitTextbox.DataBindings.Add(new Binding("Text", predictor, "LowerPredictionLimit")); 47 46 upperLimitTextbox.DataBindings.Add(new Binding("Text", predictor, "UpperPredictionLimit")); 48 47 maxTimeOffsetTextBox.DataBindings.Add(new Binding("Text", predictor, "MaxTimeOffset")); 49 48 minTimeOffsetTextBox.DataBindings.Add(new Binding("Text", predictor, "MinTimeOffset")); 49 UpdateControls(); 50 } 51 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); 62 } 63 builder.AppendLine(); 64 builder.Append(base.GetModelString()); 65 return builder.ToString(); 50 66 } 51 67 } -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModelView.cs
r2411 r2413 49 49 kernelType.DataBindings.Add(new Binding("Text", model.Model.Parameter, "KernelType")); 50 50 gamma.DataBindings.Add(new Binding("Text", model.Model.Parameter, "Gamma")); 51 } 52 53 protected override void UpdateControls() { 54 base.UpdateControls(); 55 textBox.Text = GetModelString(); 56 } 57 58 protected virtual string GetModelString() { 51 59 StringBuilder builder = new StringBuilder(); 52 60 builder.AppendLine("RangeTransform:"); … … 64 72 builder.AppendLine(reader.ReadToEnd()); 65 73 } 66 67 textBox.Text = builder.ToString(); 74 return builder.ToString(); 68 75 } 69 76 }
Note: See TracChangeset
for help on using the changeset viewer.