Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find the implementation of Latent Search and entropy-based edge orientation #1

Closed
mxl1334 opened this issue Mar 18, 2024 · 1 comment

Comments

@mxl1334
Copy link

mxl1334 commented Mar 18, 2024

Hi @pooyanjamshidi @cjshearer Thank you so much for sharing your findings in the paper and the code to reproduce the results! I am very interested in your research! But, I could not find the the implementation of LatentSearch and entropy-based edge orientation in the resolve_edges method of causal_model.py below. Could you please kindly shed some light? Thanks a lot in advance!

# replace trail and undirected edges with single edges using entropic policy for i in range (len(PAG)): if trail_edge in PAG[i]: PAG[i]=PAG[i].replace(trail_edge, directed_edge) elif undirected_edge in PAG[i]: PAG[i]=PAG[i].replace(undirected_edge, directed_edge) else: continue
for edge in PAG:
    cur = edge.split(" ")
    if cur[1]==directed_edge:
        node_one = self.colmap[int(cur[0].replace("X", ""))-1]               
        node_two = self.colmap[int(cur[2].replace("X", ""))-1]
        options[node_one][directed_edge].append(node_two)
    elif cur[1]==bi_edge:
        node_one = self.colmap[int(cur[0].replace("X", ""))-1]
        node_two = self.colmap[int(cur[2].replace("X", ""))-1]
        
        options[node_one][bi_edge].append(node_two)
    else: print ("[ERROR]: unexpected edges")
@abirhossen786
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants