The TrainingData Class
Learn how the TrainingData class enables data loading, partitioning, and testing with hyperparameters for future algorithm implementations.
We'll cover the following...
The TrainingData
class has listed two subclasses of Sample
objects. The KnownSample
and UnknownSample
can be implemented as extensions to a common parent class, Sample
.
Methods
The TrainingData
class also has a list with Hyperparameter
instances. This class can have simple, direct references to previously defined classes.
This class has two methods that initiate the processing:
-
The
load()
method reads raw data and partitions it into training data and test data. Both of these are essentiallyKnownSample
instances with different purposes. The training subset is for evaluating the k-NN algorithm; the testing subset is for determining how well thek
hyperparameter is ...