Skip to main content
Open on GitHub

scikit-learn

scikit-learn is an open-source collection of machine learning algorithms, including some implementations of the k nearest neighbors. SKLearnVectorStore wraps this implementation and adds the possibility to persist the vector store in json, bson (binary json) or Apache Parquet format.

安装与设置

  • 使用 pip install scikit-learn 安装 Python 包

向量存储

SKLearnVectorStore 提供了对 scikit-learn 包中最近邻实现的简单封装,允许您将其用作向量存储。

要导入此向量存储:

from langchain_community.vectorstores import SKLearnVectorStore
API 参考:SKLearnVectorStore

有关 SKLearnVectorStore 包装器的更详细演练,请参阅 此笔记本

检索器

Support vector machines (SVMs) 是用于分类、回归和异常检测的监督学习方法。

查看一个 使用示例

from langchain_community.retrievers import SVMRetriever
API 参考:SVMRetriever