Commit f012c3b4 authored by Anthony Larcher's avatar Anthony Larcher
Browse files

cleaning

parent 4b07087f
......@@ -310,10 +310,12 @@ def perform_second_seg(model,
th_w = customize_threshold(scores, th_w)
# Run HAC clustering
print(f"Avant HAC : len(diar)= {len(initial_diar.unique('cluster'))}, min et max scores: {scores.scoremat.min()} et {scores.scoremat.max()}, th = {th_w}")
new_diar, cluster_dict, merge = s4d.clustering.hac_iv.hac_iv(initial_diar,
scores,
threshold=th_w,
method=hac_method)
print(f"Apres HAC : len(diar)= {len(new_diar.unique('cluster'))}, min et max scores: {scores.scoremat.min()} et {scores.scoremat.max()}, th = {th_w}")
# Update the model names of i-vector
# reverse the cluster dict:
......
......@@ -322,4 +322,4 @@ def customize_threshold(scores, th_w):
th_w += (-0.5 * (numpy.log(gmm.weights_[:, None] ** 2 / var) - means ** 2 / var).dot([1, -1]) / (
means / var).dot([1, -1]))[0]
return th_w
\ No newline at end of file
return th_w
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment