# Rule models

We can best understand rule models using the principles of discrete mathematics. Let's review some of these principles.

Let *X* be a set of features, the feature space, and *C* be a set of classes. We can define the ideal classifier for *X* as follows:

*c: X → C*

A set of examples in the feature space with class *c* is defined as follows:

*D = {(x _{1}, c( x_{1})), ... , (x_{n}, c( x_{n})) ⊆ X × C*

A splitting of *X* is partitioning *X* into a set of mutually exclusive subsets *X _{1}....X_{s}*, so we can say the following:

*X = X1 ∪ .. ∪ Xs*

This induces a splitting of *D* into *D _{1},...D_{s}*. We define

*Dj*where

*j = 1,...,s*and is

*{(x,c(x) ∈ D | x ∈ Xj)}*.

This is just defining a subset in *X* called *Xj* where all the members of *Xj* are perfectly classified.

In the following table we define ...

Get *Python: Deeper Insights into Machine Learning* now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.