Metadata-Version: 2.4
Name: cynsearch
Version: 0.1.0
Summary: A blazing-fast learned search library for chaotic datasets
Home-page: https://github.com/cyn-apse/cynsearch
Author: Cynapse ψ∆Ξ
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy>=1.24
Requires-Dist: scikit-learn>=1.3
Requires-Dist: joblib>=1.3
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# CynSearch ψ∆Ξ

*A blazing-fast learned index for chaotic data.*

---

## Overview
`cynsearch` is a Python library for fast search on unpredictable, noisy, or locally-disordered datasets — the kind that break traditional binary search and mock sorted assumptions.

It uses symbolic preprocessing and a trained regressor to predict the likely position of any value in near constant time. Then it dives into that location like a neural ninja.

Built by **Cynapse ψ∆Ξ**

---

## Why?
Traditional search structures (like binary search or hash maps) struggle when data is:
- Only **partially sorted**
- **Locally shuffled**
- **Non-monotonic**, noisy, or **chaotic**

`cynsearch` tackles this with:
- A learned index powered by **gradient boosting**
- Normalized inputs via `MinMaxScaler`
- Fast bin-based bucketing + fallback linear search
- Optional symbolic preprocessing for advanced modeling

---

## Install
```
pip install cynsearch
```
*(coming to PyPI soon — for now, clone and install locally)*

---

## Quickstart

```python
from cynsearch import LearnedSearch

# Load from preprocessed .npy data and pre-trained model
searcher = LearnedSearch(
    npyfile="chaotic_sorted_data.npy",
    model_path="chaotic_model.pkl",
    num_bins=512,
    epochs=1000
)

index = searcher.search(982733)
if index != -1:
    print("Value found at:", index)
```

---

## Generate Chaotic Data
```python
from cynsearch.generate_data import generate_chaotic_sorted_data

generate_chaotic_sorted_data(size=1_000_000)
```
Or try local shuffle chaos:
```python
from cynsearch.generate_data import generate_locally_chaotic_sorted_array

generate_locally_chaotic_sorted_array(size=1_000_000, window_size=5)
```

---

## Benchmark
Run it like a performance cultist:
```bash
python examples/benchmark.py --npy chaotic_sorted_data.npy --model chaotic_model.pkl --queries 1000
```

---

##  License
MIT — because even chaos deserves freedom.

---

##  Author
### Cynapse ψ∆Ξ

---
