售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Haskell Data Analysis Cookbook
Table of Contents
Haskell Data Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The Hunt for Data
Introduction
Harnessing data from various sources
How to do it...
News
Private
Academic
Nonprofits
The United States government
Accumulating text data from a file path
Getting ready
How to do it...
How it works...
See also
Catching I/O code faults
How to do it…
How it works…
There's more…
Keeping and representing data from a CSV file
Getting ready
How to do it...
How it works...
Examining a JSON file with the aeson package
Getting ready
How to do it...
How it works...
There's more…
Reading an XML file using the HXT package
Getting ready
How to do it...
How it works...
Capturing table rows from an HTML page
Getting ready
How to do it...
How it works...
Understanding how to perform HTTP GET requests
Getting ready
How to do it...
How it works…
See also…
Learning how to perform HTTP POST requests
Getting ready
How to do it...
How it works...
See also
Traversing online directories for data
Getting ready
How to do it...
How it works...
Using MongoDB queries in Haskell
Getting ready
How to do it...
How it works...
See also
Reading from a remote MongoDB server
Getting ready
How to do it...
See also
Exploring data from a SQLite database
Getting ready
How to do it…
2. Integrity and Inspection
Introduction
Trimming excess whitespace
How to do it...
How it works...
There's more…
Ignoring punctuation and specific characters
How to do it...
There's more...
Coping with unexpected or missing input
Getting ready
How to do it...
How it works...
There's more...
See also
Validating records by matching regular expressions
Getting ready
How to do it...
How it works...
See also
Lexing and parsing an e-mail address
Getting ready
How to do it…
How it works…
Deduplication of nonconflicting data items
Getting ready
How to do it...
How it works...
There's more...
See also
Deduplication of conflicting data items
Getting ready
How to do it...
How it works...
There's more...
See also
Implementing a frequency table using Data.List
How to do it...
How it works...
See also
Implementing a frequency table using Data.MultiSet
Getting ready
How to do it...
How it works...
See also
Computing the Manhattan distance
Getting ready
How to do it...
See also
Computing the Euclidean distance
Getting ready
How to do it...
See also
Comparing scaled data using the Pearson correlation coefficient
How to do it...
How it works...
Comparing sparse data using cosine similarity
How to do it...
See also
3. The Science of Words
Introduction
Displaying a number in another base
How to do it...
How it works...
See also
Reading a number from another base
How to do it...
How it works...
See also
Searching for a substring using Data.ByteString
How to do it...
How it works...
There's more...
See also
Searching a string using the Boyer-Moore-Horspool algorithm
How to do it...
How it works...
There's more...
See also
Searching a string using the Rabin-Karp algorithm
Getting ready
How to do it...
How it works...
See also
Splitting a string on lines, words, or arbitrary tokens
Getting ready
How to do it...
Finding the longest common subsequence
Getting ready
How to do it...
How it works...
Computing a phonetic code
Getting ready
How to do it...
How it works...
There's more...
Computing the edit distance
Getting ready
How to do it...
How it works...
See also
Computing the Jaro-Winkler distance between two strings
Getting ready
How to do it...
See also
Finding strings within one-edit distance
Getting ready
How to do it...
There's more...
See also
Fixing spelling mistakes
Getting ready
How to do it...
How it works...
There's more...
See also
4. Data Hashing
Introduction
Hashing a primitive data type
Getting ready
How to do it…
How it works…
There's more…
See also
Hashing a custom data type
Getting ready
How to do it…
There's more…
See also
Running popular cryptographic hash functions
Getting ready
How to do it…
See also
Running a cryptographic checksum on a file
Getting ready
How to do it…
See also
Performing fast comparisons between data types
How to do it…
Using a high-performance hash table
Getting ready
How to do it…
How it works…
Using Google's CityHash hash functions for strings
Getting ready
How to do it…
How it works…
See also
Computing a Geohash for location coordinates
Getting ready
How to do it…
Using a bloom filter to remove unique items
Getting ready
How to do it…
How it works…
Running MurmurHash, a simple but speedy hashing algorithm
Getting ready
How to do it…
Measuring image similarity with perceptual hashes
Getting ready
How to do it…
How it works…
5. The Dance with Trees
Introduction
Defining a binary tree data type
Getting ready
How to do it...
See also
Defining a rose tree (multiway tree) data type
Getting ready
How to do it...
How it works...
See also
Traversing a tree depth-first
Getting ready
How to do it...
How it works…
See also
Traversing a tree breadth-first
Getting ready
How to do it...
How it works…
See also
Implementing a Foldable instance for a tree
Getting ready
How to do it...
How it works...
See also
Calculating the height of a tree
Getting ready
How to do it...
How it works...
Implementing a binary search tree data structure
How to do it...
How it works...
See also
Verifying the order property of a binary search tree
Getting ready
How to do it...
How it works...
Using a self-balancing tree
Getting ready
How to do it...
How it works...
There's more…
Implementing a min-heap data structure
Getting started
How to do it...
There's more…
Encoding a string using a Huffman tree
Getting ready
How to do it...
How it works...
See also
Decoding a Huffman code
Getting ready
How to do it...
See also
6. Graph Fundamentals
Introduction
Representing a graph from a list of edges
Getting ready
How to do it...
How it works...
See also
Representing a graph from an adjacency list
Getting ready
How to do it...
How it works...
See also
Conducting a topological sort on a graph
Getting ready
How to do it...
Traversing a graph depth-first
How to do it...
Traversing a graph breadth-first
How to do it...
Visualizing a graph using Graphviz
Getting ready
How to do it...
Using Directed Acyclic Word Graphs
Getting ready
How to do it...
Working with hexagonal and square grid networks
Getting started
How to do it...
Finding maximal cliques in a graph
Getting started
How to do it...
How it works...
Determining whether any two graphs are isomorphic
Getting started
How to do it...
7. Statistics and Analysis
Introduction
Calculating a moving average
Getting ready
How to do it…
There's more…
See also
Calculating a moving median
Getting ready
How to do it…
How it works…
See also
Approximating a linear regression
Getting ready
How to do it…
How it works…
See also
Approximating a quadratic regression
Getting ready
How to do it…
How it works…
See also
Obtaining the covariance matrix from samples
Getting ready
How to do it…
Finding all unique pairings in a list
How it works…
See also
Using the Pearson correlation coefficient
Getting ready
How to do it…
Evaluating a Bayesian network
Getting ready
How to do it…
Creating a data structure for playing cards
Getting ready
How to do it…
Using a Markov chain to generate text
Getting ready
How to do it…
How it works…
Creating n-grams from a list
How to do it…
Creating a neural network perceptron
Getting ready
How to do it…
8. Clustering and Classification
Introduction
Implementing the k-means clustering algorithm
How to do it…
How it works…
There's more…
See also
Implementing hierarchical clustering
How to do it…
How it works…
There's more…
See also
Using a hierarchical clustering library
Getting ready
How to do it…
How it works…
There's more…
See also
Finding the number of clusters
Getting ready
How to do it…
Clustering words by their lexemes
Getting ready
How to do it…
How it works…
See also
Classifying the parts of speech of words
Getting ready
How to do it…
How it works…
There's more…
See also
Identifying key words in a corpus of text
Getting ready
How to do it…
How it works…
See also
Training a parts-of-speech tagger
Getting ready
How to do it…
How it works…
See also
Implementing a decision tree classifier
Getting ready
How to do it…
How it works…
Implementing a k-Nearest Neighbors classifier
Getting ready
How to do it…
How it works…
Visualizing points using Graphics.EasyPlot
Getting ready
How to do it…
How it works…
9. Parallel and Concurrent Design
Introduction
Using the Haskell Runtime System options
How to do it…
How it works…
There's more…
Evaluating a procedure in parallel
Getting ready
How to do it…
How it works…
See also
Controlling parallel algorithms in sequence
Getting ready
How to do it…
How it works…
See also
Forking I/O actions for concurrency
How to do it…
See also
Communicating with a forked I/O action
Getting ready
How to do it…
See also
Killing forked threads
How to do it…
How it works...
Parallelizing pure functions using the Par monad
Getting ready
How to do it…
There's more…
See also
Mapping over a list in parallel
How to do it…
How it works…
There's more…
See also
Accessing tuple elements in parallel
How to do it…
There's more…
See also
Implementing MapReduce to count word frequencies
Getting ready
How to do it…
Manipulating images in parallel using Repa
Getting ready
How to do it…
How it works…
Benchmarking runtime performance in Haskell
How to do it…
See also
Using the criterion package to measure performance
Getting ready
How to do it…
How it works…
Benchmarking runtime performance in the terminal
Getting ready
How to do it…
See also
10. Real-time Data
Introduction
Streaming Twitter for real-time sentiment analysis
Getting ready
How to do it…
How it works…
There's more…
Reading IRC chat room messages
Getting ready
How to do it…
See also
Responding to IRC messages
Getting ready
How to do it…
See also
Polling a web server for latest updates
How to do it…
Detecting real-time file directory changes
Getting ready
How to do it…
How it works…
Communicating in real time through sockets
How to do it…
How it works…
Detecting faces and eyes through a camera stream
Getting ready
How to do it…
How it works…
Streaming camera frames for template matching
Getting ready
How to do it…
There's more…
11. Visualizing Data
Introduction
Plotting a line chart using Google's Chart API
Getting ready
How to do it…
How it works…
There's more…
See also
Plotting a pie chart using Google's Chart API
Getting ready
How to do it…
How it works…
There's more…
See also
Plotting bar graphs using Google's Chart API
Getting ready
How to do it…
How it works…
There's more…
See also
Displaying a line graph using gnuplot
Getting ready
How to do it…
How it works…
See also
Displaying a scatter plot of two-dimensional points
Getting ready
How to do it…
How it works…
See also
Interacting with points in a three-dimensional space
Getting ready
How to do it…
How it works…
See also
Visualizing a graph network
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing the looks of a graph network diagram
Getting ready
How to do it…
How it works…
There's more…
Rendering a bar graph in JavaScript using D3.js
Getting ready
How to do it…
How it works…
See also
Rendering a scatter plot in JavaScript using D3.js
Getting ready
How to do it…
How it works…
See also
Diagramming a path from a list of vectors
Getting ready
How to do it…
How it works…
12. Exporting and Presenting
Introduction
Exporting data to a CSV file
Getting ready
How to do it…
How it works…
There's more…
See also
Exporting data as JSON
Getting ready
How to do it…
There's more…
See also
Using SQLite to store data
Getting Ready
How to do it…
See also
Saving data to a MongoDB database
Getting ready
How to do it…
See also
Presenting results in an HTML web page
Getting ready
How to do it…
See also
Creating a LaTeX table to display results
Getting Ready
How to do it…
See also
Personalizing messages using a text template
Getting ready
How to do it…
Exporting matrix values to a file
Getting ready
How to do it…
How it works…
There's more…
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜