# SVMRetriever

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/retrievers/svm/SVMRetriever)

`SVM` retriever.

Largely based on
https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.ipynb

## Signature

```python
SVMRetriever()
```

## Extends

- `BaseRetriever`

## Properties

- `embeddings`
- `index`
- `texts`
- `metadatas`
- `k`
- `relevancy_threshold`
- `model_config`

## Methods

- [`from_texts()`](https://reference.langchain.com/python/langchain-community/retrievers/svm/SVMRetriever/from_texts)
- [`from_documents()`](https://reference.langchain.com/python/langchain-community/retrievers/svm/SVMRetriever/from_documents)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/retrievers/svm.py#L29)