def __new__(cls, *args, **kwargs): cls.name = "rf-robustness" attacks = ['RBA_Approx_RF_100'] invert_ds_eps = {} for k, v in ds_eps.items(): invert_ds_eps.setdefault(v, []).append( auto_var.get_var_shown_name("dataset", k)) grid_params = [] for ds in tree_datasets: v, k = [ds], ds_eps[auto_var.get_var_shown_name("dataset", ds)] models = [ 'random_forest_100_d5', f'adv_rf_100_{k}_d5', f'robust_rf_100_{k}_d5', f'advPruning_rf_100_{k}_d5', ] grid_params.append({ 'model': models, 'ord': [ATTACK_NORM], 'dataset': v, 'attack': attacks, 'random_seed': random_seed, }) cls.grid_params = grid_params return RobustExperiments.__new__(cls, *args, **kwargs)
def __new__(cls, *args, **kwargs): cls.name = "dt-robustness" attacks = ['pgd'] invert_ds_eps = {} for k, v in ds_eps.items(): invert_ds_eps.setdefault(v, []).append( auto_var.get_var_shown_name("dataset", k)) grid_params = [] for ds in tree_datasets: v, k = [ds], ds_eps[auto_var.get_var_shown_name("dataset", ds)] models = [ 'logistic_regression', f'adv_logistic_regression_{k}', f'advPruning_logistic_regression_{k}', ] grid_params.append({ 'model': models, 'ord': [ATTACK_NORM], 'dataset': v, 'attack': attacks, 'random_seed': random_seed, }) cls.grid_params = grid_params return RobustExperiments.__new__(cls, *args, **kwargs)
def __new__(cls, *args, **kwargs): cls.name = "dt-robustness" attacks = ['pgd'] grid_params = [] for ds in tree_datasets: v, k = [ds], ds_eps[auto_var.get_var_shown_name("dataset", ds)] models = ['mlp', f'adv_mlp_{k}', f'advPruning_mlp_{k}'] grid_params.append({ 'model': models, 'ord': [ATTACK_NORM], 'dataset': v, 'attack': attacks, 'random_seed': random_seed, }) cls.grid_params = grid_params return RobustExperiments.__new__(cls, *args, **kwargs)
def __new__(cls, *args, **kwargs): cls.name = "rf-robustness_l2" attacks = ['RBA_Approx_KNN_k3_50'] grid_params = [] for ds in datasets: v, k = [ds], ds_eps[auto_var.get_var_shown_name("dataset", ds)] models = [ 'knn3', f'adv_nn_k3_{k}', f'robustv2_nn_k3_{k}', f'advPruning_nn_k3_{k}', ] grid_params.append({ 'model': models, 'ord': [ATTACK_NORM], 'dataset': v, 'attack': attacks, 'random_seed': random_seed, }) cls.grid_params = grid_params return RobustExperiments.__new__(cls, *args, **kwargs)