Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does somebody meet this Error ? I need some help . #306

Open
yuanborong opened this issue Dec 19, 2020 · 1 comment
Open

Does somebody meet this Error ? I need some help . #306

yuanborong opened this issue Dec 19, 2020 · 1 comment

Comments

@yuanborong
Copy link

yuanborong commented Dec 19, 2020

Description

It's a great code about the famous metric learning algorithm.

But when I want to use algorithm 'MMC' to fit my own data , I found that there is an Error like:

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  far_source_sample['far_close'] = np.ones((far_source_sample.shape[0] , 1))
Traceback (most recent call last):
  File "MMC_before_clustering.py", line 87, in <module>
    mmc.fit(sample_pairs , y_pairs_list)
  File "/home/huxinhou/.local/lib/python3.6/site-packages/metric_learn/mmc.py", line 452, in fit
    self._fit(pairs, y)
  File "/home/huxinhou/.local/lib/python3.6/site-packages/metric_learn/mmc.py", line 40, in _fit
    return self._fit_full(pairs, y)
  File "/home/huxinhou/.local/lib/python3.6/site-packages/metric_learn/mmc.py", line 111, in _fit_full
    l, V = np.linalg.eigh((A + A.T) / 2)
  File "<__array_function__ internals>", line 6, in eigh
  File "/home/huxinhou/.local/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 1471, in eigh
    w, vt = gufunc(a, signature=signature, extobj=extobj)
  File "/home/huxinhou/.local/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 94, in _raise_linalgerror_eigenvalues_nonconvergence
    raise LinAlgError("Eigenvalues did not converge")
numpy.linalg.LinAlgError: Eigenvalues did not converge

I am confused how this Error occurs . Does somebody know how to fix it ??
Thank you .

Expected Results

Actual Results

Versions

@wdevazelhes
Copy link
Member

Hi @yuanborong, thanks for raising this issue, could you provide a minimal reproducible example so we can reproduce the error, including what are your sample_pairs and y_pairs_list ?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants