Search⌘ K
AI Features

Data Classification

Explore how to split data into training and testing sets using filter functions and list comprehensions. Understand the mathematical concepts behind data classification and how they translate into Python code. Learn to design classes that handle known and unknown samples consistently to simplify classification processes.

Splitting the data

In effect, splitting the data into two subsets can be defined around some filter functions. We’ll avoid Python for a moment and focus on the conceptual math to make sure we have the logic completely correct before diving into code. Conceptually, we have a pair of functions, e(sis_i) and r(sis_i), that decide if a sample, (sis_i), is for testing, ee, or training, rr ...