Learning from data
01 / Classical machine learning

Patterns, not instructions.

Give a model examples, and it learns a rule. Change the problem and see where a simple boundary succeeds or fails.

Train a classical classifier

Run, pause and inspect each epoch
0epoch
train loss
validation accuracy
Decision surface−1+1Feature x₁Feature x₂+1−110

Inspect a point. Color = predicted probability; shape = observed class.

The initial surface is untrained. Run the experiment to compute the full trajectory.

Class 0Class 1 / train lossValidation loss
Ready to train

The nine, side by side

Pick one, then watch it train below

Nine classifiers, one plane

Pick a family, then watch it train
Feature x₁ −1+10.51Epoch 0150TrainingValidation
100%training accuracy
98%validation accuracy
0.124log loss
Step through the trainingEpoch 150
Class 1Class 0Validation
Epoch 150 / 150
01 / The intuition

In plain language

Imagine sorting observations into two groups. Training finds that reduce mistakes on examples whose are already known.

02 / Under the hood

The technical idea

This experiment fits logistic regression to two numerical inputs using and descent. Its probability boundary at 0.5 is a straight line. requires a nonlinear representation.

03 / The biology connection

From data to proteins

A classical protein model might use charge, length or amino-acid composition as . A random forest or a kernel SVM can also model nonlinear relationships without being a deep network.

Look deeper: mathematics, methods & limitations

p(y=1|x) = σ(w·x + b)

For each example, compute a probability, measure against its , differentiate the and update the . One epoch here is one pass over the entire fixed training set.

The visual uses 100 synthetic training points and 60 independently generated validation points. Both are sampled from a chosen rule. The boundary heatmap shows predicted class probability; the symbols show training . Validation accuracy is separate from training .

A random split of highly similar proteins can leak family information between sets. For biological studies, consider sequence-identity or family-aware splits, an untouched test set, class imbalance and appropriate baselines. Accuracy alone can be misleading.

Go to the original research

A moment to connect the dots

Why can logistic regression struggle on XOR?