Skip to content

Commit 1f90a65

Browse files
committed
created base structure for adding discovery and other algorithms
Signed-off-by: Amit Sharma <[email protected]>
1 parent 6476b90 commit 1f90a65

File tree

8 files changed

+58
-0
lines changed

8 files changed

+58
-0
lines changed

pywhyllm/datasets/__init__.py

Whitespace-only changes.

pywhyllm/datasets/dataset.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from typing import List, Protocol
2+
3+
class Dataset(Protocol):
4+
5+
def graph(self):
6+
"""
7+
Output the graph associated with the dataset.
8+
9+
Args:
10+
Returns:
11+
A networkx graph
12+
"""
13+
pass
14+
15+
def data(self):
16+
"""
17+
Output the data associated with the dataset.
18+
19+
Args:
20+
Returns:
21+
A numpy array containing the data
22+
"""
23+
pass
24+
25+
def generate_data(self):
26+
"""
27+
Generate synthetic data based on the dataset's causal graph.
28+
29+
Args:
30+
Returns:
31+
A numpy array containing the synthetic data
32+
"""
33+
pass

pywhyllm/datasets/metrics.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
3+
def accuracy(edges, true_edges):
4+
"""Accuracy metric for predicted edges
5+
"""
6+
pass
7+
8+
9+
def precision(edges, true_edges):
10+
"""Precision metric for predicted edges
11+
"""
12+
pass
13+
14+
15+
def recall(edges, true_edges):
16+
"""Recall metric for predicted edges
17+
"""
18+
pass
19+
20+
21+
def F1(edges, true_edges)
22+
"""F1 metric for predicted edges
23+
"""
24+
pass
25+

pywhyllm/identifiers/__init__.py

Whitespace-only changes.

pywhyllm/modelers/__init__.py

Whitespace-only changes.

pywhyllm/modelers/hybrid/__init__.py

Whitespace-only changes.

pywhyllm/modelers/llm/__init__.py

Whitespace-only changes.

pywhyllm/refuters/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)