Skip to content

Commit

Permalink
[USAGE]
Browse files Browse the repository at this point in the history
  • Loading branch information
kyegomez committed Dec 6, 2024
1 parent 8da005a commit 252d221
Show file tree
Hide file tree
Showing 80 changed files with 1,876 additions and 5,611 deletions.
13 changes: 0 additions & 13 deletions .readthedocs.yml

This file was deleted.

25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions Makefile

This file was deleted.

50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,56 @@

[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/kyegomezb)



## Usage

```python


def main():
"""Main benchmark execution"""

# Test parameters
NUM_DOCUMENTS = 50000
VOCAB_SIZE = 100_000
DOC_LENGTH = 100
NUM_QUERIES = 10_000
TERMS_PER_QUERY = 3

print("Generating test dataset...")
documents = Benchmark.generate_dataset(NUM_DOCUMENTS, VOCAB_SIZE, DOC_LENGTH)

print("Initializing HPSA...")
hpsa = HPSA(NUM_DOCUMENTS)

print("Indexing documents...")
start_time = time.time()
for doc in documents:
hpsa.index_document(doc)
index_time = time.time() - start_time
print(f"Indexing completed in {index_time:.2f} seconds")

print("Generating test queries...")
queries = Benchmark.generate_queries(NUM_QUERIES, VOCAB_SIZE, TERMS_PER_QUERY)

print("Running benchmark...")
results = Benchmark.run_benchmark(hpsa, queries)

print("\nBenchmark Results:")
print(f"Queries per second: {results['queries_per_second']:.2f}")
print(f"Mean response time: {results['mean_response_time']*1000:.2f}ms")
print(f"95th percentile response time: {results['p95_response_time']*1000:.2f}ms")
print(f"99th percentile response time: {results['p99_response_time']*1000:.2f}ms")

if __name__ == "__main__":
main()


```



## Abstract

This paper introduces a theoretical framework for a revolutionary search algorithm that achieves unprecedented speed through a combination of probabilistic data structures, intelligent data partitioning, and a novel hierarchical index structure. Our proposed architecture, HPSA (Hierarchical Probabilistic Search Architecture), achieves theoretical search times approaching O(log log n) in optimal conditions by leveraging advanced probabilistic filters and a new approach to data organization. We present both the theoretical foundation and a detailed implementation framework for this new approach to information retrieval.
Expand Down
Binary file removed agorabanner.png
Binary file not shown.
Binary file removed docs/.DS_Store
Binary file not shown.
42 changes: 0 additions & 42 deletions docs/applications/customer_support.md

This file was deleted.

Empty file removed docs/applications/enterprise.md
Empty file.
64 changes: 0 additions & 64 deletions docs/applications/marketing_agencies.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/architecture.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/assets/css/extra.css

This file was deleted.

Binary file removed docs/assets/img/SwarmsLogoIcon.png
Binary file not shown.
Binary file removed docs/assets/img/swarmsbanner.png
Binary file not shown.
Binary file removed docs/assets/img/tools/output.png
Binary file not shown.
Binary file removed docs/assets/img/tools/poetry_setup.png
Binary file not shown.
Binary file removed docs/assets/img/tools/toml.png
Binary file not shown.
Binary file removed docs/assets/img/zetascale.png
Binary file not shown.
86 changes: 0 additions & 86 deletions docs/bounties.md

This file was deleted.

Loading

0 comments on commit 252d221

Please sign in to comment.