Travel Tips
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
中医证型关联分析-关联
#载入所需库 import pandas as pd import numpy as np from apyori import apriori #导入数据 data = pd.read_csv("/media/zty/aae84acb-4d27-47dc-b5a0-93a21d9f7cd9/zty/数据分析文件/262-结实-左手R右手Python数据挖掘机器学习/第四章/4.7中医症型关联分析(关联规则)--关联规则python语言实现/processedfile.csv",sep = ',',encoding = 'utf-8') data_ap = np.array(data) print(data_ap)
result_ap = list(apriori(transactions=data_ap,min_support = 0.07,min_confidence = 0.7)) result_ap print(result_ap)
##### items:项集 ##### frozenset:对象 ##### support:支持度 ##### confidence:置信度或可信度 ##### ordered_statistics: 存在的关联规则 ##### items_base:关联规则中的分母项集 ##### lift:提升度(大于1,可取)
file=open('/media/zty/aae84acb-4d27-47dc-b5a0-93a21d9f7cd9/zty/数据分析文件/262-结实-左手R右手Python数据挖掘机器学习/第四章/4.7中医症型关联分析(关联规则)--关联规则python语言实现/dd.txt','w') file.write(str(result_ap)) file.close()
result_ap_pd=pd.DataFrame(result_ap) result_ap_pd.to_csv('/media/zty/aae84acb-4d27-47dc-b5a0-93a21d9f7cd9/zty/数据分析文件/262-结实-左手R右手Python数据挖掘机器学习/第四章/4.7中医症型关联分析(关联规则)--关联规则python语言实现/dd.csv') #存储到CSV中
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Sed ac lorem felis. Ut in odio lorem. Quisque magna dui, maximus ut commodo sed, vestibulum ac nibh. Aenean a tortor in sem tempus auctor
December 4, 2020 at 3:12 pm
Donec in ullamcorper quam. Aenean vel nibh eu magna gravida fermentum. Praesent eget nisi pulvinar, sollicitudin eros vitae, tristique odio.
December 4, 2020 at 3:12 pm
我是 s enim interduante quis metus. Duis porta ornare nulla ut bibendum
Rosie
6 minutes ago