第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

python提示“MemoryError”錯誤怎么辦?

python提示“MemoryError”錯誤怎么辦?

我想用python來 頻繁項目挖掘(一種大數(shù)據(jù)挖掘算法)來數(shù)據(jù)挖掘一個文件中的數(shù)據(jù)。數(shù)據(jù)量很大,用網(wǎng)上查到的代碼編寫好了以后,運行結果為“ array = np.zeros((len(X), len(self.columns_)), dtype=bool)? MemoryError”我不知道該怎么解決這個問題。代碼是正確的,因為如果將數(shù)據(jù)量減小就可以運行出來了,但是數(shù)據(jù)量變成原來那樣就顯示內存錯誤我的代碼很簡單:import pandas as pdimport numpy as npimport matplotlib.pyplot as pltfrom mlxtend.preprocessing import TransactionEncoderfrom mlxtend.frequent_patterns import apriori, association_rulesstudent_list = []file_handler =open('D:\lab\lab1\kosarak.dat',mode='r')?contents = file_handler.readlines()for name in contents:? ? name = name.strip('\n')? ? list_1 = name.split(' ')? ? student_list.append(list_1)te = TransactionEncoder()?te_ary = te.fit(student_list).transform(student_list)?df = pd.DataFrame(te_ary, columns=te.columns_)?frequent_itemsets = apriori(df, min_support=0.1, use_colnames=True)?print (frequent_itemsets)
查看完整描述

目前暫無任何回答

  • 0 回答
  • 1 關注
  • 6304 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號