Book Image

Haskell Data Analysis Cookbook

By : Nishant Shukla
Book Image

Haskell Data Analysis Cookbook

By: Nishant Shukla

Overview of this book

Table of Contents (19 chapters)
Haskell Data Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


A hash is a lossy way of representing an object into a small and typically fixed-length value. Hashing data embellishes us with speedy lookups and lightweight handling of massive datasets.

The output of a hashing function is referred to as a digest. One of the principal properties of a good hashing function is that it must be deterministic, which means a given input must always produce the same corresponding output. Sometimes, two different inputs may end up producing the same output, and we call that a collision. Given a hash alone, we cannot invert the process to rediscover the object within an adequate time. To minimize the chances of a collision, another property of a hash function called uniformity is used. In other words, the probability of each output occurring should be nearly the same.

We will start by first producing a simple digest from an input. Then in the next recipe, we will run the hashing algorithm on our custom-made data type.

Another important application...