'CooccurrenceDSM' object has no attribute 'row_col_data'
chozelinek opened this issue · comments
José Manuel Martínez Martínez commented
Hi, Jimmy,
thanks for the package! I've been following the tutorial and I arrived to the section on visualization. Sadly, I get an error. If I try to plot a hexbin, pcolormesh, or heatmap. Apparently the matrix was fine, I am passing a list of lists as corpus to pydsm.build
:
import pydsm.visualization as visualization
visualization.heatmap(ppmi)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-20-96808fb96dd1> in <module>()
1 import pydsm.visualization as visualization
----> 2 visualization.heatmap(ppmi)
~/.virtualenvs/dataproc-dev/src/pydsm/pydsm/visualization.py in heatmap(matrix)
16
17 def heatmap(matrix):
---> 18 row, col, data = matrix.row_col_data
19 histogram, xedges, yedges = np.histogram2d(col, row, bins=50, normed=True, weights=data)
20 extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
AttributeError: 'CooccurrenceDSM' object has no attribute 'row_col_data'
Do you have any clues? I've studied the code, but I am not able to find where the problem lies.
Jimmy Callin commented
Hi @chozelinek! Apologies for the very late response. I haven't touched this project in a few years, but if it's still a problem for you I could take a look. Did you find a solution?
Jimmy Callin commented
Closing since no response. Please let me know if it's still an issue.