ContentsFoundations to FrontierBezhig

graduate_code/starters/data.py

All lab code. Download this file.

# Exercise scaffold. Reference implementation is in a separate directory.
"""G15: group-disjoint splits, training-only scaling, and bounded Lloyd clustering."""
import math
import random

def split_groups(groups, seed=21):
    raise NotImplementedError('Implement this contract from the book.')

def matrix(X):
    raise NotImplementedError('Implement this contract from the book.')

def fit_scaler(X):
    raise NotImplementedError('Implement this contract from the book.')

def transform(X, scaler):
    raise NotImplementedError('Implement this contract from the book.')

def kmeans(X, initial, steps=50):
    raise NotImplementedError('Implement this contract from the book.')

def fixture(seed=21, n_groups=30):
    raise NotImplementedError('Implement this contract from the book.')