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

How can I use deepdive to perform unsupervised verification? #608

Open
rudaoshi opened this issue Dec 20, 2016 · 9 comments
Open

How can I use deepdive to perform unsupervised verification? #608

rudaoshi opened this issue Dec 20, 2016 · 9 comments

Comments

@rudaoshi
Copy link

Hi, I have a unlabeled data set in which each sample has an initial confidence. I want to do some verification by writing rules about commonsense to reduce the confidences of samples which violate commonsense. How can I do this?

  1. How can I use the initial confidence?
  2. How can I assign weights to the commonsense rules?

Thank you very much!

@rudaoshi
Copy link
Author

When I want to define a unsupervised model by using "p(x,y)=NULL: ....", the program report:

column "label" is of type boolean but expression is of type text

It seems that the error is about a bug in sql generation module.

@chrismre
Copy link
Contributor

chrismre commented Dec 20, 2016 via email

@rudaoshi
Copy link
Author

@chrismre Thank you for mentioning another amazing projects. I'll look at it.

However, currently I'd rather like to know how to do this by deepdive.

@chrismre
Copy link
Contributor

DeepDive can express essentially any factor graph. You'll need to write the rules that create the required factor graph. A default factor graph for this process is described in the Snorkel/data programming paper.

Hope that helps! Chris

@alldefector
Copy link
Contributor

@rudaoshi Here is an example rule with manually assigned weights (adapted from the "census" example):

@weight(1.2)
rich(id) :- adult(id, _, workclass, _, _, _, _, _, _, _, _, _, _, _, _, income_bracket).

You can change the rule body (the adult... part) to encode the "common sense" cases.

@thodrek
Copy link

thodrek commented Dec 20, 2016

@rudaoshi Regarding the NULL issue alone, you should try to use casting within ddlog. Writing = NULL::boolean instead of = NULL will take care of the label casting issue.

@rudaoshi
Copy link
Author

Thank you very much to every one. I'll try your recommended solutions.

@rudaoshi
Copy link
Author

@thodrek I got following error using Deepdive 0.8:

2016-12-21 11:43:00.679659 [error] app.ddlog[176.44] failure: :-' expected but :' found
2016-12-21 11:43:00.679741
2016-12-21 11:43:00.679756 has_relation(p1_id, p2_id, relation) = NULL:boolean
2016-12-21 11:43:00.679767
2016-12-21 11:43:00.679947 ^

Does this feature need newer version cloned from github?

@alldefector
Copy link
Contributor

@rudaoshi note that there are two colons: NULL::boolean. If that doesn't work, try cast(null as boolean).

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

4 participants