December 2015
Beginner to intermediate
202 pages
4h
English
A random forest is an ensemble (a group) of decision trees which will output a prediction value.
For this recipe, we are going to use the Heart dataset from An Introduction to Statistical Learning with Applications in R.
import pandas as pd import numpy as np import matplotlib as plt import matplotlib.pyplot as plt %matplotlib inline
data_file = '/Users/robertdempsey/Dropbox/private/Python Business Intelligence Cookbook/Data/ISL/Heart.csv' heart = pd.read_csv(data_file, sep=',', header=0, index_col=0, parse_dates=True, tupleize_cols=False, error_bad_lines=False, ...
Read now
Unlock full access