Tabular Classification Showdown
Two noisy 2D blobs, one majority class. Get more labels right than always guessing the majority.
Your goal
Beat the majority class baseline — score higher accuracy than 0.6667 on the hidden 30 test rows. The first winning run records 20 points in this browser.
- Train
- 60 × 2
- Hidden test
- 30 rows
- Metric
- accuracy · higher
- Baseline score
- 0.6667
Data
Two overlapping square blobs in 2D. Class 1 is centred at (0.9, 0.45) and class 0 at (-0.9, -0.45); each coordinate is the centre plus uniform noise in [-1.5, 1.5]. Class 1 lands on every third row. 60 train rows and 30 hidden test rows, generated with an LCG (seed 21: state = (1664525 * state + 1013904223) mod 2^32).
- class 0
- class 1
Each dot is one training row: feature 1 against feature 2, coloured by class.
Method & theory
read before you submitA classifier only earns its name when it beats class frequency. This task starts from the majority-class floor and asks you to find the boundary between two noisy blobs.
The two overlapping blobs
There are 60 training rows and 30 hidden rows. Class 1 is centred at (0.9, 0.45) and class 0 at (-0.9, -0.45), and each coordinate is the centre plus independent uniform noise in [-1.5, 1.5] (standard deviation 1.5/sqrt(3), about 0.87 per axis). Because the noise spread is wider than the 1.8 gap between centres, the blobs overlap and no boundary is perfect. Class 1 lands on every third row by construction, so the training split holds exactly 20 ones, and the hidden split holds 10 of its 30 rows as class 1.
What the baseline actually scores
Predicting the majority label scores 20/30 = 0.6667 accuracy on the hidden rows, which is exactly the recorded baseline. The comparison is strict - a score must be greater than the baseline plus 1e-9 to count as beaten - so a tie is a loss. The first score that wins is 21 of 30 rows correct, or 0.70 accuracy.
The boundary that wins
Standardize both columns with the training means and standard deviations, then fit logistic regression: p = sigmoid(w . z + b). The log-loss gradient for each row is (p - y) times the standardized feature vector, plus (p - y) for the bias, averaged over the 60 rows. The class centres differ by (1.8, 0.9), so the useful boundary runs roughly perpendicular to that direction - about 2x + y = 0 in raw coordinates - and a few hundred gradient steps at learning rate 0.5 reach 28/30 = 0.933 on a quick internal run.
Reading the score honestly
Metric is accuracy, higher is better, and the hidden split is fresh rows from the same generator, not a reshuffle of the training rows. Because the blobs overlap, a model that pushes training accuracy past roughly 0.95 is memorizing individual points; watch the loss flatten instead of chasing 100% on the 60 rows you can see.
Pitfalls
- Predicting the majority class and treating 0.6667 as a pass. The check is strict, so a tie scores as a loss and only 21 or more correct hidden rows wins.
- Standardizing with the test rows' own means and standard deviations instead of the training split's. The transform must be learned on train and replayed unchanged on test, or the two sets land on different scales.
- Forgetting the bias term, which forces the boundary through the origin of the standardized space. The blobs are centred near the origin, so it can look harmless while costing a couple of hidden points.
Takeaway. Two overlapping blobs are about as easy as classification gets, but the floor is class frequency, the ruler is the hidden 30 rows, and 21/30 is the first score that actually wins.
Hint
Standardize both features and fit logistic regression with a few hundred steps of gradient descent. The blobs are nearly linearly separable, so even a plain linear boundary clears the majority baseline.