在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 《Haskell Data Analysis Cookbook》

《Haskell Data Analysis Cookbook》

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:3.41M
  • 下载次数:2
  • 浏览次数:10
  • 发布时间:2023-01-16
  • 实例类别:一般编程问题
  • 发 布 人:老刘
  • 文件格式:.pdf
  • 所需积分:0
 相关标签:

实例介绍

【实例简介】《Haskell Data Analysis Cookbook》

【实例截图】

【核心代码】

Table of Contents
Preface 1
Chapter 1: The Hunt for Data 7
Introduction 8
Harnessing data from various sources 8
Accumulating text data from a file path 11
Catching I/O code faults 13
Keeping and representing data from a CSV file 15
Examining a JSON file with the aeson package 18
Reading an XML file using the HXT package 21
Capturing table rows from an HTML page 24
Understanding how to perform HTTP GET requests 26
Learning how to perform HTTP POST requests 28
Traversing online directories for data 29
Using MongoDB queries in Haskell 32
Reading from a remote MongoDB server 34
Exploring data from a SQLite database 36
Chapter 2: Integrity and Inspection 39
Introduction 40
Trimming excess whitespace 40
Ignoring punctuation and specific characters 42
Coping with unexpected or missing input 43
Validating records by matching regular expressions 46
Lexing and parsing an e-mail address 48
Deduplication of nonconflicting data items 49
Deduplication of conflicting data items 52
Implementing a frequency table using Data.List 55
Implementing a frequency table using Data.MultiSet 56
Computing the Manhattan distance 58
ii
Table of Contents
Computing the Euclidean distance 60
Comparing scaled data using the Pearson correlation coefficient 62
Comparing sparse data using cosine similarity 63
Chapter 3: The Science of Words 65
Introduction 66
Displaying a number in another base 66
Reading a number from another base 68
Searching for a substring using Data.ByteString 69
Searching a string using the Boyer-Moore-Horspool algorithm 71
Searching a string using the Rabin-Karp algorithm 73
Splitting a string on lines, words, or arbitrary tokens 75
Finding the longest common subsequence 77
Computing a phonetic code 78
Computing the edit distance 80
Computing the Jaro-Winkler distance between two strings 81
Finding strings within one-edit distance 84
Fixing spelling mistakes 86
Chapter 4: Data Hashing 91
Introduction 92
Hashing a primitive data type 92
Hashing a custom data type 95
Running popular cryptographic hash functions 97
Running a cryptographic checksum on a file 100
Performing fast comparisons between data types 102
Using a high-performance hash table 103
Using Google's CityHash hash functions for strings 106
Computing a Geohash for location coordinates 107
Using a bloom filter to remove unique items 108
Running MurmurHash, a simple but speedy hashing algorithm 110
Measuring image similarity with perceptual hashes 112
Chapter 5: The Dance with Trees 117
Introduction 118
Defining a binary tree data type 118
Defining a rose tree (multiway tree) data type 120
Traversing a tree depth-first 121
Traversing a tree breadth-first 123
Implementing a Foldable instance for a tree 125
Calculating the height of a tree 127
Implementing a binary search tree data structure 129
Verifying the order property of a binary search tree 131
iii
Table of Contents
Using a self-balancing tree 133
Implementing a min-heap data structure 135
Encoding a string using a Huffman tree 138
Decoding a Huffman code 141
Chapter 6: Graph Fundamentals 143
Introduction 144
Representing a graph from a list of edges 144
Representing a graph from an adjacency list 145
Conducting a topological sort on a graph 147
Traversing a graph depth-first 149
Traversing a graph breadth-first 150
Visualizing a graph using Graphviz 151
Using Directed Acyclic Word Graphs 152
Working with hexagonal and square grid networks 154
Finding maximal cliques in a graph 156
Determining whether any two graphs are isomorphic 157
Chapter 7: Statistics and Analysis 159
Introduction 160
Calculating a moving average 160
Calculating a moving median 162
Approximating a linear regression 165
Approximating a quadratic regression 167
Obtaining the covariance matrix from samples 168
Finding all unique pairings in a list 170
Using the Pearson correlation coefficient 171
Evaluating a Bayesian network 173
Creating a data structure for playing cards 175
Using a Markov chain to generate text 178
Creating n-grams from a list 179
Creating a neural network perceptron 180
Chapter 8: Clustering and Classification 185
Introduction 186
Implementing the k-means clustering algorithm 186
Implementing hierarchical clustering 190
Using a hierarchical clustering library 193
Finding the number of clusters 196
Clustering words by their lexemes 198
Classifying the parts of speech of words 200
Identifying key words in a corpus of text 201
Training a parts-of-speech tagger 204
iv
Table of Contents
Implementing a decision tree classifier 205
Implementing a k-Nearest Neighbors classifier 210
Visualizing points using Graphics.EasyPlot 213
Chapter 9: Parallel and Concurrent Design 215
Introduction 216
Using the Haskell Runtime System options 216
Evaluating a procedure in parallel 217
Controlling parallel algorithms in sequence 219
Forking I/O actions for concurrency 220
Communicating with a forked I/O action 221
Killing forked threads 223
Parallelizing pure functions using the Par monad 225
Mapping over a list in parallel 227
Accessing tuple elements in parallel 228
Implementing MapReduce to count word frequencies 229
Manipulating images in parallel using Repa 232
Benchmarking runtime performance in Haskell 235
Using the criterion package to measure performance 237
Benchmarking runtime performance in the terminal 239
Chapter 10: Real-time Data 241
Introduction 242
Streaming Twitter for real-time sentiment analysis 242
Reading IRC chat room messages 248
Responding to IRC messages 249
Polling a web server for latest updates 251
Detecting real-time file directory changes 252
Communicating in real time through sockets 254
Detecting faces and eyes through a camera stream 256
Streaming camera frames for template matching 259
Chapter 11: Visualizing Data 263
Introduction 264
Plotting a line chart using Google's Chart API 264
Plotting a pie chart using Google's Chart API 267
Plotting bar graphs using Google's Chart API 269
Displaying a line graph using gnuplot 272
Displaying a scatter plot of two-dimensional points 274
Interacting with points in a three-dimensional space 276
Visualizing a graph network 279
Customizing the looks of a graph network diagram 281
v
Table of Contents
Rendering a bar graph in JavaScript using D3.js 284
Rendering a scatter plot in JavaScript using D3.js 286
Diagramming a path from a list of vectors 288
Chapter 12: Exporting and Presenting 293
Introduction 294
Exporting data to a CSV file 294
Exporting data as JSON 295
Using SQLite to store data 297
Saving data to a MongoDB database 298
Presenting results in an HTML web page 300
Creating a LaTeX table to display results 302
Personalizing messages using a text template 304
Exporting matrix values to a file 305
Index 307

标签:

实例下载地址

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警