Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
flipz357 committed Sep 28, 2023
1 parent 48d31f8 commit d5f20d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ If we want to use the compression in the matching, simply set the argument `grap

- *I want to process other kinds of graphs* While tailored to AMR the package allows processing of all kinds of graphs. To process graphs that are different from AMR, it can help to write your own standardizer (see AMRStandardizer in `smatchpp/preprocess.py`) and possibly create another Reader (currently it is possibly to read graphs in penman form or tsv, see readers in `smatchpp/data_helpers.py')

- *I have very large graphs and optimal ILP doesn't terminate* This is because optimal alignment is fundamentally an NP complete problem. In this case we can 1. use a heuristic by setting solver as HillClimber (unfortunately the solutions by heuristic will get worse if graphs are large since there are lots of local optima where it can get stuck). Otherwise 2. It can be useful to set `--lossless_graph_compression` as argument from console (for python see [Example VIII](#lossless-gc)), which makes evaluation much faster and still gives an optimal score (the score tends to be slightly harsher/lower). Alternatively you can use the `max_seconds` argument in the ILP solver (see `ILPSolver` in `smatchpp/solvers.py`) and reduce it to be provided with a solution that may be not optimal (as in the hill-climber) but also comes with a useful upper-bound to tell you about solution quality. Maybe, in case of very large graphs option ii) is most suitable as it can offer highest solution quality.
- *I have very large graphs and optimal ILP doesn't terminate* This is because optimal alignment is fundamentally an NP complete problem. In this case we have three options. 1. use a heuristic by setting solver as HillClimber (unfortunately the solutions by heuristic will get worse if graphs are large since there are lots of local optima where it can get stuck). 2. It can be useful to use ILP with `--lossless_graph_compression` as argument from console (for python see [Example VIII](#lossless-gc)), which makes evaluation much faster and still gives an optimal score (the score tends to be slightly harsher/lower). 3. you can play with the `max_seconds` argument in the ILP solver (see `ILPSolver` in `smatchpp/solvers.py`) and reduce it to be provided with a solution that may be not optimal (as in the hill-climber) but also comes with a useful upper-bound to tell you about solution quality. Maybe, in case of very large graphs option ii) is most suitable as it can offer best solution quality.

## Citation

Expand Down

0 comments on commit d5f20d1

Please sign in to comment.