- Create python directory with data/, model/ subdirectories - Implement LinearEval(61072->1) model - Add config, constants, feature_extractor - Add tests with 4 passing test cases
12 lines
324 B
Python
12 lines
324 B
Python
"""Data preprocessing and cleaning"""
|
|
|
|
import numpy as np
|
|
|
|
|
|
def normalize_features(features: np.ndarray) -> np.ndarray:
|
|
"""Normalize features to zero mean, unit variance"""
|
|
mean = features.mean(axis=0)
|
|
std = features.std(axis=0)
|
|
std[std == 0] = 1 # Avoid division by zero
|
|
return (features - mean) / std
|