def debiasing_bam(equality_sets, vocab, vecs, t1_list, t2_list, a1_list, a2_list, aug1_list, aug2_list): new_vecs, proj_mat = bam.debias_proc(equality_sets, vocab, 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(equality_sets, vocab, vecs, t1_list, t2_list, a1_list, a2_list): v_b = gbdd.get_bias_direction(equality_sets, vecs, vocab) new_vocab, new_vecs = gbdd.debias_direction_linear(v_b, vecs) new_vocab, new_vecs = bam.debias_proc(equality_sets, new_vocab, new_vecs) t1, t2, a1, a2 = calculation.vocabs_to_dicts(new_vocab, new_vecs, t1_list, t2_list, a1_list, a2_list) return new_vecs, t1, t2, a1, a2
def debiasing_bam_gbdd(equality_sets, vocab, vecs, t1_list, t2_list, a1_list, a2_list, aug1_list, aug2_list): new_vecs, proj_matrix = bam.debias_proc(equality_sets, vocab, vecs) v_b = gbdd.get_bias_direction(equality_sets, vocab, new_vecs) new_vecs = gbdd.debias_direction_linear(v_b, 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_bam_full(equality_sets, vocab, vecs): new_vecs, proj_mat = bam.debias_proc(equality_sets, vocab, vecs) return new_vecs