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

Provide a bridge to PyGOBN #6

Open
smarie opened this issue Jan 22, 2021 · 0 comments
Open

Provide a bridge to PyGOBN #6

smarie opened this issue Jan 22, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@smarie
Copy link
Contributor

smarie commented Jan 22, 2021

From PyGOBN doc:

>>> gobn = GOBN()
>>> edge_reqs = {'A':['B','C'],'B':['D']} # require that A->B, A->C, and B->D
>>> ind_reqs = [('A','D'),(('A','B'),'D','C')] # require that A _|_ D and A,B _|_ D | C
>>> nonedge_reqs = {'B':['C']} # disallow that B->C
>>> gobn.set_constraints(edge_reqs, ind_reqs, nonedge_reqs)
>>> gobn.learn(data) # Call the GOBNILP solver

So we can maybe provide a <QDForest>.to_pygobn() method that would return a tuple edge_reqs, ind_reqs, and nonedge_reqs. The user would therefore do:

from qdscreeen import qdeterscreen
from pyGOBN import GOBN

# screen for (quasi-)determinism and get the contraints to pass to GOBN
qd_forest = qdeterscreen(data[, options])
reqs = qd_forest.to_pygobn()

# run GOBN with these constraints
gobn = GOBN()
gobn.set_constraints(*reqs)
gobn.learn(data)
@smarie smarie added the enhancement New feature or request label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant