-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix Contingency Table Generator (CTGenerator) #11
Comments
More precise plan (for discussion).
|
|
Thanks Vidhi! As for unielwin, I guess there is no_std. Maybe rename it New_Unielwin. You could even name these things Vidhi_Financial instead of New_Financial_std. But any name is okay I'd suggest documenting it somewhere, maybe in a readme file (e.g. Vidhi_notes). As for deleting the old ones, I didn't mean to delete them, we may need them in the future. But never mind. I vaguely remember this problem of dropping them, maybe it's a permission issue. Maybe just write it down as an issue here and we'll come back to it when we review the whole database - there are lots of things to delete! So can you build CT tables for the three new databases? |
So the build_CT() in RunBB.java works and creates
|
Hooray! Can you check if you can delete the code with subset* and target* and still have it work? |
Yes, I deleted the SubsetCTComputation.java and the functions called in BayesBaseCT_SortMerge.java. The execution completed for (All CT tables)
|
Great! I hope the new code is easier. For implementing the relational classification formula, we need to add functionality to BayesBaseCT_SortMerge.java. How about we discuss this tomorrow morning? If you want to get started on something, it would be helpful to make the buildCT procedure more flexible.
Right now BayesBaseCT_SortMerge.java makes the database schemas global variables and calls buildCT after setting them. If we could change BayesBaseCT_SortMerge.java so that it calls buildCT.java with the right arguments, that would make it easier to use buildCT for other purposes like relational classification. It would also help with issue #32. |
@vidhiJain @JanyQZ Hi, my comment above describes the change we want for buildCT so that we can pass it arguments (e.g. NewSetup). Once we've done that we can plan the details for extra functionality, like specifying subsets of functors for the CT tables. |
If we can make the functionality to copy the setup database, we can delete functors from it. Like this: Input: A datadb, a subset of functors functor_list, a setupdb
To add the groundings, we can add pvariable_ids to the group by clause in CTgenerator (already implemented) |
this is almost done for ct-table. Still needs to be integrated with classifier. |
@vidhiJain The contingency table code is in
https://github.com/sfu-cl-lab/FactorBase/blob/master/src/BayesBaseCT_SortMerge.java. It's called from RunBB.java as follows:
//assumes that dbname is in config file and that dbname_setup exists.
BayesBaseCT_SortMerge.CTGenerator();
The key procedure is CTGenerator()
This is what builds the CT tables. Unfortunately Zhensong made a version of CTGenerator that is for working with groundings called target. Plus he merged this with the nontarget code. Also he merged it with a copy for the case where we are interested only in a subset of the functor nodes. My suggestion would be this.
Make a new branch.
In the new branch, make a copy of BayesBaseCT_SortMerge.java with all the target and subset stuff removed. I can probably even find an older version without the target stuff. See if we can run it then.
Then we can design a CT generator for groundings and subsets from scratch. I think a key move would be to change CT generator so that it takes as input the setup database rather than treat that as a global variable. Then we can use the CT generator with different (temporary) setup databases.
The text was updated successfully, but these errors were encountered: