List of Listings
Chapter 2. Classifying with k-Nearest Neighbors
Listing 2.1. k-Nearest Neighbors algorithm
Listing 2.2. Text record to NumPy parsing code
Listing 2.3. Data-normalizing code
Listing 2.4. Classifier testing code for dating site
Chapter 3. Splitting datasets one feature at a time: decision trees
Listing 3.1. Function to calculate the Shannon entropy of a dataset
Listing 3.2. Dataset splitting on a given feature
Listing 3.3. Choosing the best feature to split on
Listing 3.4. Tree-building code
Listing 3.5. Plotting tree nodes with text annotations
Listing 3.6. Identifying the number of leaves in a tree and the depth
Get Machine Learning in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.