Beispiel #1
0
 def get_n_sv(self):
     """Returns a list with the number of support vectors per class.
     """
     return [
         svmc.int_getitem(svmc.svm_model_nSV_get(self.model), i)
         for i in range(self.nr_class)
     ]
Beispiel #2
0
def int_array_to_list(x, n):
    return [svmc.int_getitem(x, i) for i in xrange(n)]
Beispiel #3
0
 def get_n_sv(self):
     """Returns a list with the number of support vectors per class.
     """
     return [ svmc.int_getitem(svmc.svm_model_nSV_get( self.model ), i) 
                 for i in range( self.nr_class ) ]
Beispiel #4
0
def int_array_to_list(x, n):
    return [svmc.int_getitem(x, i) for i in xrange(n)]