-
Notifications
You must be signed in to change notification settings - Fork 4k
FOIL #625
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
FOIL #625
Conversation
| # ______________________________________________________________________________ | ||
|
|
||
|
|
||
| class FOIL_container(FolKB): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be called FOILKB.
| return {x} | ||
| else: | ||
| return list(set(symbol for arg in x.args for symbol in prop_symbols(arg))) | ||
| return {symbol for arg in x.args for symbol in prop_symbols(arg)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, or could be
return set().union(map(prop_symbols, x.args))
| return {x} | ||
| else: | ||
| return list({symbol for arg in x.args for symbol in constant_symbols(arg)}) | ||
| return {symbol for arg in x.args for symbol in constant_symbols(arg)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar here as for prop_symbols
* Added predicate_symbols * Added FOIL * Updated README
Added a basic implementation of FOIL.
The original algo, being intended for use in Prolog, is not directly compatible with python. So I've used FolKB to store and process the knowledge. This works for easy examples like the network given in the original paper and the family tree example.
The removing of positive examples is not recursive, and this is leading to technically correct but long and overfitted clauses. Any help in fixing that would be appreciated.