python-ldl 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,9 +25,9 @@ class Duo_LDL(BaseAdam, BaseDeepLDL):
25
25
  , axis=1)
26
26
 
27
27
  def predict(self, X):
28
- from pyldl.algorithms.utils import normalize
28
+ from pyldl.algorithms.utils import proj
29
29
  C_pred = self._call(X)
30
30
  shape = (X.shape[0], self._n_outputs - 1, self._n_outputs)
31
31
  C_pred_reshaped = ops.transpose(ops.reshape(C_pred, shape), (0, 2, 1))
32
32
  D_pred = self._to_numpy((ops.sum(C_pred_reshaped, axis=2) + 1) / self._n_outputs)
33
- return normalize(D_pred)
33
+ return proj(D_pred)
@@ -36,4 +36,4 @@ class LDL_DPA(BaseBFGS, BaseDeepLDL):
36
36
 
37
37
  def _before_train(self):
38
38
  from scipy.stats import rankdata
39
- self._R = ops.cast(rankdata(self._D, axis=1), dtype="float32")
39
+ self._R = ops.cast(rankdata(self._to_numpy(self._D), axis=1), dtype="float32")
@@ -11,8 +11,8 @@ class _LRLDL(BaseADMM, BaseLDL):
11
11
  :term:`ADMM` is used as optimization algorithm.
12
12
  """
13
13
 
14
- def __init__(self, mode='threshold', param=None, alpha=1e-3, beta=1e-3, random_state=None, **kwargs):
15
- super().__init__(random_state, **kwargs)
14
+ def __init__(self, mode='threshold', param=None, alpha=1e-3, beta=1e-3, **kwargs):
15
+ super().__init__(**kwargs)
16
16
  self._mode = mode
17
17
  self._param = param
18
18
  self._alpha = alpha