Case study
We'll refine our case study in this chapter. Previously, in Chapter 2, Objects in Python, we talked in a vague way about loading the training data and splitting it into two clumps – the training set and the testing set. In Chapter 5, When to Use Object-Oriented Programming, we looked at ways to deserialize the source file into Sample
instances.
In this chapter, we want to look further at this operation of using the raw data to create a number of TrainingKnownSample
instances separate from a number of TestingKnownSample
instances. In the previous chapter, we identified four cases for sample objects, shown in the following table:
Known |
Unknown |
|
Unclassified |
Training data |
... |