Skip to content

Commit b8e5981

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 b8e5981

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

0 commit comments

Comments
 (0)