Logical View
Explore how to create a logical view of a Python application using object-oriented design principles. Understand class diagrams, attributes, and relationships like composition and aggregation, and how these support data processing and classification tasks.
We'll cover the following...
Introduction
Recall the context diagram presented earlier and reproduced below:
Here, processing starts with training data and testing data. This is properly classified sample data used to test our classification algorithm. The following diagram shows one way to look at a class that contains various training and testing datasets:
Elucidation of class diagram
The illustration above shows a TrainingData class of objects with the attributes of each instance of this class. The TrainingData object gives our sample collection a name and
some dates where uploading and testing were completed. For now, it seems like each TrainingData object should have a single tuning parameter, k, used for the -NN classifier algorithm. An instance also includes two lists of individual samples: a training list and a testing list.
Each class of objects is depicted in a rectangle with a number of individual ...