np Xb = np.random.rand(10000, 128).astype('float32') Xq = np.random.rand(5, 128).astype('float32') index = faiss.IndexFlatL2(Xb.shape[1]) index.add(Xb) epsilon = 15.0 ctable = lotf.CutoffTable(X=Xb, index=index, epsilon=epsilon) candidate_k = 300 candidate_dists, candidate_ids = index.search(Xq, candidate_k) final_k = 100 diverse_dists, diverse_ids = ctable.filter( dists=candidate_dists, ids=candidate_ids, final_k=final_k ) faissのインデックス構築 前処理:足切り表構築 faissの探索 faissの探索結果 を多様化 ➢ 探索の研究は「ツールの提供」 ➢ オレオレAPIではなくデファクトを大事に