April 2017
Beginner to intermediate
358 pages
9h 30m
English
We will now extract some features from this dataset by combining and comparing the existing data. First, we need to specify our class value, which will give our classification algorithm something to compare against to see if its prediction is correct or not. This could be encoded in a number of ways; however, for this application, we will specify our class as 1 if the home team wins and 0 if the visitor team wins. In basketball, the team with the most points wins. So, while the data set doesn't specify who wins directly, we can easily compute it.
We can specify the data set by the following:
dataset["HomeWin"] = dataset["VisitorPts"] < dataset["HomePts"]
We then copy those values into a NumPy array to use later for ...
Read now
Unlock full access