You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/will/anaconda3/envs/standard/bin/python /home/will/.PyCharmCE2018.3/config/scratches/scratch_50.py
/home/will/Code/metric-learn/metric_learn/itml.py:95: RuntimeWarning: divide by zero encountered in double_scalars
alpha = min(_lambda[i], gamma_proj*(1./wtw - 1./pos_bhat[i]))
/home/will/Code/metric-learn/metric_learn/itml.py:105: RuntimeWarning: divide by zero encountered in double_scalars
alpha = min(_lambda[i+num_pos], gamma_proj*(1./neg_bhat[i] - 1./wtw))
/home/will/Code/metric-learn/metric_learn/itml.py:107: RuntimeWarning: invalid value encountered in double_scalars
beta = -alpha/(1 + alpha*wtw)
/home/will/Code/metric-learn/metric_learn/itml.py:116: RuntimeWarning: invalid value encountered in double_scalars
conv = np.abs(lambdaold - _lambda).sum() / normsum
/home/will/Code/metric-learn/metric_learn/itml.py:106: RuntimeWarning: invalid value encountered in double_scalars
_lambda[i+num_pos] -= alpha
/home/will/Code/metric-learn/metric_learn/itml.py:108: RuntimeWarning: divide by zero encountered in double_scalars
neg_bhat[i] = 1./((1 / neg_bhat[i]) - (alpha / gamma))
/home/will/Code/metric-learn/metric_learn/itml.py:108: RuntimeWarning: invalid value encountered in double_scalars
neg_bhat[i] = 1./((1 / neg_bhat[i]) - (alpha / gamma))
Traceback (most recent call last):
File "/home/will/.PyCharmCE2018.3/config/scratches/scratch_50.py", line 24, in <module>
itml.fit(trunc_data, target)
File "/home/will/Code/metric-learn/metric_learn/itml.py", line 179, in fitreturnself._fit(pairs, y, bounds=bounds)
File "/home/will/Code/metric-learn/metric_learn/itml.py", line 127, in _fitself.transformer_ = transformer_from_metric(A)
File "/home/will/Code/metric-learn/metric_learn/_util.py", line 356, in transformer_from_metricreturn np.linalg.cholesky(metric).T
File "/home/will/anaconda3/envs/standard/lib/python3.7/site-packages/numpy/linalg/linalg.py", line 733, in cholesky
r = gufunc(a, signature=signature, extobj=extobj)
File "/home/will/anaconda3/envs/standard/lib/python3.7/site-packages/numpy/linalg/linalg.py", line 92, in _raise_linalgerror_nonposdefraise LinAlgError("Matrix is not positive definite")
numpy.linalg.linalg.LinAlgError: Matrix is not positive definite
Description
ITML raises an error on this example (1D iris). We should investigate why, and see if it is the surface of some
problem or not
Note that if we deduplicate, (remove pairs like [a, a]), there is no more problem, so maybe this is the direction to look for
Steps/Code to Reproduce
Expected Results
No error is thrown.
Actual Results
Versions
Linux-4.4.0-142-generic-x86_64-with-debian-stretch-sid
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
[GCC 7.3.0]
NumPy 1.15.4
SciPy 1.2.0
Scikit-Learn 0.20.2
Metric-Learn 0.4.0
The text was updated successfully, but these errors were encountered: