I’m trying to generate Word Correlation plots on processed tweets. So, it generates the plots but it also gives me the following warning:
“RuntimeWarning: invalid value encountered in scalar divide”
Here’s the code I’m using:
<code>words = ["credit", "fintech", "access", "banking", "financial", "bank", "data", "amp", "loan", "help"]
viz = WordCorrelationPlot(words, title="Word Correlation Plot, 2020")
viz.fit(corpus)
viz.show(outpath="Word Correlation Plot for 2020.png")
</code>
<code>words = ["credit", "fintech", "access", "banking", "financial", "bank", "data", "amp", "loan", "help"]
viz = WordCorrelationPlot(words, title="Word Correlation Plot, 2020")
viz.fit(corpus)
viz.show(outpath="Word Correlation Plot for 2020.png")
</code>
words = ["credit", "fintech", "access", "banking", "financial", "bank", "data", "amp", "loan", "help"]
viz = WordCorrelationPlot(words, title="Word Correlation Plot, 2020")
viz.fit(corpus)
viz.show(outpath="Word Correlation Plot for 2020.png")
The problem is related with one specific word (“access”), because if I remove it the warning is not generated anymore.
I would like to include all the words in the two plots I am currently working on.
Thanks for the help!
New contributor
notaprogrammer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.