From 95278c854d30390fb0e300af2edea310ff128bfe Mon Sep 17 00:00:00 2001 From: Chris Proctor Date: Mon, 8 Jun 2026 15:37:17 -0400 Subject: [PATCH] Clean up features model --- models/features.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/models/features.py b/models/features.py index ebef8c8..5fd9489 100644 --- a/models/features.py +++ b/models/features.py @@ -11,26 +11,10 @@ class FeatureExtractor: return [self.extract_features(pixels) for pixels in X] def extract_features(self, pixels): - """Extract hand-designed features from a 784-pixel image. - - Add at least two features of your own. Each feature should be a - number computed from the pixel array. - - Arguments: - pixels: numpy array of 784 float values in [0, 1] - - Returns: - dict: feature name -> numerical value - """ img = pixels.reshape(28, 28) return { "mean_brightness": float(pixels.mean()), "top_half_brightness": float(img[:14, :].mean()), - "bottom_half_brightness": float(img[14:, :].mean()), - # ---- Add your features here ---- - # "left_half_brightness": float(img[:, :14].mean()), - # "right_half_brightness": float(img[:, 14:].mean()), - # "num_bright_pixels": float((pixels > 0.5).sum()), }