Analysis

Problem 1: We run the program to construct the random forest and classify the feature (Warm, Strong, Spring).

Input:

source_code/4/chess_with_seasons.csv  
Temperature,Wind,Season,Play  
Cold,Strong,Winter,No  
Warm,Strong,Autumn,No  
Warm,None,Summer,Yes  
Hot,None,Spring,No  
Hot,Breeze,Autumn,Yes  
Warm,Breeze,Spring,Yes  
Cold,Breeze,Winter,No  
Cold,None,Spring,Yes  
Hot,Strong,Summer,Yes  
Warm,None,Autumn,Yes  
Warm,Strong,Spring,? 

Output:

We construct four trees in a random forest, as follows:

$ python random_forest.py chess_with_seasons.csv 4 2 > chess_with_seasons.out

The whole construction and the analysis are stored in the source_code/4/chess_with_seasons.out file. Your construction may differ because of the randomness involved. From the output, ...

Get Data Science Algorithms in a Week - Second Edition 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.