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

Check for logdet and numpy issues in python3 #91

Open
mnarayan opened this issue Mar 27, 2017 · 0 comments
Open

Check for logdet and numpy issues in python3 #91

mnarayan opened this issue Mar 27, 2017 · 0 comments

Comments

@mnarayan
Copy link
Member

mnarayan commented Mar 27, 2017

In applying AdaptiveGraphLasso to some new data, I see a lot of these warnings

/share/sw/free/anaconda/4.2.0/python3.5/lib/python3.5/site-packages/
numpy/linalg/linalg.py:1757:
RuntimeWarning: invalid value encountered in slogdet
  sign, logdet = _umath_linalg.slogdet(a, signature=signature)
/path/to/home/.local/lib/python3.5/site-packages/skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/metrics.py:25: 
RuntimeWarning: invalid value encountered in multiply
  fast_logdet(precision) - dim * np.log(2 * np.pi)
/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/metrics.py:116: 
RuntimeWarning: invalid value encountered in greater
  mask = np.abs(precision.flat) > np.finfo(precision.dtype).eps
/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/metrics.py:113:
RuntimeWarning: invalid value encountered in multiply
  l_theta = -np.sum(covariance * precision) + fast_logdet(precision)
/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/metrics.py:114: 
RuntimeWarning: overflow encountered in double_scalars
  l_theta *= n_features / 2.
/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/inverse_covariance.py:331: 
RuntimeWarning: invalid value encountered in less
  min_indices = np.where(np.abs(ebic_scores - ebic_scores.min()) < 1e-10)
  File "/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/quic_graph_lasso.py", line 888, in fit
    best_lam_idx = self.ebic_select(gamma=self.gamma)
  File "/path/to/home/.local/lib/python3.5/site-packages/
skggm-0.2.6-py3.5-linux-x86_64.egg/inverse_covariance/inverse_covariance.py", line 332, in ebic_select
    return np.max(min_indices)
  File "/share/sw/free/anaconda/4.2.0/python3.5/lib/python3.5/
site-packages/numpy/core/fromnumeric.py", line 2252, in amax
    out=out, **kwargs)
  File "/share/sw/free/anaconda/4.2.0/python3.5/lib/python3.5/
site-packages/numpy/core/_methods.py", line 26, in _amax
    return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

Encountered this when using latest develop branch, e16ff8c4d10
and calling skggm with python3.5

@mnarayan mnarayan changed the title Check for logdet issues in python3 Check for logdet and numpy issues in python3 Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant