Systematic strategy for constructing a feature space if features are are naturally numerical

General idea

If you are using th-order basis (where is a positive integer), you include a feature for every possible product of different dimensions in your original input.

Pasted image 20230710185636.png

Example: XOR problem using a polynomial basis as a feature transformation

XOR with feature transformation

Let’s say for the XOR problem in 2 dimensions.

Pasted image 20230710190154.png

The feature transform is:

After training a perceptron for 4 iterations, we have:
which corresponds to

Plotting this, we can see the gray shaded region classified as negative and the white region

Pasted image 20230710191000.png

For more complex dataset, the perceptron can still find appropriate classifiers using this trick:

Pasted image 20230710191349.png
Pasted image 20230710191419.png