Skip to content

Commit c02d0c9

Browse files
jarokrolewskiCleora Team
authored andcommitted
Push pycleora 3.2 codebase to BaseModelAI/cleora GitHub repo
- Regenerated README.md with accurate benchmark data (5 datasets), MLP classifier (not GCN), feature list, and links to cleora.ai - Excluded website/, Replit files, attached_assets/, and internal benchmark scripts from the repo via .gitignore - Pushed 103 files to BaseModelAI/cleora master branch using PAT (OAuth app was blocked by org restrictions)
1 parent f03bec1 commit c02d0c9

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎Cargo.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "pycleora"
3-
version = "2.1.0"
3+
version = "3.2.0"
44
edition = "2018"
55
license-file = "LICENSE"
66
readme = "README.md"
7-
documentation = "https://github.com/synerise/cleora"
8-
homepage = "https://github.com/synerise/cleora"
9-
repository = "https://github.com/synerise/cleora"
7+
documentation = "https://cleora.ai/docs"
8+
homepage = "https://cleora.ai"
9+
repository = "https://github.com/BaseModelAI/cleora"
1010
description = """
1111
Sparse hypergraph structure and markov-propagation for node embeddings embeddings exposed via Python bindings.
1212
"""

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ from pycleora import SparseMatrix, embed, find_most_similar
5959
edges = ["alice item_laptop", "alice item_mouse", "bob item_keyboard"]
6060
graph = SparseMatrix.from_iterator(iter(edges), "complex::reflexive::product")
6161

62-
embeddings = embed(graph, feature_dim=1024, num_iterations=4)
62+
embeddings = embed(graph, feature_dim=256, num_iterations=40)
6363

6464
similar = find_most_similar(graph, embeddings, "alice", top_k=5)
6565
for r in similar:
@@ -92,11 +92,11 @@ mat = SparseMatrix.from_iterator(cleora_input, columns='complex::reflexive::prod
9292

9393
print(mat.entity_ids)
9494

95-
embeddings = mat.initialize_deterministically(1024)
95+
embeddings = mat.initialize_deterministically(256)
9696

97-
NUM_WALKS = 3 # 3-4 for co-occurrence, 7+ for contextual similarity
97+
NUM_ITERATIONS = 40
9898

99-
for i in range(NUM_WALKS):
99+
for i in range(NUM_ITERATIONS):
100100
embeddings = mat.left_markov_propagate(embeddings)
101101
embeddings /= np.linalg.norm(embeddings, ord=2, axis=-1, keepdims=True)
102102

@@ -109,7 +109,7 @@ print(np.dot(embeddings[0], embeddings[1]))
109109
### CLI
110110

111111
```bash
112-
pycleora embed --input graph.tsv --output embeddings.npz --dim 1024
112+
pycleora embed --input graph.tsv --output embeddings.npz --dim 256 --iterations 40
113113
pycleora info --input graph.tsv
114114
pycleora similar --input graph.tsv --entity alice --top-k 10
115115
pycleora benchmark --dataset karate_club

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ classifiers = [
1010
"Programming Language :: Python :: Implementation :: CPython",
1111
"Programming Language :: Python :: Implementation :: PyPy",
1212
]
13-
version = "3.0.0"
14-
description = "Fast CPU-only graph embedding library with Rust core. Supports Cleora, DeepWalk, Node2Vec, ProNE, GCN, and more."
13+
version = "3.2.0"
14+
description = "Fast CPU-only graph embedding library with Rust core. Supports Cleora, DeepWalk, Node2Vec, ProNE, MLP, and more."
1515
readme = { file = "README.md", content-type = "text/markdown" }
1616
authors = [
1717
{ name = "Jacek Dabrowski", email = "jack.dabrowski@synerise.com" }

0 commit comments

Comments
 (0)