#NEWLINE# def generate_gaussians( name , mean_std_nums , dim , min_pts , max_pts ) : #NEWLINE# #INDENT# bags = [ ] #NEWLINE# categories = [ ] #NEWLINE# for ( mean , std , num ) in mean_std_nums : #NEWLINE# #INDENT# cat_name = 'mean{}-std{}' . format ( mean , std ) #NEWLINE# for x in range ( num ) : #NEWLINE# #INDENT# n_pts = np . random . randint ( min_pts , ( max_pts + 1 ) ) #NEWLINE# feats = np . random . normal ( mean , std , size = ( n_pts , dim ) ) #NEWLINE# bags . append ( feats ) #NEWLINE# categories . append ( cat_name ) #NEWLINE# #UNINDENT# #UNINDENT# features = Features ( bags , categories = categories ) #NEWLINE# features . save_as_hdf5 ( 'data/{}.h5' . format ( name ) )