R language APRIORI association rules, K-MEANS mean value clustering analysis Chinese medicine patent compound treatment drug rule network visualization | code data attached

Full text link: tecdat.cn/?p=30605

Recently, we were asked by a client to write a research report on Chinese medicine patent compound treatment, including some graphics and statistical output.

Application of data mining techniques such as association rules and clustering methods to analyze the compatibility rules of traditional Chinese medicine patent compound prescriptions

Methods The patent compound prescriptions of traditional Chinese medicine were retrieved, and the compound prescriptions of external Chinese medicine and combination of Chinese and Western medicine were excluded. We were recently asked to write a research report on medication regularity, including some graphical and statistical output. The selected traditional Chinese medicine patent compounds were processed by terminology standardization, information was extracted, tables were established, data analysis software R was used to analyze data association rules, and network analysis software was used to perform cluster analysis.

view data

picture

Convert to binary matrix data

colnames(data) <- paste0("X",1:ncol(data))

database <- NULL
for(i in 1:nrow(data)) {
  tmp <- integer(length(total_types))
复制代码

picture

build apriori

plot(all_rules, method = "graph")
复制代码

picture


Click on the title to view past content

picture

R language uses association rules and clustering models to mine prescription data to explore the rules in drug compatibility

picture

Swipe left and right to see more

picture

01

picture

02

picture

03

picture

04

picture

Analysis of association rules of traditional Chinese medicine patent compound prescription pairs

The medicine pair is the basic form of prescription compatibility, which reflects the compatibility relationship among traditional Chinese medicines such as complementing each other, opposite complementing each other, and similar complementing each other. The Chinese medicines in the medicine pair have the characteristics of appearing in the prescription at the same time when the prescription is combined. Therefore, in the analysis of association rules, the medicine pair can be obtained by analyzing the rules with high confidence and two-way association. picture

Filter strong association rules based on confidence and support

picture

K-means mean network cluster analysis

A complex network of compatibility relationships is formed among the drugs in the patent compound of traditional Chinese medicine for depression. Association rule analysis can be used to find drug pairs and strong association rules. Emergence makes it difficult to analyze the compatibility law, and the application of network clustering method can effectively find the compatibility law.

#聚类类别号
kmod$cluster
复制代码

picture

View strong association rules in each category

picture

Cluster 1

picture

Cluster 2

picture

The cluster analysis results of the compatibility relationship network showed the "communities" of traditional Chinese medicines commonly used in the treatment of depression, which reflected some combination of traditional Chinese medicines with relatively close and fixed compatibility in the compound prescription, and clinical application can improve the curative effect.


picture

Click "Read the original text" at the end of the article

Get the full text and complete code data materials.

This article is selected from "R Language APRIORI Association Rules, K-MEANS Mean Value Clustering Data Mining Network Visualization of Medication Rules of Traditional Chinese Medicine Patent Compound Treatment".

Click on the title to view past content

非线性混合效应 NLME模型对抗哮喘药物茶碱动力学研究
Python面板时间序列数据预测:格兰杰因果关系检验Granger causality test药品销售实例与可视化
R语言用关联规则和聚类模型挖掘处方数据探索药物配伍中的规律
用SPSS Modeler的Web复杂网络对所有腧穴进行关联规则分析
PYTHON在线零售数据关联规则挖掘APRIORI算法数据可视化
R语言关联规则模型(Apriori算法)挖掘杂货店的交易数据与交互可视化
R语言关联挖掘实例(购物篮分析)
python关联规则学习:FP-Growth算法对药品进行“菜篮子”分析
基于R的FP树fp growth 关联数据挖掘技术在煤矿隐患管理
python关联规则学习:FP-Growth算法对药品进行“菜篮子”分析
通过Python中的Apriori算法进行关联规则挖掘
Python中的Apriori关联算法-市场购物篮分析
R语言用关联规则和聚类模型挖掘处方数据探索药物配伍中的规律
在R语言中轻松创建关联网络
python主题建模可视化LDA和T-SNE交互式可视化
R语言时间序列数据指数平滑法分析交互式动态可视化
用R语言制作交互式图表和地图
如何用r语言制作交互可视化报告图表K-means和层次聚类分析癌细胞系微阵列数据和树状图可视化比较
KMEANS均值聚类和层次聚类:亚洲国家地区生活幸福质量异同可视化分析和选择最佳聚类数
PYTHON实现谱聚类算法和改变聚类簇数结果可视化比较
有限混合模型聚类FMM、广义线性回归模型GLM混合应用分析威士忌市场和研究专利申请数据
R语言多维数据层次聚类散点图矩阵、配对图、平行坐标图、树状图可视化城市宏观经济指标数据
r语言有限正态混合模型EM算法的分层聚类、分类和密度估计及可视化
Python Monte Carlo K-Means聚类实战研究
R语言k-Shape时间序列聚类方法对股票价格时间序列聚类
R语言对用电负荷时间序列数据进行K-medoids聚类建模和GAM回归
R语言谱聚类、K-MEANS聚类分析非线性环状数据比较
R语言实现k-means聚类优化的分层抽样(Stratified Sampling)分析各市镇的人口
R语言聚类有效性:确定最优聚类数分析IRIS鸢尾花数据和可视化Python、R对小说进行文本挖掘和层次聚类可视化分析案例
R语言k-means聚类、层次聚类、主成分(PCA)降维及可视化分析鸢尾花iris数据集
R语言有限混合模型(FMM,finite mixture model)EM算法聚类分析间歇泉喷发时间
R语言用温度对城市层次聚类、kmean聚类、主成分分析和Voronoi图可视化
R语言k-Shape时间序列聚类方法对股票价格时间序列聚类
R语言中的SOM(自组织映射神经网络)对NBA球员聚类分析
R语言复杂网络分析:聚类(社区检测)和可视化
R语言中的划分聚类模型
Model-Based Clustering and Gaussian Mixture Model in R
Language Clustering Analysis in R Language: k-means and Hierarchical Clustering
SAS Using K-Means Clustering Optimal K Value Selection and Analysis
Using R Language for Website Comments Text Mining Clustering Commodity
review text mining based on LDA topic model clustering
R language iris iris data set hierarchical clustering analysis R language K-medoids clustering modeling and GAM regression R language clustering algorithm
for electricity load time series data
Applications

Guess you like

Origin juejin.im/post/7215153930472423485