没有合适的资源?快使用搜索试试~ 我知道了~
首页Applied Data Science(理解大数据)
Applied Data Science(理解大数据)
需积分: 10 12 下载量 80 浏览量
更新于2023-03-16
评论
收藏 3.45MB PDF 举报
What is data science? With the major technological advances of the last two decades, coupled in part with the internet explosion, a new breed of analysist has emerged. The exact role, background, and skill-set, of a data scientist are still in the process of being defined and it is likely that by the time you read this some of what we say will seem archaic.
资源详情
资源评论
资源推荐
Applied Data Science
Ian Langmore Daniel Krasner
2
Contents
I Programming Prerequisites 1
1 Unix 2
1.1 History and Culture . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 The Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 Standard streams . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 In a nutshell . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 More nuts and bolts . . . . . . . . . . . . . . . . . . . 10
1.6 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Version Control with Git 13
2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 What is Git . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Online Materials . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 Basic Git Concepts . . . . . . . . . . . . . . . . . . . . . . . . 15
2.6 Common Git Workflows . . . . . . . . . . . . . . . . . . . . . 15
2.6.1 Linear Move from Working to Remote . . . . . . . . . 16
2.6.2 Discarding changes in your working copy . . . . . . . 17
2.6.3 Erasing changes . . . . . . . . . . . . . . . . . . . . . 17
2.6.4 Remotes . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.6.5 Merge conflicts . . . . . . . . . . . . . . . . . . . . . . 18
3 Building a Data Cleaning Pipeline with Python 19
3.1 Simple Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Template for a Python CLI Utility . . . . . . . . . . . . . . . 21
i
ii CONTENTS
II The Classic Regression Models 23
4 Notation 24
4.1 Notation for Structured Data . . . . . . . . . . . . . . . . . . 24
5 Linear Regression 26
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Coefficient Estimation: Bayesian Formulation . . . . . . . . . 29
5.2.1 Generic setup . . . . . . . . . . . . . . . . . . . . . . . 29
5.2.2 Ideal Gaussian World . . . . . . . . . . . . . . . . . . 30
5.3 Coefficient Estimation: Optimization Formulation . . . . . . 33
5.3.1 The least squares problem and the singular value de-
composition . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.2 Overfitting examples . . . . . . . . . . . . . . . . . . . 39
5.3.3 L
2
regularization . . . . . . . . . . . . . . . . . . . . . 43
5.3.4 Choosing the regularization parameter . . . . . . . . . 44
5.3.5 Numerical techniques . . . . . . . . . . . . . . . . . . 46
5.4 Variable Scaling and Transformations . . . . . . . . . . . . . 47
5.4.1 Simple variable scaling . . . . . . . . . . . . . . . . . . 48
5.4.2 Linear transformations of variables . . . . . . . . . . . 51
5.4.3 Nonlinear transformations and segmentation . . . . . 52
5.5 Error Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.6 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6 Logistic Regression 55
6.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.1.1 Presenter’s viewpoint . . . . . . . . . . . . . . . . . . 55
6.1.2 Classical viewpoint . . . . . . . . . . . . . . . . . . . . 56
6.1.3 Data generating viewpoint . . . . . . . . . . . . . . . . 57
6.2 Determining the regression coefficient w . . . . . . . . . . . . 58
6.3 Multinomial logistic regression . . . . . . . . . . . . . . . . . 61
6.4 Logistic regression for classification . . . . . . . . . . . . . . . 62
6.5 L1 regularization . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.6 Numerical solution . . . . . . . . . . . . . . . . . . . . . . . . 66
6.6.1 Gradient descent . . . . . . . . . . . . . . . . . . . . . 67
6.6.2 Newton’s method . . . . . . . . . . . . . . . . . . . . . 68
6.6.3 Solving the L1 regularized problem . . . . . . . . . . . 70
6.6.4 Common numerical issues . . . . . . . . . . . . . . . . 70
6.7 Model evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.8 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
CONTENTS iii
7 Models Behaving Well 74
7.1 End Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
III Text Data 76
8 Processing Text 77
8.1 A Quick Introduction . . . . . . . . . . . . . . . . . . . . . . 77
8.2 Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . 78
8.2.1 Basic Concepts . . . . . . . . . . . . . . . . . . . . . . 78
8.2.2 Unix Command line and regular expressions . . . . . . 79
8.2.3 Finite State Automata and PCRE . . . . . . . . . . . 82
8.2.4 Backreference . . . . . . . . . . . . . . . . . . . . . . . 83
8.3 Python RE Module . . . . . . . . . . . . . . . . . . . . . . . . 84
8.4 The Python NLTK Library . . . . . . . . . . . . . . . . . . . 87
8.4.1 The NLTK Corpus and Some Fun things to do . . . . 87
IV Classification 89
9 Classification 90
9.1 A Quick Introduction . . . . . . . . . . . . . . . . . . . . . . 90
9.2 Naive Bayes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
9.2.1 Smoothing . . . . . . . . . . . . . . . . . . . . . . . . 93
9.3 Measuring Accuracy . . . . . . . . . . . . . . . . . . . . . . . 94
9.3.1 Error metrics and ROC Curves . . . . . . . . . . . . . 94
9.4 Other classifiers . . . . . . . . . . . . . . . . . . . . . . . . . . 99
9.4.1 Decision Trees . . . . . . . . . . . . . . . . . . . . . . 99
9.4.2 Random Forest . . . . . . . . . . . . . . . . . . . . . . 101
9.4.3 Out-of-bag classification . . . . . . . . . . . . . . . . . 102
9.4.4 Maximum Entropy . . . . . . . . . . . . . . . . . . . . 103
V Extras 105
10 High(er) performance Python 106
10.1 Memory hierarchy . . . . . . . . . . . . . . . . . . . . . . . . 107
10.2 Parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
10.3 Practical performance in Python . . . . . . . . . . . . . . . . 114
10.3.1 Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . 114
10.3.2 Standard Python rules of thumb . . . . . . . . . . . . 117
剩余140页未读,继续阅读
whoareyou123123
- 粉丝: 0
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2023年中国辣条食品行业创新及消费需求洞察报告.pptx
- 2023年半导体行业20强品牌.pptx
- 2023年全球电力行业评论.pptx
- 2023年全球网络安全现状-劳动力资源和网络运营的全球发展新态势.pptx
- 毕业设计-基于单片机的液体密度检测系统设计.doc
- 家用清扫机器人设计.doc
- 基于VB+数据库SQL的教师信息管理系统设计与实现 计算机专业设计范文模板参考资料.pdf
- 官塘驿林场林防火(资源监管)“空天地人”四位一体监测系统方案.doc
- 基于专利语义表征的技术预见方法及其应用.docx
- 浅谈电子商务的现状及发展趋势学习总结.doc
- 基于单片机的智能仓库温湿度控制系统 (2).pdf
- 基于SSM框架知识产权管理系统 (2).pdf
- 9年终工作总结新年计划PPT模板.pptx
- Hytera海能达CH04L01 说明书.pdf
- 数据中心运维操作标准及流程.pdf
- 报告模板 -成本分析与报告培训之三.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0