本文整理汇总了Python中DataManager.DataManager.count_textual_training_img_ids方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.count_textual_training_img_ids方法的具体用法?Python DataManager.count_textual_training_img_ids怎么用?Python DataManager.count_textual_training_img_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.count_textual_training_img_ids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import count_textual_training_img_ids [as 别名]
# testing data
def test(data_manager, lda):
testing_data_manager = TestingDataManager(data_manager, lda)
testing_data_manager.create_testing_img_document_topic_matrix()
testing_data_manager.create_testing_textual_document_topic_matrix()
testing_data_manager.create_ranking()
if __name__ == '__main__':
# Create vocabulary - either custom or by gensim
textual_dictionary = TextualDictionary()
#textual_dictionary.create_custom_vocabulary()
textual_dictionary.create_gensim_dictionary()
data_manager = DataManager(textual_dictionary)
data_manager.count_textual_training_img_ids()
#data_manager.load_testing_img_ids()
# Inicialize text corpus for training.
corpus = ConcatenatedCorpus(len(data_manager.textual_train_image_ids), textual_dictionary)
# Inicilize LDA and start training.
lda = ConcatenatedLDA(data_manager, corpus)
lda.train_lda()
teaser(data_manager, lda)