def debiasing_gbdd(equality_sets, vocab, vecs, t1_list, t2_list, a1_list, a2_list): v_b = gbdd.get_bias_direction(equality_sets, vocab, vecs) new_vecs = gbdd.debias_direction_linear(v_b, vecs) t1, t2, a1, a2 = calculation.vocabs_to_dicts(vocab, new_vecs, t1_list, t2_list, a1_list, a2_list) return new_vecs, t1, t2, a1, a2
def debiasing_gbdd_bam(equality_sets, vocab, vecs, t1_list, t2_list, a1_list, a2_list, aug1_list, aug2_list): v_b = gbdd.get_bias_direction(equality_sets, vocab, vecs) new_vecs = gbdd.debias_direction_linear(v_b, vecs) new_vecs, proj_matrix = bam.debias_proc(equality_sets, vocab, new_vecs) t1, t2, a1, a2, aug1, aug2 = calculation.vocabs_to_dicts( vocab, new_vecs, t1_list, t2_list, a1_list, a2_list, aug1_list, aug2_list) return new_vecs, t1, t2, a1, a2, aug1, aug2
def debiasing_gbdd_bam_full(equality_sets, vocab, vecs): v_b = gbdd.get_bias_direction(equality_sets, vocab, vecs) new_vecs = gbdd.debias_direction_linear(v_b, vecs) new_vecs, proj_matrix = bam.debias_proc(equality_sets, vocab, new_vecs) return new_vecs
def debiasing_gbdd_full(equality_sets, vocab, vecs): v_b = gbdd.get_bias_direction(equality_sets, vocab, vecs) new_vecs = gbdd.debias_direction_linear(v_b, vecs) return new_vecs