def fake_data(n_docs, n_words, n_sent_length, n_topics):
 doc_topics = orthogonal_matrix([n_docs, n_topics])
 wrd_topics = orthogonal_matrix([n_topics, n_words])
 doc_to_wrds = softmax(np.dot(doc_topics, wrd_topics))
 indices = np.arange(n_words).astype('int32')
 sentences = []
 for doc_to_wrd in doc_to_wrds:
  words = sample(indices, doc_to_wrd, n_sent_length)
  sentences.append(words)
 sentences = np.array(sentences)
 return sentences.astype('int32')

def fake_data ( n_docs , n_words , n_sent_length , n_topics ) : doc_topics = orthogonal_matrix ( [ n_docs , n_topics ] ) wrd_topics = orthogonal_matrix ( [ n_topics , n_words ] ) doc_to_wrds = softmax ( np . dot ( doc_topics , wrd_topics ) ) indices = np . arange ( n_words ) . astype ( 'int32' ) sentences = [ ] for doc_to_wrd in doc_to_wrds : words = sample ( indices , doc_to_wrd , n_sent_length ) sentences . append ( words ) sentences = np . array ( sentences ) return sentences . astype ( 'int32' )
generate a fake dataset that matches the dimensions of mnist .