Commit 4b07087f authored by Anthony Larcher's avatar Anthony Larcher
Browse files

add loggings

parent 00ca52c6
......@@ -44,7 +44,7 @@ import yaml
from .utils import add_show_in_id
from .utils import allies_write_diar
from .utils import customize_threshiold
from .utils import customize_threshold
from .utils import keep_recurring_speakers
from .utils import remove_show_from_id
......@@ -307,7 +307,7 @@ def perform_second_seg(model,
# Calibration
if scores.modelset.shape[0] > 2:
th_w = customize_threshiold(scores, th_w)
th_w = customize_threshold(scores, th_w)
# Run HAC clustering
new_diar, cluster_dict, merge = s4d.clustering.hac_iv.hac_iv(initial_diar,
......
......@@ -31,7 +31,7 @@ Copyright 2020-2021 Anthony Larcher, Meysam Shamsi & Yevhenii Propkopalo
import copy
import numpy
import sidekit
import sklearn
import sklearn.mixture
import s4d
from ..user_simulation import Reference
......@@ -297,14 +297,13 @@ def rename_models(within_iv, within_diar, existing_models):
for idx, mod in enumerate(within_iv.modelset):
within_iv.modelset[idx] = within_models[mod]
for idx, seg in enumerate(within_diar.segments):
within_diar.segments[idx]['cluster'] = within_models[seg['cluster']]
return within_iv, within_diar
def customize_threshiold(scores, th_w):
def customize_threshold(scores, th_w):
"""
Estimate a bi-Gaussian distribution to fit the input scores and shift the input threshold
to match the score distribution
......
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