deepaugment/notebook.py
def record(self, trial_no, trial_hyperparams, sample_no, reward, history):
        """Records one complete training of child model

        Args:
            trial_no (int): no of trial (iteration) of training
            trial_hyperparams (list) : list of data augmentation hyperparameters used for training
            sample_no (int): sample no among training with same hyperparameters
            reward (float): reward is basically last n validation accuracy before overfitting
            history (dict): history returned by keras.model.fit()
        """
        new_df = pd.DataFrame(history)
        new_df["trial_no"] = trial_no

        new_df["A_aug1_type"] = trial_hyperparams[0]
        new_df["A_aug1_magnitude"] = trial_hyperparams[1]
        new_df["A_aug2_type"] = trial_hyperparams[2]
        new_df["A_aug2_magnitude"] = trial_hyperparams[3]

        new_df["B_aug1_type"] = trial_hyperparams[4]
        new_df["B_aug1_magnitude"] = trial_hyperparams[5]
        new_df["B_aug2_type"] = trial_hyperparams[6]
        new_df["B_aug2_magnitude"] = trial_hyperparams[7]

        new_df["C_aug1_type"] = trial_hyperparams[8]
        new_df["C_aug1_magnitude"] = trial_hyperparams[9]
        new_df["C_aug2_type"] = trial_hyperparams[10]
        new_df["C_aug2_magnitude"] = trial_hyperparams[11]

        new_df["D_aug1_type"] = trial_hyperparams[12]
        new_df["D_aug1_magnitude"] = trial_hyperparams[13]
        new_df["D_aug2_type"] = trial_hyperparams[14]
        new_df["D_aug2_magnitude"] = trial_hyperparams[15]

        new_df["E_aug1_type"] = trial_hyperparams[16]
        new_df["E_aug1_magnitude"] = trial_hyperparams[17]
        new_df["E_aug2_type"] = trial_hyperparams[18]
        new_df["E_aug2_magnitude"] = trial_hyperparams[19]

        new_df["sample_no"] = sample_no
        new_df["mean_late_val_acc"] = reward
        new_df = new_df.round(3)  # round all float values to 3 decimals after point
        new_df["epoch"] = np.arange(1, len(new_df) + 1)
        self.df = pd.concat([self.df, new_df])
Records one complete training of child model

        Args:
            trial_no (int): no of trial (iteration) of training
            trial_hyperparams (list) : list of data augmentation hyperparameters used for training
            sample_no (int): sample no among training with same hyperparameters
            reward (float): reward is basically last n validation accuracy before overfitting
            history (dict): history returned by keras.model.fit()
        
Records one complete training of child model
Records one complete training of child model
def record(self, trial_no, trial_hyperparams, sample_no, reward, history):
        new_df = pd.DataFrame(history)
        new_df["trial_no"] = trial_no
        new_df["A_aug1_type"] = trial_hyperparams[0]
        new_df["A_aug1_magnitude"] = trial_hyperparams[1]
        new_df["A_aug2_type"] = trial_hyperparams[2]
        new_df["A_aug2_magnitude"] = trial_hyperparams[3]
        new_df["B_aug1_type"] = trial_hyperparams[4]
        new_df["B_aug1_magnitude"] = trial_hyperparams[5]
        new_df["B_aug2_type"] = trial_hyperparams[6]
        new_df["B_aug2_magnitude"] = trial_hyperparams[7]
        new_df["C_aug1_type"] = trial_hyperparams[8]
        new_df["C_aug1_magnitude"] = trial_hyperparams[9]
        new_df["C_aug2_type"] = trial_hyperparams[10]
        new_df["C_aug2_magnitude"] = trial_hyperparams[11]
        new_df["D_aug1_type"] = trial_hyperparams[12]
        new_df["D_aug1_magnitude"] = trial_hyperparams[13]
        new_df["D_aug2_type"] = trial_hyperparams[14]
        new_df["D_aug2_magnitude"] = trial_hyperparams[15]
        new_df["E_aug1_type"] = trial_hyperparams[16]
        new_df["E_aug1_magnitude"] = trial_hyperparams[17]
        new_df["E_aug2_type"] = trial_hyperparams[18]
        new_df["E_aug2_magnitude"] = trial_hyperparams[19]
        new_df["sample_no"] = sample_no
        new_df["mean_late_val_acc"] = reward
        new_df = new_df.round(3)  
        new_df["epoch"] = np.arange(1, len(new_df) + 1)
        self.df = pd.concat([self.df, new_df])
def record ( self , trial_no , trial_hyperparams , sample_no , reward , history ) : new_df = pd . DataFrame ( history ) new_df [ "trial_no" ] = trial_no new_df [ "A_aug1_type" ] = trial_hyperparams [ 0 ] new_df [ "A_aug1_magnitude" ] = trial_hyperparams [ 1 ] new_df [ "A_aug2_type" ] = trial_hyperparams [ 2 ] new_df [ "A_aug2_magnitude" ] = trial_hyperparams [ 3 ] new_df [ "B_aug1_type" ] = trial_hyperparams [ 4 ] new_df [ "B_aug1_magnitude" ] = trial_hyperparams [ 5 ] new_df [ "B_aug2_type" ] = trial_hyperparams [ 6 ] new_df [ "B_aug2_magnitude" ] = trial_hyperparams [ 7 ] new_df [ "C_aug1_type" ] = trial_hyperparams [ 8 ] new_df [ "C_aug1_magnitude" ] = trial_hyperparams [ 9 ] new_df [ "C_aug2_type" ] = trial_hyperparams [ 10 ] new_df [ "C_aug2_magnitude" ] = trial_hyperparams [ 11 ] new_df [ "D_aug1_type" ] = trial_hyperparams [ 12 ] new_df [ "D_aug1_magnitude" ] = trial_hyperparams [ 13 ] new_df [ "D_aug2_type" ] = trial_hyperparams [ 14 ] new_df [ "D_aug2_magnitude" ] = trial_hyperparams [ 15 ] new_df [ "E_aug1_type" ] = trial_hyperparams [ 16 ] new_df [ "E_aug1_magnitude" ] = trial_hyperparams [ 17 ] new_df [ "E_aug2_type" ] = trial_hyperparams [ 18 ] new_df [ "E_aug2_magnitude" ] = trial_hyperparams [ 19 ] new_df [ "sample_no" ] = sample_no new_df [ "mean_late_val_acc" ] = reward new_df = new_df . round ( 3 ) new_df [ "epoch" ] = np . arange ( 1 , len ( new_df ) + 1 ) self . df = pd . concat ( [ self . df , new_df ] )
Records one complete training of child model
Records one complete training of child model
"""Records one complete training of child model

        Args:
            trial_no (int): no of trial (iteration) of training
            trial_hyperparams (list) : list of data augmentation hyperparameters used for training
            sample_no (int): sample no among training with same hyperparameters
            reward (float): reward is basically last n validation accuracy before overfitting
            history (dict): history returned by keras.model.fit()
        """ # round all float values to 3 decimals after point
self
trial_no
no of trial (iteration) of training
no of trial ( iteration ) of training
trial_hyperparams
list of data augmentation hyperparameters used for training
list of data augmentation hyperparameters used for training
sample_no
sample no among training with same hyperparameters
sample no among training with same hyperparameters
reward
reward is basically last n validation accuracy before overfitting
reward is basically last n validation accuracy before overfitting
history
history returned by keras.model.fit()
history returned by keras . model . fit ()