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.
Installation and Setupβ
- Install the Python package with
pip install scikit-learn
Vector Storeβ
SKLearnVectorStore
provides a simple wrapper around the nearest neighbor implementation in the
scikit-learn package, allowing you to use it as a vectorstore.
To import this vectorstore:
from langchain_community.vectorstores import SKLearnVectorStore
API Reference:
For a more detailed walkthrough of the SKLearnVectorStore wrapper, see this notebook.