Represents a document clustering as a topic model of two matrices. phi: P(term | cluster) theta: P(cluster | document)
Cluster2TopicModel(dtm, clustering, ...)
A document term matrix of class
A vector of length
Other arguments to be passed to
Returns a list with two elements, phi and theta. 'phi' is a matrix whose j-th row represents P(terms | cluster_j). 'theta' is a matrix whose j-th row represents P(clusters | document_j). Each row of theta should only have one non-zero element.