def flatten_dataset(features):
    """
    Flattens a multidimensional dataset down to 1 dimension to feed into SVM.
    """
    nsamples, nx, ny = features.shape
    reshaped_data = features.reshape((nsamples, nx*ny))
    return reshaped_data