This commit is contained in:
Nicolas Mowen 2026-04-24 09:02:36 -06:00
parent ebbf4f2cd6
commit 14ab9abcc1
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ def build_class_mean(
arr = np.stack(embs, axis=0) arr = np.stack(embs, axis=0)
if len(arr) < 5: if len(arr) < 5:
return stats.trim_mean(arr, trim, axis=0) return np.asarray(stats.trim_mean(arr, trim, axis=0))
keep = np.ones(len(arr), dtype=bool) keep = np.ones(len(arr), dtype=bool)
floor = max(5, int(np.ceil(min_keep_frac * len(arr)))) floor = max(5, int(np.ceil(min_keep_frac * len(arr))))
@ -185,7 +185,7 @@ def build_class_mean(
f"Vector-wise outlier filter dropped {dropped}/{len(arr)} embeddings" f"Vector-wise outlier filter dropped {dropped}/{len(arr)} embeddings"
) )
return stats.trim_mean(arr[keep], trim, axis=0) return np.asarray(stats.trim_mean(arr[keep], trim, axis=0))
def similarity_to_confidence( def similarity_to_confidence(