- Timestamp:
- 03/15/11 15:51:55 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis (added) merged: 5690
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModel.cs
r5445 r5692 37 37 [Item("SupportVectorMachineModel", "Represents a support vector machine model.")] 38 38 public sealed class SupportVectorMachineModel : NamedItem, IDataAnalysisModel { 39 [StorableConstructor]40 private SupportVectorMachineModel(bool deserializing) : base(deserializing) { }41 private SupportVectorMachineModel(SupportVectorMachineModel original, Cloner cloner)42 : base(original, cloner) {43 // only using a shallow copy here! (gkronber)44 this.model = original.model;45 this.rangeTransform = original.rangeTransform;46 }47 public SupportVectorMachineModel() : base() { }48 49 39 private SVM.Model model; 50 40 /// <summary> … … 77 67 } 78 68 69 public IEnumerable<double[]> SupportVectors { 70 get { 71 return from sv in Model.SupportVectors 72 select (from svx in sv 73 select svx.Value).ToArray(); 74 } 75 } 76 77 [StorableConstructor] 78 private SupportVectorMachineModel(bool deserializing) : base(deserializing) { } 79 private SupportVectorMachineModel(SupportVectorMachineModel original, Cloner cloner) 80 : base(original, cloner) { 81 // only using a shallow copy here! (gkronber) 82 this.model = original.model; 83 this.rangeTransform = original.rangeTransform; 84 } 85 public SupportVectorMachineModel() : base() { } 86 79 87 public IEnumerable<double> GetEstimatedValues(DataAnalysisProblemData problemData, int start, int end) { 80 88 SVM.Problem problem = SupportVectorMachineUtil.CreateSvmProblem(problemData, Enumerable.Range(start, end - start)); … … 96 104 97 105 #region persistence 98 [Storable]99 private int[] SupportVectorIndizes {100 get { return this.Model.SupportVectorIndizes; }101 set { this.Model.SupportVectorIndizes = value; }102 }103 104 106 [Storable] 105 107 private string ModelAsString {
Note: See TracChangeset
for help on using the changeset viewer.