fast_vector_similarity

高效能向量相似度函式庫,以 Rust 開發並提供 Python 綁定:Spearman、Kendall、距離相關、Jensen-Shannon、Hoeffding's D 及自助法

fast_vector_similarity 是什麼?

高效能向量相似度函式庫,以 Rust 開發並提供 Python 綁定:Spearman、Kendall、距離相關、Jensen-Shannon、Hoeffding's D 及自助法信賴區間

fast_vector_similarity 概覽

這是什麼

Fast Vector Similarity Library 是一個高效能的 Rust 向量相似度計算工具,並提供 Python 綁定,可無縫整合至 Python 工作流程,適用於資料分析、機器學習與統計任務。

主要功能

  • 實作六種相似度度量:Spearman 等級相關係數、Kendall tau 等級相關係數、近似距離相關、Jensen-Shannon 相依度量、Hoeffding's D 度量與正規化互資訊 - 包含拔靴法(bootstrapping)功能,可估計相似度度量的分佈並提升結果信心 - 效能最佳化:使用 rayon crate 進行平行處理、採用高效演算法(如合併排序計算逆序數)、透過 ndarray crate 進行向量化運算 - 內建基準測試套件,驗證數值正確性並量測效能提升 - Python 綁定提供兩個主要函式:py_compute_vector_similarity_stats 與 py_compute_bootstrapped_similarity_stats,回傳 JSON 格式結果

使用情境

  • 需要比較向量的資料分析與統計任務 - 機器學習工作流程,例如分析大型語言模型(如 Llama2)的文字嵌入向量 - 計算高維度嵌入向量(如 4096 維)之間的相似度,並產生相似向量排名

快速開始

bash pip install fast_vector_similarity 若使用 Rust,請將此函式庫加入 Cargo.toml 檔案。詳細資訊請參閱儲存庫 README。

授權與價格

開放原始碼(未明確標示授權條款)。

內容整理自該專案公開的 README 與儲存庫資訊。

將此徽章加入你的 README

Featured on YunoDB 徽章樣式與說明

你是這個專案的維護者嗎?展示它已收錄於 YunoDB。

Markdown[![Featured on YunoDB](https://yunodb.com/badge/dicklesworthstonefast-vector-similarity.svg)](https://yunodb.com/tools/dicklesworthstonefast-vector-similarity?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/dicklesworthstonefast-vector-similarity?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/dicklesworthstonefast-vector-similarity.svg" alt="Featured on YunoDB" height="20"></a>