Name | PyWaveSync JSON |
Version |
0.1.1
JSON |
| download |
home_page | https://github.com/guyfloki/wavesync |
Summary | WaveSync is a Python library for nuanced, nonlinear, and rapid analysis of vectors and embeddings, tailored for RAG systems. |
upload_time | 2024-03-02 17:38:02 |
maintainer | |
docs_url | None |
author | Liubomyr Horbatko |
requires_python | |
license | |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
WaveSync is a Python library crafted for the analysis of vectors and embeddings, specifically tailored for use in Retrieval-Augmented Generation (RAG) systems.
Unlike traditional methods that rely on cosine similarity for embeddings comparison, WaveSync introduces a novel approach by employing time series decomposition and phase analysis. This method enables the library to perform a more nuanced, nonlinear, and rapid analysis of embeddings, allowing for the identification of deeper similarities and differences beyond what cosine similarity can offer.
## Installation
### Required Libraries
Before installing WaveSync, you have to ensure the following libraries are already installed on your system:

```bash
pip install numpy
```

```bash
pip install PyWavelets
```
### Installation WaveSync
```bash
pip install PyWaveSync
```
## Usage
For quick start:
```python
from wavesync.wavesync import WaveSync
import numpy as np
vec = np.random.rand(1024)
vecs = np.random.rand(10, 1024)
ws = WaveSync()
wavesync_scores = ws.compare(vec, vecs)
print(wavesync_scores)
```
If you want to see how the algorithm works on different types of vectors:
```python
from wavesync.wavesync import WaveSync
import numpy as np
ws = WaveSync()
np.random.seed(42)
vec = np.random.rand(1024)
similar_vecs = [vec + np.random.normal(0, 0.01, len(vec)) for _ in range(5)]
dissimilar_vecs = [np.random.rand(len(vec)) for _ in range(5)]
vec_a = np.random.rand(1024)
vec_b = -vec_a # Coordinate-wise opposite of vec_a
# Test with similar, dissimilar, and opposite vectors
wavesync_similar_scores = ws.compare(vec, similar_vecs)
wavesync_dissimilar_scores = ws.compare(vec, dissimilar_vecs)
wavesync_opposite_scores = ws.compare(vec_a, [vec_b])
print(wavesync_similar_scores, wavesync_dissimilar_scores, wavesync_opposite_scores)
```
## Learn More
For those interested in diving deeper into how the WaveSync algorithm works, detailed explanations and use cases can be found on the following platforms:
- **English** (**Will be available in approximately 3 days**): Check out our articles on [Medium](https://medium.com) for an in-depth look at WaveSync.
- **Russian** (**Will be available in approximately 2 days**): For Russian speakers, detailed discussions can be found on [Habr](https://habr.com).
## Community and Contact
I'm looking forward to collaborating with anyone interested in improving WaveSync. Your feedback, suggestions, and contributions are always welcome.
### How to Contribute
- **Contributions**: If you'd like to contribute, start by forking the repository on GitHub. Then, create a new branch for your feature or bug fix, make your changes, and test them. When you're ready, submit a pull request with a detailed description of your work.
- **Feedback and Discussions**: For comments, questions, or suggestions, please use [GitHub Issues](https://github.com/guyfloki/wavesync/issues). It's a great way to provide feedback or start a conversation about the library.
### Direct Contact
- If you have specific inquiries or ideas you'd prefer to discuss directly, you can reach out to me via email at [liubomir.horbatko@gmail.com](mailto:liubomir.horbatko@gmail.com). I'm always open to hearing from users and potential collaborators.
Your involvement is crucial for making WaveSync even better.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/guyfloki/wavesync",
"name": "PyWaveSync",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Liubomyr Horbatko",
"author_email": "liubomir.horbatko@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b9/e9/5cee768f4bb7c62c08be143fc4f55607966a2a13ecc064ee1fa1a333b44b/PyWaveSync-0.1.1.tar.gz",
"platform": null,
"description": "\r\nWaveSync is a Python library crafted for the analysis of vectors and embeddings, specifically tailored for use in Retrieval-Augmented Generation (RAG) systems. \r\n\r\nUnlike traditional methods that rely on cosine similarity for embeddings comparison, WaveSync introduces a novel approach by employing time series decomposition and phase analysis. This method enables the library to perform a more nuanced, nonlinear, and rapid analysis of embeddings, allowing for the identification of deeper similarities and differences beyond what cosine similarity can offer.\r\n\r\n## Installation\r\n\r\n### Required Libraries\r\n\r\nBefore installing WaveSync, you have to ensure the following libraries are already installed on your system:\r\n\r\n \r\n```bash\r\npip install numpy\r\n```\r\n\r\n\r\n```bash\r\npip install PyWavelets\r\n```\r\n\r\n### Installation WaveSync\r\n\r\n\r\n```bash\r\npip install PyWaveSync\r\n```\r\n\r\n## Usage\r\n\r\nFor quick start:\r\n\r\n```python\r\nfrom wavesync.wavesync import WaveSync\r\nimport numpy as np\r\n\r\nvec = np.random.rand(1024) \r\nvecs = np.random.rand(10, 1024)\r\n\r\nws = WaveSync()\r\n\r\nwavesync_scores = ws.compare(vec, vecs)\r\n\r\nprint(wavesync_scores)\r\n```\r\n\r\nIf you want to see how the algorithm works on different types of vectors:\r\n\r\n```python\r\nfrom wavesync.wavesync import WaveSync\r\nimport numpy as np\r\n\r\nws = WaveSync()\r\n\r\nnp.random.seed(42) \r\nvec = np.random.rand(1024) \r\nsimilar_vecs = [vec + np.random.normal(0, 0.01, len(vec)) for _ in range(5)]\r\ndissimilar_vecs = [np.random.rand(len(vec)) for _ in range(5)]\r\nvec_a = np.random.rand(1024)\r\nvec_b = -vec_a # Coordinate-wise opposite of vec_a\r\n\r\n# Test with similar, dissimilar, and opposite vectors\r\nwavesync_similar_scores = ws.compare(vec, similar_vecs)\r\nwavesync_dissimilar_scores = ws.compare(vec, dissimilar_vecs)\r\nwavesync_opposite_scores = ws.compare(vec_a, [vec_b])\r\n\r\nprint(wavesync_similar_scores, wavesync_dissimilar_scores, wavesync_opposite_scores)\r\n```\r\n\r\n## Learn More\r\n\r\nFor those interested in diving deeper into how the WaveSync algorithm works, detailed explanations and use cases can be found on the following platforms:\r\n\r\n- **English** (**Will be available in approximately 3 days**): Check out our articles on [Medium](https://medium.com) for an in-depth look at WaveSync. \r\n- **Russian** (**Will be available in approximately 2 days**): For Russian speakers, detailed discussions can be found on [Habr](https://habr.com).\r\n\r\n## Community and Contact\r\n\r\nI'm looking forward to collaborating with anyone interested in improving WaveSync. Your feedback, suggestions, and contributions are always welcome.\r\n\r\n### How to Contribute\r\n\r\n- **Contributions**: If you'd like to contribute, start by forking the repository on GitHub. Then, create a new branch for your feature or bug fix, make your changes, and test them. When you're ready, submit a pull request with a detailed description of your work.\r\n\r\n- **Feedback and Discussions**: For comments, questions, or suggestions, please use [GitHub Issues](https://github.com/guyfloki/wavesync/issues). It's a great way to provide feedback or start a conversation about the library.\r\n\r\n### Direct Contact\r\n\r\n- If you have specific inquiries or ideas you'd prefer to discuss directly, you can reach out to me via email at [liubomir.horbatko@gmail.com](mailto:liubomir.horbatko@gmail.com). I'm always open to hearing from users and potential collaborators.\r\n\r\nYour involvement is crucial for making WaveSync even better.\r\n\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n",
"bugtrack_url": null,
"license": "",
"summary": "WaveSync is a Python library for nuanced, nonlinear, and rapid analysis of vectors and embeddings, tailored for RAG systems.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/guyfloki/wavesync"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7b1473da677875143fff8b3f30871173e67b0022b8958cb84642314d6be96f55",
"md5": "df6b268f8f82453745d4f2d4a20c931e",
"sha256": "95a63ec9b654dc100f9cd91c04966da1b75f04917cf0d787654a405ab41a927a"
},
"downloads": -1,
"filename": "PyWaveSync-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "df6b268f8f82453745d4f2d4a20c931e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4649,
"upload_time": "2024-03-02T17:38:00",
"upload_time_iso_8601": "2024-03-02T17:38:00.463464Z",
"url": "https://files.pythonhosted.org/packages/7b/14/73da677875143fff8b3f30871173e67b0022b8958cb84642314d6be96f55/PyWaveSync-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9e95cee768f4bb7c62c08be143fc4f55607966a2a13ecc064ee1fa1a333b44b",
"md5": "ab6487a022a79a741b83b88b9ba4b856",
"sha256": "b15310402c0d6e38dbf6bc9d6f6f39af6c81dae9392db0235cc8cf4049e19f69"
},
"downloads": -1,
"filename": "PyWaveSync-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ab6487a022a79a741b83b88b9ba4b856",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5042,
"upload_time": "2024-03-02T17:38:02",
"upload_time_iso_8601": "2024-03-02T17:38:02.563460Z",
"url": "https://files.pythonhosted.org/packages/b9/e9/5cee768f4bb7c62c08be143fc4f55607966a2a13ecc064ee1fa1a333b44b/PyWaveSync-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-02 17:38:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "guyfloki",
"github_project": "wavesync",
"github_not_found": true,
"lcname": "pywavesync"
}