CMSC_828C_Project1/bayes.py
def prep_data():
    """
    This function preps the dataset for further application
    :return: normalised test and train data
    """
    data_set = Dataset()
    x_train, y_train = data_set.load("../data/fashion", "train")
    x_test, y_test = data_set.load("../data/fashion", "t10k")

    shuffle_index = np.random.RandomState(seed=42).permutation(60000)
    x_train, y_train = x_train[shuffle_index], y_train[shuffle_index]
    
    x_train_norm = data_set.normalize(x_train)
    x_test_norm = data_set.normalize(x_test)

    return x_train_norm, x_test_norm, y_train, y_test

    This function preps the dataset for further application
    :return: normalised test and train data
    
This function preps the dataset for further application
This function preps the dataset for further application
def prep_data():
    data_set = Dataset()
    x_train, y_train = data_set.load("../data/fashion", "train")
    x_test, y_test = data_set.load("../data/fashion", "t10k")
    shuffle_index = np.random.RandomState(seed=42).permutation(60000)
    x_train, y_train = x_train[shuffle_index], y_train[shuffle_index]
    x_train_norm = data_set.normalize(x_train)
    x_test_norm = data_set.normalize(x_test)
    return x_train_norm, x_test_norm, y_train, y_test
def prep_data ( ) : data_set = Dataset ( ) x_train , y_train = data_set . load ( "../data/fashion" , "train" ) x_test , y_test = data_set . load ( "../data/fashion" , "t10k" ) shuffle_index = np . random . RandomState ( seed = 42 ) . permutation ( 60000 ) x_train , y_train = x_train [ shuffle_index ] , y_train [ shuffle_index ] x_train_norm = data_set . normalize ( x_train ) x_test_norm = data_set . normalize ( x_test ) return x_train_norm , x_test_norm , y_train , y_test
This function preps the dataset for further application
This function preps the dataset for further application
"""
    This function preps the dataset for further application
    :return: normalised test and train data
    """
normalised test and train data
normalised test and train data