- Timestamp:
- 05/20/10 16:47:12 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/SupportVectorRegressionSolution.cs
r3842 r3858 49 49 } 50 50 51 [Storable] 52 private List<string> inputVariables; 51 public Dataset SupportVectors { 52 get { return CalculateSupportVectors(); } 53 } 53 54 54 55 public SupportVectorRegressionSolution() : base() { } … … 56 57 : base(problemData, lowerEstimationLimit, upperEstimationLimit) { 57 58 this.model = model; 58 this.inputVariables = new List<string>(inputVariables);59 59 } 60 60 61 61 protected override void OnProblemDataChanged(EventArgs e) { 62 62 RecalculateEstimatedValues(); 63 model.Model.SupportVectorIndizes = new int[0]; 64 } 65 66 private Dataset CalculateSupportVectors() { 67 if (model.Model.SupportVectorIndizes.Length == 0) 68 return new Dataset(); 69 70 Dataset dataset = new Dataset(ProblemData.Dataset.VariableNames, new double[model.Model.SupportVectorCount, ProblemData.Dataset.Columns]); 71 for (int i = 0; i < model.Model.SupportVectorIndizes.Length; i++) { 72 for (int column = 0; column < ProblemData.Dataset.Columns; column++) 73 dataset[i, column] = ProblemData.Dataset[model.Model.SupportVectorIndizes[i], column]; 74 } 75 return dataset; 63 76 } 64 77
Note: See TracChangeset
for help on using the changeset viewer.