Labeling function matrix L now has entries with values in {0,...,K}, where 0 is abstain (and 1 will mean 'nothing' although this is of course immaterial to NS)
We also pass in the cardinality of L
Also a redefined Candidate object that has a kwarg for cardinality (+ all the downstream changes needed to Snorkel front-end to support this)
Optionally: Can make the Candidate object fancier by either accepting an integer -- in which case this is the cardinality -- or a list of strings, which will now be the different categorical values
@bach Our thinking is to just support similarity deps for now, sound good?
@thodrek Do you need sparse repr. of L? Discuss with @bryan-he . Also anything else?
TODOs:
[x] Change compilation code in Snorkel
[x] Change internal representation of L
[x] Modify GenerativeModel.marginals for categorical setting
[x] Write basic tests
[x] Change Candidate class to have basic support for cardinality > 2
[x] Store sparse representation of categorical marginals (training and prediction)
[x] Support for verbose names of categorical values in candidate class
[x] Add short tutorial on using categorical candidates
[x] Fix all marginal saving / loading helper functionality
[x] Extend LogisticRegression end model for categorical
[x] Extend SparseLogisticRegression end model for categorical
[x] Fix scoring functions to handle categorical setting
Simple first step:
L
now has entries with values in{0,...,K}
, where 0 is abstain (and 1 will mean 'nothing' although this is of course immaterial to NS)L
Candidate
object that has a kwarg for cardinality (+ all the downstream changes needed to Snorkel front-end to support this)Optionally: Can make the
Candidate
object fancier by either accepting an integer -- in which case this is the cardinality -- or a list of strings, which will now be the different categorical values@bach Our thinking is to just support similarity deps for now, sound good?
@thodrek Do you need sparse repr. of
L
? Discuss with @bryan-he . Also anything else?TODOs:
L
GenerativeModel.marginals
for categorical settingCandidate
class to have basic support for cardinality > 2LogisticRegression
end model for categoricalSparseLogisticRegression
end model for categorical