Package mvpa :: Package clfs :: Package libsvmc :: Module svmc
[hide private]
[frames] | no frames]

Source Code for Module mvpa.clfs.libsvmc.svmc

  1  # This file was automatically generated by SWIG (http://www.swig.org). 
  2  # Version 2.0.4 
  3  # 
  4  # Do not make changes to this file unless you know what you are doing--modify 
  5  # the SWIG interface file instead. 
  6   
  7   
  8   
  9  from sys import version_info 
 10  if version_info >= (2,6,0): 
11 - def swig_import_helper():
12 from os.path import dirname 13 import imp 14 fp = None 15 try: 16 fp, pathname, description = imp.find_module('_svmc', [dirname(__file__)]) 17 except ImportError: 18 import _svmc 19 return _svmc 20 if fp is not None: 21 try: 22 _mod = imp.load_module('_svmc', fp, pathname, description) 23 finally: 24 fp.close() 25 return _mod
26 _svmc = swig_import_helper() 27 del swig_import_helper 28 else: 29 import _svmc 30 del version_info 31 try: 32 _swig_property = property 33 except NameError: 34 pass # Python < 2.2 doesn't have 'property'.
35 -def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
36 if (name == "thisown"): return self.this.own(value) 37 if (name == "this"): 38 if type(value).__name__ == 'SwigPyObject': 39 self.__dict__[name] = value 40 return 41 method = class_type.__swig_setmethods__.get(name,None) 42 if method: return method(self,value) 43 if (not static): 44 self.__dict__[name] = value 45 else: 46 raise AttributeError("You cannot add attributes to %s" % self)
47
48 -def _swig_setattr(self,class_type,name,value):
49 return _swig_setattr_nondynamic(self,class_type,name,value,0)
50
51 -def _swig_getattr(self,class_type,name):
52 if (name == "thisown"): return self.this.own() 53 method = class_type.__swig_getmethods__.get(name,None) 54 if method: return method(self) 55 raise AttributeError(name)
56
57 -def _swig_repr(self):
58 try: strthis = "proxy of " + self.this.__repr__() 59 except: strthis = "" 60 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
61 62 try: 63 _object = object 64 _newclass = 1 65 except AttributeError:
66 - class _object : pass
67 _newclass = 0 68 69 70 __version__ = _svmc.__version__ 71 C_SVC = _svmc.C_SVC 72 NU_SVC = _svmc.NU_SVC 73 ONE_CLASS = _svmc.ONE_CLASS 74 EPSILON_SVR = _svmc.EPSILON_SVR 75 NU_SVR = _svmc.NU_SVR 76 LINEAR = _svmc.LINEAR 77 POLY = _svmc.POLY 78 RBF = _svmc.RBF 79 SIGMOID = _svmc.SIGMOID 80 PRECOMPUTED = _svmc.PRECOMPUTED
81 -class svm_parameter(_object):
82 __swig_setmethods__ = {} 83 __setattr__ = lambda self, name, value: _swig_setattr(self, svm_parameter, name, value) 84 __swig_getmethods__ = {} 85 __getattr__ = lambda self, name: _swig_getattr(self, svm_parameter, name) 86 __repr__ = _swig_repr 87 __swig_setmethods__["svm_type"] = _svmc.svm_parameter_svm_type_set 88 __swig_getmethods__["svm_type"] = _svmc.svm_parameter_svm_type_get 89 if _newclass:svm_type = _swig_property(_svmc.svm_parameter_svm_type_get, _svmc.svm_parameter_svm_type_set) 90 __swig_setmethods__["kernel_type"] = _svmc.svm_parameter_kernel_type_set 91 __swig_getmethods__["kernel_type"] = _svmc.svm_parameter_kernel_type_get 92 if _newclass:kernel_type = _swig_property(_svmc.svm_parameter_kernel_type_get, _svmc.svm_parameter_kernel_type_set) 93 __swig_setmethods__["degree"] = _svmc.svm_parameter_degree_set 94 __swig_getmethods__["degree"] = _svmc.svm_parameter_degree_get 95 if _newclass:degree = _swig_property(_svmc.svm_parameter_degree_get, _svmc.svm_parameter_degree_set) 96 __swig_setmethods__["gamma"] = _svmc.svm_parameter_gamma_set 97 __swig_getmethods__["gamma"] = _svmc.svm_parameter_gamma_get 98 if _newclass:gamma = _swig_property(_svmc.svm_parameter_gamma_get, _svmc.svm_parameter_gamma_set) 99 __swig_setmethods__["coef0"] = _svmc.svm_parameter_coef0_set 100 __swig_getmethods__["coef0"] = _svmc.svm_parameter_coef0_get 101 if _newclass:coef0 = _swig_property(_svmc.svm_parameter_coef0_get, _svmc.svm_parameter_coef0_set) 102 __swig_setmethods__["cache_size"] = _svmc.svm_parameter_cache_size_set 103 __swig_getmethods__["cache_size"] = _svmc.svm_parameter_cache_size_get 104 if _newclass:cache_size = _swig_property(_svmc.svm_parameter_cache_size_get, _svmc.svm_parameter_cache_size_set) 105 __swig_setmethods__["eps"] = _svmc.svm_parameter_eps_set 106 __swig_getmethods__["eps"] = _svmc.svm_parameter_eps_get 107 if _newclass:eps = _swig_property(_svmc.svm_parameter_eps_get, _svmc.svm_parameter_eps_set) 108 __swig_setmethods__["C"] = _svmc.svm_parameter_C_set 109 __swig_getmethods__["C"] = _svmc.svm_parameter_C_get 110 if _newclass:C = _swig_property(_svmc.svm_parameter_C_get, _svmc.svm_parameter_C_set) 111 __swig_setmethods__["nr_weight"] = _svmc.svm_parameter_nr_weight_set 112 __swig_getmethods__["nr_weight"] = _svmc.svm_parameter_nr_weight_get 113 if _newclass:nr_weight = _swig_property(_svmc.svm_parameter_nr_weight_get, _svmc.svm_parameter_nr_weight_set) 114 __swig_setmethods__["weight_label"] = _svmc.svm_parameter_weight_label_set 115 __swig_getmethods__["weight_label"] = _svmc.svm_parameter_weight_label_get 116 if _newclass:weight_label = _swig_property(_svmc.svm_parameter_weight_label_get, _svmc.svm_parameter_weight_label_set) 117 __swig_setmethods__["weight"] = _svmc.svm_parameter_weight_set 118 __swig_getmethods__["weight"] = _svmc.svm_parameter_weight_get 119 if _newclass:weight = _swig_property(_svmc.svm_parameter_weight_get, _svmc.svm_parameter_weight_set) 120 __swig_setmethods__["nu"] = _svmc.svm_parameter_nu_set 121 __swig_getmethods__["nu"] = _svmc.svm_parameter_nu_get 122 if _newclass:nu = _swig_property(_svmc.svm_parameter_nu_get, _svmc.svm_parameter_nu_set) 123 __swig_setmethods__["p"] = _svmc.svm_parameter_p_set 124 __swig_getmethods__["p"] = _svmc.svm_parameter_p_get 125 if _newclass:p = _swig_property(_svmc.svm_parameter_p_get, _svmc.svm_parameter_p_set) 126 __swig_setmethods__["shrinking"] = _svmc.svm_parameter_shrinking_set 127 __swig_getmethods__["shrinking"] = _svmc.svm_parameter_shrinking_get 128 if _newclass:shrinking = _swig_property(_svmc.svm_parameter_shrinking_get, _svmc.svm_parameter_shrinking_set) 129 __swig_setmethods__["probability"] = _svmc.svm_parameter_probability_set 130 __swig_getmethods__["probability"] = _svmc.svm_parameter_probability_get 131 if _newclass:probability = _swig_property(_svmc.svm_parameter_probability_get, _svmc.svm_parameter_probability_set)
132 - def __init__(self):
133 this = _svmc.new_svm_parameter() 134 try: self.this.append(this) 135 except: self.this = this
136 __swig_destroy__ = _svmc.delete_svm_parameter 137 __del__ = lambda self : None; 138 svm_parameter_swigregister = _svmc.svm_parameter_swigregister 139 svm_parameter_swigregister(svm_parameter) 140
141 -class svm_problem(_object):
142 __swig_setmethods__ = {} 143 __setattr__ = lambda self, name, value: _swig_setattr(self, svm_problem, name, value) 144 __swig_getmethods__ = {} 145 __getattr__ = lambda self, name: _swig_getattr(self, svm_problem, name) 146 __repr__ = _swig_repr 147 __swig_setmethods__["l"] = _svmc.svm_problem_l_set 148 __swig_getmethods__["l"] = _svmc.svm_problem_l_get 149 if _newclass:l = _swig_property(_svmc.svm_problem_l_get, _svmc.svm_problem_l_set) 150 __swig_setmethods__["y"] = _svmc.svm_problem_y_set 151 __swig_getmethods__["y"] = _svmc.svm_problem_y_get 152 if _newclass:y = _swig_property(_svmc.svm_problem_y_get, _svmc.svm_problem_y_set) 153 __swig_setmethods__["x"] = _svmc.svm_problem_x_set 154 __swig_getmethods__["x"] = _svmc.svm_problem_x_get 155 if _newclass:x = _swig_property(_svmc.svm_problem_x_get, _svmc.svm_problem_x_set)
156 - def __init__(self):
157 this = _svmc.new_svm_problem() 158 try: self.this.append(this) 159 except: self.this = this
160 __swig_destroy__ = _svmc.delete_svm_problem 161 __del__ = lambda self : None; 162 svm_problem_swigregister = _svmc.svm_problem_swigregister 163 svm_problem_swigregister(svm_problem) 164
165 -class svm_model(_object):
166 __swig_setmethods__ = {} 167 __setattr__ = lambda self, name, value: _swig_setattr(self, svm_model, name, value) 168 __swig_getmethods__ = {} 169 __getattr__ = lambda self, name: _swig_getattr(self, svm_model, name) 170 __repr__ = _swig_repr 171 __swig_setmethods__["param"] = _svmc.svm_model_param_set 172 __swig_getmethods__["param"] = _svmc.svm_model_param_get 173 if _newclass:param = _swig_property(_svmc.svm_model_param_get, _svmc.svm_model_param_set) 174 __swig_setmethods__["nr_class"] = _svmc.svm_model_nr_class_set 175 __swig_getmethods__["nr_class"] = _svmc.svm_model_nr_class_get 176 if _newclass:nr_class = _swig_property(_svmc.svm_model_nr_class_get, _svmc.svm_model_nr_class_set) 177 __swig_setmethods__["l"] = _svmc.svm_model_l_set 178 __swig_getmethods__["l"] = _svmc.svm_model_l_get 179 if _newclass:l = _swig_property(_svmc.svm_model_l_get, _svmc.svm_model_l_set) 180 __swig_setmethods__["SV"] = _svmc.svm_model_SV_set 181 __swig_getmethods__["SV"] = _svmc.svm_model_SV_get 182 if _newclass:SV = _swig_property(_svmc.svm_model_SV_get, _svmc.svm_model_SV_set) 183 __swig_setmethods__["sv_coef"] = _svmc.svm_model_sv_coef_set 184 __swig_getmethods__["sv_coef"] = _svmc.svm_model_sv_coef_get 185 if _newclass:sv_coef = _swig_property(_svmc.svm_model_sv_coef_get, _svmc.svm_model_sv_coef_set) 186 __swig_setmethods__["rho"] = _svmc.svm_model_rho_set 187 __swig_getmethods__["rho"] = _svmc.svm_model_rho_get 188 if _newclass:rho = _swig_property(_svmc.svm_model_rho_get, _svmc.svm_model_rho_set) 189 __swig_setmethods__["probA"] = _svmc.svm_model_probA_set 190 __swig_getmethods__["probA"] = _svmc.svm_model_probA_get 191 if _newclass:probA = _swig_property(_svmc.svm_model_probA_get, _svmc.svm_model_probA_set) 192 __swig_setmethods__["probB"] = _svmc.svm_model_probB_set 193 __swig_getmethods__["probB"] = _svmc.svm_model_probB_get 194 if _newclass:probB = _swig_property(_svmc.svm_model_probB_get, _svmc.svm_model_probB_set) 195 __swig_setmethods__["label"] = _svmc.svm_model_label_set 196 __swig_getmethods__["label"] = _svmc.svm_model_label_get 197 if _newclass:label = _swig_property(_svmc.svm_model_label_get, _svmc.svm_model_label_set) 198 __swig_setmethods__["nSV"] = _svmc.svm_model_nSV_set 199 __swig_getmethods__["nSV"] = _svmc.svm_model_nSV_get 200 if _newclass:nSV = _swig_property(_svmc.svm_model_nSV_get, _svmc.svm_model_nSV_set) 201 __swig_setmethods__["free_sv"] = _svmc.svm_model_free_sv_set 202 __swig_getmethods__["free_sv"] = _svmc.svm_model_free_sv_get 203 if _newclass:free_sv = _swig_property(_svmc.svm_model_free_sv_get, _svmc.svm_model_free_sv_set)
204 - def __init__(self):
205 this = _svmc.new_svm_model() 206 try: self.this.append(this) 207 except: self.this = this
208 __swig_destroy__ = _svmc.delete_svm_model 209 __del__ = lambda self : None; 210 svm_model_swigregister = _svmc.svm_model_swigregister 211 svm_model_swigregister(svm_model) 212 213
214 -def svm_set_verbosity(*args):
215 return _svmc.svm_set_verbosity(*args)
216 svm_set_verbosity = _svmc.svm_set_verbosity 217
218 -def svm_train(*args):
219 return _svmc.svm_train(*args)
220 svm_train = _svmc.svm_train 221
222 -def svm_cross_validation(*args):
223 return _svmc.svm_cross_validation(*args)
224 svm_cross_validation = _svmc.svm_cross_validation 225
226 -def svm_save_model(*args):
227 return _svmc.svm_save_model(*args)
228 svm_save_model = _svmc.svm_save_model 229
230 -def svm_load_model(*args):
231 return _svmc.svm_load_model(*args)
232 svm_load_model = _svmc.svm_load_model 233
234 -def svm_get_svm_type(*args):
235 return _svmc.svm_get_svm_type(*args)
236 svm_get_svm_type = _svmc.svm_get_svm_type 237
238 -def svm_get_nr_class(*args):
239 return _svmc.svm_get_nr_class(*args)
240 svm_get_nr_class = _svmc.svm_get_nr_class 241
242 -def svm_get_labels(*args):
243 return _svmc.svm_get_labels(*args)
244 svm_get_labels = _svmc.svm_get_labels 245
246 -def svm_get_svr_probability(*args):
247 return _svmc.svm_get_svr_probability(*args)
248 svm_get_svr_probability = _svmc.svm_get_svr_probability 249
250 -def svm_predict_values(*args):
251 return _svmc.svm_predict_values(*args)
252 svm_predict_values = _svmc.svm_predict_values 253
254 -def svm_predict(*args):
255 return _svmc.svm_predict(*args)
256 svm_predict = _svmc.svm_predict 257
258 -def svm_predict_probability(*args):
259 return _svmc.svm_predict_probability(*args)
260 svm_predict_probability = _svmc.svm_predict_probability 261
262 -def svm_check_parameter(*args):
263 return _svmc.svm_check_parameter(*args)
264 svm_check_parameter = _svmc.svm_check_parameter 265
266 -def svm_check_probability_model(*args):
267 return _svmc.svm_check_probability_model(*args)
268 svm_check_probability_model = _svmc.svm_check_probability_model 269
270 -def svm_node_matrix2numpy_array(*args):
271 return _svmc.svm_node_matrix2numpy_array(*args)
272 svm_node_matrix2numpy_array = _svmc.svm_node_matrix2numpy_array 273
274 -def doubleppcarray2numpy_array(*args):
275 return _svmc.doubleppcarray2numpy_array(*args)
276 doubleppcarray2numpy_array = _svmc.doubleppcarray2numpy_array 277
278 -def new_int(*args):
279 return _svmc.new_int(*args)
280 new_int = _svmc.new_int 281
282 -def delete_int(*args):
283 return _svmc.delete_int(*args)
284 delete_int = _svmc.delete_int 285
286 -def int_getitem(*args):
287 return _svmc.int_getitem(*args)
288 int_getitem = _svmc.int_getitem 289
290 -def int_setitem(*args):
291 return _svmc.int_setitem(*args)
292 int_setitem = _svmc.int_setitem 293
294 -def new_double(*args):
295 return _svmc.new_double(*args)
296 new_double = _svmc.new_double 297
298 -def delete_double(*args):
299 return _svmc.delete_double(*args)
300 delete_double = _svmc.delete_double 301
302 -def double_getitem(*args):
303 return _svmc.double_getitem(*args)
304 double_getitem = _svmc.double_getitem 305
306 -def double_setitem(*args):
307 return _svmc.double_setitem(*args)
308 double_setitem = _svmc.double_setitem 309
310 -def svm_node_array(*args):
311 return _svmc.svm_node_array(*args)
312 svm_node_array = _svmc.svm_node_array 313
314 -def svm_node_array_destroy(*args):
315 return _svmc.svm_node_array_destroy(*args)
316 svm_node_array_destroy = _svmc.svm_node_array_destroy 317
318 -def svm_node_matrix(*args):
319 return _svmc.svm_node_matrix(*args)
320 svm_node_matrix = _svmc.svm_node_matrix 321
322 -def svm_node_matrix_set(*args):
323 return _svmc.svm_node_matrix_set(*args)
324 svm_node_matrix_set = _svmc.svm_node_matrix_set 325
326 -def svm_node_matrix_destroy(*args):
327 return _svmc.svm_node_matrix_destroy(*args)
328 svm_node_matrix_destroy = _svmc.svm_node_matrix_destroy 329 # This file is compatible with both classic and new-style classes. 330 331
332 -def svm_node_array_set(*args):
333 return _svmc.svm_node_array_set(*args)
334 svm_node_array_set = _svmc.svm_node_array_set 335