humlab / penelope

Pipleline for generating data used in text analytics notebooks. Used by Welfare State Analytics, INIDUN and several other research projects.
5 stars 1 forks source link

Topic-Topic Network: Inconsistent shape error #201

Closed roger-mahler closed 8 months ago

roger-mahler commented 8 months ago

Topic-Topic network feature in topic modelling notebook raises "Inconsistent shape error".

Problem is caused by (numerous) documents missing in the document-topic weights data, which causes wrong shape of theta matrix. Error occurs when the max document id is missing in the data since the shape of the matrix then doesn't match the shape of the document index.