Changeset 5690 for branches/DataAnalysis Refactoring/HeuristicLab.ExtLibs
- Timestamp:
- 03/15/11 15:35:32 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Model.cs
r4545 r5690 31 31 private int _numberOfClasses; 32 32 private int _supportVectorCount; 33 private int[] _supportVectorIndizes;34 33 private Node[][] _supportVectors; 35 34 private double[][] _supportVectorCoefficients; … … 77 76 set { 78 77 _supportVectorCount = value; 79 }80 }81 82 /// <summary>83 /// Indizes of support vectors identified in the training.84 /// </summary>85 public int[] SupportVectorIndizes {86 get {87 return _supportVectorIndizes;88 }89 set {90 _supportVectorIndizes = value;91 78 } 92 79 } … … 215 202 model.ClassLabels = null; 216 203 model.NumberOfSVPerClass = null; 217 model.SupportVectorIndizes = new int[0];218 204 219 205 bool headerFinished = false; … … 416 402 output.Write("nr_sv"); 417 403 for (int i = 0; i < nr_class; i++) 418 output.Write(" " + model.NumberOfSVPerClass[i] .ToString("r"));404 output.Write(" " + model.NumberOfSVPerClass[i]); 419 405 output.Write(Environment.NewLine); 420 406 } -
branches/DataAnalysis Refactoring/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Solver.cs
r4068 r5690 1460 1460 if (Math.Abs(f.alpha[i]) > 0) ++nSV; 1461 1461 model.SupportVectorCount = nSV; 1462 model.SupportVectorIndizes = new int[nSV];1463 1462 model.SupportVectors = new Node[nSV][]; 1464 1463 model.SupportVectorCoefficients[0] = new double[nSV]; … … 1468 1467 if (Math.Abs(f.alpha[i]) > 0) { 1469 1468 model.SupportVectors[j] = prob.X[i]; 1470 model.SupportVectorIndizes[j] = i;1471 1469 model.SupportVectorCoefficients[0][j] = f.alpha[i]; 1472 1470 … … 1596 1594 model.SupportVectorCount = nnz; 1597 1595 model.SupportVectors = new Node[nnz][]; 1598 model.SupportVectorIndizes = new int[nnz];1599 1596 p = 0; 1600 1597 for (i = 0; i < l; i++) { 1601 1598 if (nonzero[i]) { 1602 1599 model.SupportVectors[p] = x[i]; 1603 model.SupportVectorIndizes[p] = i;1604 1600 p++; 1605 1601 }
Note: See TracChangeset
for help on using the changeset viewer.