question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash: LinAlgError: SVD did not converge

See original GitHub issue

I am getting a crash during the singlar value decomposition in lsa.py:

u, sigma, v = singular_value_decomposition(matrix, full_matrices=False)

The exception is LinAlgError: SVD did not converge

I saved the input file here: http://pastebin.com/s0RNZ2J2

To Reproduce:

# "text" is the input text saved at http://pastebin.com/s0RNZ2J2
parser = PlaintextParser.from_string(text, LawTokenizer("english"))
# I'm using the porter2 stemmer, but I don't think that matters
summarizer = sumy.summarizers.lsa.LsaSummarizer(stem_word)
# This is the standard stop words list
summarizer.stop_words = get_stop_words("english")   
# We get the crash here when it calls down to lsa.py
summaries = summarizer(parser.document, sentences)

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
speedplanecommented, Jun 14, 2016

It’s been a while, but just wanted to leave a bit more info here in case this comes up with others. I was getting this error, but it seems to have disappeared after upgrading to the latest versions of numpy. That’s a bit disconcerting as it implies that there were bugs in numpy’s SVD calculation, but at least it seems to work now.

0reactions
miso-belicacommented, Oct 8, 2013

Currently I am studying other summarization methods. I implemented LexRank a few days ago if you are interested.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVD did not converge in matplotlib pca determination - Stack ...
This can happen when there are inf or nan values in the data. Use this to remove nan values: ori_data.dropna(inplace=True).
Read more >
Error for region (...) LinAlgError('SVD did not converge')
It corresponds to regions where the SVD algorithm did converge, but the covariance inverse is filled with NaN (not-a-number) values. The ...
Read more >
numpy.linalg.linalg.LinAlgError: SVD did not converge during ...
LinAlgError : SVD did not converge in Linear Least Squares errors, that cause RMG to immediately crash. One co...
Read more >
SVD did not converge in Linear Least Squares" with eleanor ...
I installed eleonor and ran your code - similar but deleted the line: eleanor.Update(sector=1). Because it was giving me an error.
Read more >
"SVD did not converge" for GLM - no NaNs - Google Groups
LinAlgError : SVD did not converge. I have seen that this is a common issue where there are NaNs; this is not the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found