Giter Club home page Giter Club logo

cluster_2's Introduction

中医药自动组方

objective:这是在爬虫基础之上,将爬取的数据进行清洗(预处理)、计算相关性、聚类和关联规则

环境:python3.5 + pandas

样本数据:classical.csv


1. 数据预处理

1.preprocess.py 负责对样本数据进行处理,具体参见注释,最后输出包括药物的集合和频率等文件保存到本地

2. 计算相似度,构建亲友团

2.relatives.py 根据上述保存的药物频率,计算由复杂系统熵构造的相似度(本质为互信息),并由此构建亲友团

(注:亲友团的概念为与某一药物相似度降序排位靠前的组合,例如针对药物a,降序排列相似度得出b,c,d,e,若亲友团个数设为2,则a的亲友团为b,c)

3. 聚类

3.cluster.py互为亲友团的药物我们称之为强相关组合,由此构建最大的强相关组合

4. 计算敏感性

4.validate.py计算敏感性作为验证模型的有效性的标准

其他

apriori.pyhier.py负责构建关联规则和层次聚类; utils.py为工具类

cluster_2's People

Contributors

gcaxuxi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.