[Scipy-tickets] [SciPy] #558: svm weight storage

SciPy scipy-tickets@scipy....
Tue Dec 11 17:21:22 CST 2007


#558: svm weight storage
---------------------------+------------------------------------------------
 Reporter:  david.doukhan  |       Owner:  cdavid     
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  0.7        
Component:  svm            |     Version:             
 Severity:  normal         |    Keywords:  svm weights
---------------------------+------------------------------------------------
 Hi, I'm using the scipy wrapping of libSVM on a 64 bits architecture, at
 it seems that the way the weights are stored before being passed to libSVM
 is innacurate.

 I managed to fix that problem on my architecture, by patching the
 {{{__init__}}} method of the class {{{LibSvmClassificationModel}}}, and
 replacing the type of the items stored in the weight_labels array.

 In other words, I had to replace the following line:
 {{{self.weight_labels = N.empty((len(weights),), dtype=N.intp)}}}

 by this one:
 {{{self.weight_labels = N.empty((len(weights),), dtype=N.int32)}}}

 I didn't checked if that patch leads to good results on other
 architectures, and if the bugg I'm talking about occured only on my
 architecture, or on all architecture.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/558>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list