data/loader.py
def load_Particle(normalize=False, batch_size=1024, rand_seed=0, test_ratio=0.2):
    """
    The function to load the Particle dataset
    :param: normalize (default False): whether normalize or not 
    """
    # Load the Particle dataset
    print("Loading Particle")

    # Read the training/validation data
    data_x = pd.read_csv(os.path.join('Nano', 'data_g.csv'), header=None).astype('float32').values
    data_y = pd.read_csv(os.path.join('Nano', 'data_s.csv'), header=None).astype('float32').values
    # Read the test data
    test_x = pd.read_csv(os.path.join('Nano', 'testset', 'test_g.csv'), header=None).astype('float32').values
    test_y = pd.read_csv(os.path.join('Nano', 'testset', 'test_s.csv'), header=None).astype('float32').values

    # Normalize the dataset (with the same normalization with training and testing)
    if normalize:
        data_x = (data_x - 50) / 20.
        test_x = (test_x - 50) / 20.

    # Print the shapes 
    print("shape of data_x", np.shape(data_x))
    print("shape of data_y", np.shape(data_y))
    print("shape of test_x", np.shape(test_x))
    print("shape of test_y", np.shape(test_y))
    
    # Put the training and testing 
    train_loader, test_loader = get_data_into_loaders(data_x, data_y, batch_size, 
                        SimulatedDataSet_regress, rand_seed=rand_seed, test_ratio=test_ratio)

    print("Finish loading Particle dataset")
    return train_loader, test_loader, test_x, test_y

    The function to load the Particle dataset
    :param: normalize (default False): whether normalize or not 
    
The function to load the Particle dataset
:param: normalize (default False): whether normalize or not
The function to load the Particle dataset : param : normalize ( default False ) : whether normalize or not
def load_Particle(normalize=False, batch_size=1024, rand_seed=0, test_ratio=0.2):
    print("Loading Particle")
    data_x = pd.read_csv(os.path.join('Nano', 'data_g.csv'), header=None).astype('float32').values
    data_y = pd.read_csv(os.path.join('Nano', 'data_s.csv'), header=None).astype('float32').values
    test_x = pd.read_csv(os.path.join('Nano', 'testset', 'test_g.csv'), header=None).astype('float32').values
    test_y = pd.read_csv(os.path.join('Nano', 'testset', 'test_s.csv'), header=None).astype('float32').values
    if normalize:
        data_x = (data_x - 50) / 20.
        test_x = (test_x - 50) / 20.
    print("shape of data_x", np.shape(data_x))
    print("shape of data_y", np.shape(data_y))
    print("shape of test_x", np.shape(test_x))
    print("shape of test_y", np.shape(test_y))
    train_loader, test_loader = get_data_into_loaders(data_x, data_y, batch_size, 
                        SimulatedDataSet_regress, rand_seed=rand_seed, test_ratio=test_ratio)
    print("Finish loading Particle dataset")
    return train_loader, test_loader, test_x, test_y
def load_Particle ( normalize = False , batch_size = 1024 , rand_seed = 0 , test_ratio = 0.2 ) : print ( "Loading Particle" ) data_x = pd . read_csv ( os . path . join ( 'Nano' , 'data_g.csv' ) , header = None ) . astype ( 'float32' ) . values data_y = pd . read_csv ( os . path . join ( 'Nano' , 'data_s.csv' ) , header = None ) . astype ( 'float32' ) . values test_x = pd . read_csv ( os . path . join ( 'Nano' , 'testset' , 'test_g.csv' ) , header = None ) . astype ( 'float32' ) . values test_y = pd . read_csv ( os . path . join ( 'Nano' , 'testset' , 'test_s.csv' ) , header = None ) . astype ( 'float32' ) . values if normalize : data_x = ( data_x - 50 ) / 20. test_x = ( test_x - 50 ) / 20. print ( "shape of data_x" , np . shape ( data_x ) ) print ( "shape of data_y" , np . shape ( data_y ) ) print ( "shape of test_x" , np . shape ( test_x ) ) print ( "shape of test_y" , np . shape ( test_y ) ) train_loader , test_loader = get_data_into_loaders ( data_x , data_y , batch_size , SimulatedDataSet_regress , rand_seed = rand_seed , test_ratio = test_ratio ) print ( "Finish loading Particle dataset" ) return train_loader , test_loader , test_x , test_y
The function to load the Particle dataset
:param: normalize (default False): whether normalize or not
The function to load the Particle dataset : param : normalize ( default False ) : whether normalize or not
"""
    The function to load the Particle dataset
    :param: normalize (default False): whether normalize or not 
    """ # Load the Particle dataset
 # Read the training/validation data
 # Read the test data
 # Normalize the dataset (with the same normalization with training and testing)
 # Print the shapes 
 # Put the training and testing 

normalize
batch_size
rand_seed
test_ratio