2bb8e1dfeadfef943c888f7e4e735fd161535475,gensim/sklearn_api/lsimodel.py,LsiTransformer,transform,#LsiTransformer#Any#,56
Before Change
// The input as array of array
check = lambda x: [x] if isinstance(x[0], tuple) else x
docs = check(docs)
X = [[] for i in range(0, len(docs))]
for k, v in enumerate(docs):
doc_topics = self.gensim_model[v]
// returning dense representation for compatibility with sklearn but we should go back to sparse representation in the future
probs_docs = matutils.sparse2full(doc_topics, self.num_topics)
X[k] = probs_docs
return np.reshape(np.array(X), (len(docs), self.num_topics))
def partial_fit(self, X):
After Change
)
// The input as array of array
if isinstance(docs[0], tuple):
docs = [docs]
// returning dense representation for compatibility with sklearn but we should go back to sparse representation in the future
distribution = [matutils.sparse2full(self.gensim_model[doc], self.num_topics) for doc in docs]
return np.reshape(np.array(distribution), (len(docs), self.num_topics))
def partial_fit(self, X):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 30
Instances
Project Name: RaRe-Technologies/gensim
Commit Name: 2bb8e1dfeadfef943c888f7e4e735fd161535475
Time: 2017-11-06
Author: horpto@users.noreply.github.com
File Name: gensim/sklearn_api/lsimodel.py
Class Name: LsiTransformer
Method Name: transform
Project Name: RaRe-Technologies/gensim
Commit Name: 2bb8e1dfeadfef943c888f7e4e735fd161535475
Time: 2017-11-06
Author: horpto@users.noreply.github.com
File Name: gensim/sklearn_api/lsimodel.py
Class Name: LsiTransformer
Method Name: transform
Project Name: RaRe-Technologies/gensim
Commit Name: 2bb8e1dfeadfef943c888f7e4e735fd161535475
Time: 2017-11-06
Author: horpto@users.noreply.github.com
File Name: gensim/sklearn_api/rpmodel.py
Class Name: RpTransformer
Method Name: transform
Project Name: RaRe-Technologies/gensim
Commit Name: 2bb8e1dfeadfef943c888f7e4e735fd161535475
Time: 2017-11-06
Author: horpto@users.noreply.github.com
File Name: gensim/sklearn_api/ldamodel.py
Class Name: LdaTransformer
Method Name: transform