Skip to Main Content
Haskell Data Analysis cookbook
book

Haskell Data Analysis cookbook

by Nishant Shukla
June 2014
Beginner to intermediate content levelBeginner to intermediate
334 pages
6h 8m
English
Packt Publishing
Content preview from Haskell Data Analysis cookbook

Implementing a decision tree classifier

A decision tree is a model for classifying data effectively. Each child of a node in the tree represents a feature about the item we are classifying. Traversing down the tree to leaf nodes represent an item's classification. It's often desirable to create the smallest possible tree to represent a large sample of data.

In this recipe, we implement the ID3 decision tree algorithm in Haskell. It is one of the easiest to implement and produces useful results. However, ID3 does not guarantee an optimal solution, may be computationally inefficient compared to other algorithms, and only supports discrete data. While these issues can be addressed by a more complicated algorithm such as C4.5, the code in this recipe ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Haskell Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library

Haskell Quick Syntax Reference: A Pocket Guide to the Language, APIs, and Library

Stefania Loredana Nita, Marius Mihailescu

Publisher Resources

ISBN: 9781783286331Supplemental Content