Example #1
0
         deltaX, grid_area_number, cluster_num, k_threshold,
         l_threshold, df_test, grid_list, area_reducibility,
         grid_area_dict, area_grid_dict, area_grid_colrow_dict,
         area_grid_rowcol_dict, grid_colrow, grid_rowcol, df_train,
         df_test_rec_items, pp, method)
 elif method == 'YGen':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.YGen(
         df_train, df_test, df_test_rec_items, cluster_num,
         grid_area_number, grid_list, area_grid_dict,
         grid_area_dict, l_threshold, k_threshold,
         area_reducibility, area_grid_rowcol_dict,
         area_grid_colrow_dict, grid_rowcol, grid_colrow, deltaX,
         pp, method)
 elif method == 'XObf':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.XObf(
         df_train, df_test, deltaX, cluster_num, grid_area_number,
         grid_list, area_grid_dict, pp, method)
 elif method == 'PrivCheck':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.PrivCheck(
         df_train, df_test, df_test_rec_items, grid_area_dict,
         area_grid_dict, grid_list, cluster_num, grid_area_number,
         deltaX, pp)
 elif method == 'DP':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.differential_privacy(
         df_train, df_test, grid_area_dict, df_test_rec_items, beta)
 elif method == 'Frapp':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.Frapp(
         df_train, df_test, grid_area_dict, df_test_rec_items,
         gamma, pp)
 elif method == 'Random':
     X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.Random(
Example #2
0
            if method == 'HyObscure':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.HyObscure(
                    df_train, df_test, df_test_rec_items, df_item_age_uid,
                    age_group_dict, group_age_dict, cluster_num,
                    age_group_number, age_list, deltaX, k_threshold,
                    l_threshold, pp)
            elif method == 'YGen':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.YGen(
                    df_train, df_test, df_test_rec_items, df_item_age_uid,
                    age_group_number, cluster_num, deltaX, age_list,
                    age_group_dict, group_age_dict, k_threshold, l_threshold,
                    pp)
            elif method == 'XObf':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.XObf(
                    df_train, df_test, age_group_number, cluster_num, deltaX,
                    age_list, group_age_dict, pp)
            elif method == 'PrivCheck':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.PrivCheck(
                    df_train, df_test, df_test_rec_items, age_group_number,
                    cluster_num, deltaX, age_list, age_group_dict,
                    group_age_dict, pp)
            elif method == 'DP':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.differential_privacy(
                    df_train, df_test, df_test_rec_items, age_group_dict, beta)
            elif method == 'Frapp':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.Frapp(
                    df_train, df_test, df_test_rec_items, age_group_dict,
                    gamma, pp)
            elif method == 'Random':
                X_obf_dict, X_ori, model_rf, model_xgb = obfuscations.Random(
Example #3
0
            df_train = df_cluster.drop(items_test, axis=1)
            df_test = df_cluster.drop(items_train, axis=1)

            if method == 'HyObscure':
                X_obf_dict, X_ori = obfuscations.HyObscure(
                    cluster_num, age_group_number, age_group_dict,
                    group_age_dict, age_list, deltaX, k_threshold, l_threshold,
                    df_train, df_item_age_uid, pp)
            elif method == 'YGen':
                X_obf_dict, X_ori = obfuscations.YGen(
                    df_train, age_group_number, cluster_num, age_list,
                    age_group_dict, group_age_dict, df_item_age_uid, deltaX,
                    k_threshold, l_threshold, pp)
            elif method == 'XObf':
                X_obf_dict, X_ori = obfuscations.XObf(deltaX, cluster_num,
                                                      age_group_number,
                                                      age_list, group_age_dict,
                                                      df_train, pp)
            elif method == 'PrivCheck':
                X_obf_dict, X_ori = obfuscations.PrivCheck(
                    deltaX, cluster_num, age_group_number, df_cluster,
                    df_train, age_list, age_group_dict, group_age_dict, pp)
            elif method == 'DP':
                X_obf_dict, X_ori = obfuscations.differential_privacy(
                    df_train, age_group_dict, beta)
            elif method == 'Frapp':
                X_obf_dict, X_ori = obfuscations.Frapp(df_train, df_test,
                                                       age_group_dict, gamma)
            elif method == 'Random':
                X_obf_dict, X_ori = obfuscations.Random(
                    df_train, age_group_dict, p_rand)
            elif method == 'Sim':