Book Image

Getting Started with Haskell Data Analysis

By : James Church
Book Image

Getting Started with Haskell Data Analysis

By: James Church

Overview of this book

Every business and organization that collects data is capable of tapping into its own data to gain insights how to improve. Haskell is a purely functional and lazy programming language, well-suited to handling large data analysis problems. This book will take you through the more difficult problems of data analysis in a hands-on manner. This book will help you get up-to-speed with the basics of data analysis and approaches in the Haskell language. You'll learn about statistical computing, file formats (CSV and SQLite3), descriptive statistics, charts, and progress to more advanced concepts such as understanding the importance of normal distribution. While mathematics is a big part of data analysis, we've tried to keep this course simple and approachable so that you can apply what you learn to the real world. By the end of this book, you will have a thorough understanding of data analysis, and the different ways of analyzing data. You will have a mastery of all the tools and techniques in Haskell for effective data analysis.
Table of Contents (8 chapters)

Reintroducing kernel density estimation

In this section, we reintroduce kernel density estimation (KDE). When using kernel density estimation, we are attempting to reveal the shape of a dataset with a limited amount of information. Also, in this section, we're going to investigate which movies in the dataset have the highest rating; we're going to compute the KDE of a select group of movies using their rating; and, finally, compute the KDE overlap of two movies.

Let's go back to our MovieLens dataset notebook and import Data.Maybe, as shown in the following example:

If you recall, this library is used in our KDE function. So, we are going to use the KDE function, which is almost identical to what we saw in the last section. The one addition is that we have added a normal line to the bottom of the function, as demonstrated in the following example:

This is a normal...