MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / decision_function

Method decision_function

python/thundersvm/thundersvm.py:361–373  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

359 return self.predict_label
360
361 def decision_function(self, X):
362 X = self._validate_for_predict(X)
363 n_binary_model = (c_int * 1)()
364 thundersvm.get_n_binary_models(c_void_p(self.model), n_binary_model)
365 self.n_binary_model = n_binary_model[0]
366 if not (self._impl in ['c_svc', 'nu_svc', 'one_class']):
367 print("Not support decision_function!")
368 return
369 if self._sparse:
370 dec_func = self._sparse_decision_function(X)
371 else:
372 dec_func = self._dense_decision_function(X)
373 return dec_func
374
375 def _dense_decision_function(self, X):
376 X = check_array(X, dtype=np.float64, order="C")

Callers

nothing calls this directly

Calls 4

_validate_for_predictMethod · 0.95
get_n_binary_modelsMethod · 0.80

Tested by

no test coverage detected