Changeset 3858 for trunk/sources/HeuristicLab.ExtLibs
- Timestamp:
- 05/20/10 16:47:12 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Model.cs
r2645 r3858 33 33 private int _numberOfClasses; 34 34 private int _supportVectorCount; 35 private int[] _supportVectorIndizes; 35 36 private Node[][] _supportVectors; 36 37 private double[][] _supportVectorCoefficients; … … 78 79 set { 79 80 _supportVectorCount = value; 81 } 82 } 83 84 /// <summary> 85 /// Indizes of support vectors identified in the training. 86 /// </summary> 87 public int[] SupportVectorIndizes { 88 get { 89 return _supportVectorIndizes; 90 } 91 set { 92 _supportVectorIndizes = value; 80 93 } 81 94 } -
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Solver.cs
r2645 r3858 1673 1673 if (Math.Abs(f.alpha[i]) > 0) ++nSV; 1674 1674 model.SupportVectorCount = nSV; 1675 model.SupportVectorIndizes = new int[nSV]; 1675 1676 model.SupportVectors = new Node[nSV][]; 1676 1677 model.SupportVectorCoefficients[0] = new double[nSV]; 1678 1677 1679 int j = 0; 1678 1680 for (i = 0; i < prob.Count; i++) … … 1680 1682 { 1681 1683 model.SupportVectors[j] = prob.X[i]; 1684 model.SupportVectorIndizes[j] = i; 1682 1685 model.SupportVectorCoefficients[0][j] = f.alpha[i]; 1686 1683 1687 ++j; 1684 1688 } … … 1820 1824 model.SupportVectorCount = nnz; 1821 1825 model.SupportVectors = new Node[nnz][]; 1826 model.SupportVectorIndizes = new int[nnz]; 1822 1827 p = 0; 1823 for (i = 0; i < l; i++) 1824 if (nonzero[i]) model.SupportVectors[p++] = x[i]; 1828 for (i = 0; i < l; i++) { 1829 if (nonzero[i]) { 1830 model.SupportVectors[p] = x[i]; 1831 model.SupportVectorIndizes[p] = i; 1832 p++; 1833 } 1834 } 1825 1835 1826 1836 int[] nz_start = new int[nr_class];
Note: See TracChangeset
for help on using the changeset viewer.