mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
clean of unnecessary checks, imports, calls (#7993)
This commit is contained in:
@ -388,16 +388,10 @@ class SmoSVM:
|
||||
return (data - self._min) / (self._max - self._min)
|
||||
|
||||
def _is_unbound(self, index):
|
||||
if 0.0 < self.alphas[index] < self._c:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return bool(0.0 < self.alphas[index] < self._c)
|
||||
|
||||
def _is_support(self, index):
|
||||
if self.alphas[index] > 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return bool(self.alphas[index] > 0)
|
||||
|
||||
@property
|
||||
def unbound(self):
|
||||
|
Reference in New Issue
Block a user