(self,
             model_to_tune=None,
             max_layers=10,
             min_layers=2,
             min_dense=32,
             max_dense=512,
             executions_per_trial=3,
             max_trials=1,
             generate_plots=True,
             activation='relu',
             loss='categorical_crossentropy',
             metrics='accuracy',
             patience=1,
             epochs=10,
             objective='val_accuracy',
             seed=42,
             directory='my_dir',
             verbose=0,
             test_size=0.2
             )
Calls the body of the tune identifier which is located in the supplementaries.py which then calls the appropriate tuner depending on the model
        :param model_to_tune: The model to tune.
        :param patience: Number of epochs with no improvement after which training will be stopped (int).
        :param dataset: The dataset being used in the tuner (str).
        :param models: The model dictionary (dict).
        :param generate_plots: Generate plots for the model (bool).
        :param max_layers: Maximum number of layers (int).
        :param min_layers: Minimum number of layers (int).
        :param min_dense: Minimum kernel density (int).
        :param max_dense: Maximum kernel density (int).
        :param executions_per_trial: Number of executions per trial (int).
        :param max_trials: Maximum number of trials
        :param activation: Activation Function (str).
        :param loss: Loss Function (str).
        :param metrics: Type of metrics function (str).
        :param epochs: Number of epochs (int).
        :param objective: Name of model metric to maximize/minimize (str).
        :param seed: Random seed (int).
        :param directory: Path to the directory (str).
        :param verbose: Printing the logging information (int).
        :param test_size: Size of the testing set (float).


        :return: an updated model and history stored in the models dictionary
Calls the body of the tune identifier which is located in the supplementaries.py which then calls the appropriate tuner depending on the model
        :param model_to_tune: The model to tune.
        :param patience: Number of epochs with no improvement after which training will be stopped (int).
        :param dataset: The dataset being used in the tuner (str).
        :param models: The model dictionary (dict).
        :param generate_plots: Generate plots for the model (bool).
        :param max_layers: Maximum number of layers (int).
        :param min_layers: Minimum number of layers (int).
        :param min_dense: Minimum kernel density (int).
        :param max_dense: Maximum kernel density (int).
        :param executions_per_trial: Number of executions per trial (int).
        :param max_trials: Maximum number of trials
        :param activation: Activation Function (str).
        :param loss: Loss Function (str).
        :param metrics: Type of metrics function (str).
        :param epochs: Number of epochs (int).
        :param objective: Name of model metric to maximize/minimize (str).
        :param seed: Random seed (int).
        :param directory: Path to the directory (str).
        :param verbose: Printing the logging information (int).
        :param test_size: Size of the testing set (float).
Calls the body of the tune identifier which is located in the supplementaries . py which then calls the appropriate tuner depending on the model : param model_to_tune : The model to tune . : param patience : Number of epochs with no improvement after which training will be stopped ( int ) . : param dataset : The dataset being used in the tuner ( str ) . : param models : The model dictionary ( dict ) . : param generate_plots : Generate plots for the model ( bool ) . : param max_layers : Maximum number of layers ( int ) . : param min_layers : Minimum number of layers ( int ) . : param min_dense : Minimum kernel density ( int ) . : param max_dense : Maximum kernel density ( int ) . : param executions_per_trial : Number of executions per trial ( int ) . : param max_trials : Maximum number of trials : param activation : Activation Function ( str ) . : param loss : Loss Function ( str ) . : param metrics : Type of metrics function ( str ) . : param epochs : Number of epochs ( int ) . : param objective : Name of model metric to maximize / minimize ( str ) . : param seed : Random seed ( int ) . : param directory : Path to the directory ( str ) . : param verbose : Printing the logging information ( int ) . : param test_size : Size of the testing set ( float ) .
def tune(self,
             model_to_tune=None,
             max_layers=10,
             min_layers=2,
             min_dense=32,
             max_dense=512,
             executions_per_trial=3,
             max_trials=1,
             generate_plots=True,
             activation='relu',
             loss='categorical_crossentropy',
             metrics='accuracy',
             patience=1,
             epochs=10,
             objective='val_accuracy',
             seed=42,
             directory='my_dir',
             verbose=0,
             test_size=0.2
             ):
        '''
        Calls the body of the tune identifier which is located in the supplementaries.py which then calls the appropriate tuner depending on the model
        :param model_to_tune: The model to tune.
        :param patience: Number of epochs with no improvement after which training will be stopped (int).
        :param dataset: The dataset being used in the tuner (str).
        :param models: The model dictionary (dict).
        :param generate_plots: Generate plots for the model (bool).
        :param max_layers: Maximum number of layers (int).
        :param min_layers: Minimum number of layers (int).
        :param min_dense: Minimum kernel density (int).
        :param max_dense: Maximum kernel density (int).
        :param executions_per_trial: Number of executions per trial (int).
        :param max_trials: Maximum number of trials
        :param activation: Activation Function (str).
        :param loss: Loss Function (str).
        :param metrics: Type of metrics function (str).
        :param epochs: Number of epochs (int).
        :param objective: Name of model metric to maximize/minimize (str).
        :param seed: Random seed (int).
        :param directory: Path to the directory (str).
        :param verbose: Printing the logging information (int).
        :param test_size: Size of the testing set (float).


        :return: an updated model and history stored in the models dictionary
        '''

        if model_to_tune is None:
            model_to_tune = self.latest_model

        self.models = tune_helper(
            model_to_tune=model_to_tune,
            patience=patience,
            dataset=self.dataset,
            models=self.models,
            generate_plots=generate_plots,
            max_layers=max_layers,
            min_layers=min_layers,
            min_dense=min_dense,
            max_dense=max_dense,
            executions_per_trial=executions_per_trial,
            max_trials=max_trials,
            activation=activation,
            loss=loss,
            metrics=metrics,
            epochs=epochs,
            objective=objective,
            seed=seed,
            directory=directory,
            verbose=verbose,
            test_size=test_size
        )
        clearLog()
def tune ( self , model_to_tune = None , max_layers = 10 , min_layers = 2 , min_dense = 32 , max_dense = 512 , executions_per_trial = 3 , max_trials = 1 , generate_plots = True , activation = 'relu' , loss = 'categorical_crossentropy' , metrics = 'accuracy' , patience = 1 , epochs = 10 , objective = 'val_accuracy' , seed = 42 , directory = 'my_dir' , verbose = 0 , test_size = 0.2 ) : if model_to_tune is None : model_to_tune = self . latest_model self . models = tune_helper ( model_to_tune = model_to_tune , patience = patience , dataset = self . dataset , models = self . models , generate_plots = generate_plots , max_layers = max_layers , min_layers = min_layers , min_dense = min_dense , max_dense = max_dense , executions_per_trial = executions_per_trial , max_trials = max_trials , activation = activation , loss = loss , metrics = metrics , epochs = epochs , objective = objective , seed = seed , directory = directory , verbose = verbose , test_size = test_size ) clearLog ( )