pgmpy / pgmpy_viz

A web based GUI for pgmpy
MIT License
13 stars 20 forks source link

Creation of tables on double click on nodes #16

Closed omniscius closed 10 years ago

omniscius commented 10 years ago

Right now a table is created on double clicking the nodes. this only works when both add nodes and add edges option is DESELECTED. I have also made table objects. Next commit would include Tables dynamically obtaining their columns based on the data in their parent nodes. Also a method to hide the CPD once data as been entered.

pramttl commented 10 years ago

Table creation on double clicking a node works well. Good! But how do I add cells of variable height and width.? All cells need not have the same span in CPD tables. Some cells may span across multiple rows and columns. Try and google if you can get more examples on how CPD tables look like or we can wait for others to help us here.

P.S: When working on a new feature like "adding cpd tables" that could take some time to perfect, working on a new git (feature) branch say "cpdtables" would be a good idea. @ankurankan can create this branch on pgmpy/pgmpy_viz and @omniscius can send all pull requests to this branch, @omnicius you must create a branch named "cpdtables" on your repo fork too.

On Sat, Nov 16, 2013 at 10:21 PM, omniscius notifications@github.comwrote:

Right now a table is created on double clicking the nodes. this only works when both add nodes and add edges option is DESELECTED. I have also made table objects. Next commit would include Tables dynamically obtaining their columns based on the data in their parent nodes. Also a method to hide the

CPD once data as been entered.

You can merge this Pull Request by running

git pull https://github.com/omniscius/pgmpy_viz master

Or view, comment on, or merge it at:

https://github.com/pgmpy/pgmpy_viz/pull/16 Commit Summary

  • Creation of tables on double click on nodes

File Changes

  • A main/static/css/modal.csshttps://github.com/pgmpy/pgmpy_viz/pull/16/files#diff-0(118)
  • A main/static/js/bootstrap.jshttps://github.com/pgmpy/pgmpy_viz/pull/16/files#diff-1(2159)
  • A main/static/js/cpd.jshttps://github.com/pgmpy/pgmpy_viz/pull/16/files#diff-2(43)
  • M main/templates/index.htmlhttps://github.com/pgmpy/pgmpy_viz/pull/16/files#diff-3(34)
  • D pgmpy https://github.com/pgmpy/pgmpy_viz/pull/16/files#diff-4(1)

Patch Links:

Best Regards, Pranjal Mittal B.Tech. 2014 Indian Institute of Technology,BHU Varanasi, U.P, India

Github http://github.com/pramttl | LinkedInhttp://in.linkedin.com/pub/pranjal-mittal/26/660/318/| Blog http://pranjalmittal.in

ankurankan commented 10 years ago

Hi,

Right now I am having problems with my laptop so I can't review if the tables are being drawn correctly. But Pranjal has mentioned that there are some problems with the tables, so @omnicius please check the wiki [1] and confirm that the tables are being drawn properly. And @Shashank could you also look into this problem?

About having a new branch in the master repository for some feature, I don't think that is a great idea. Rather I would suggest everyone to have feature specific branches in their forked repositories and rebase their commits to master (and to Dev when we start working on Dev) when sending a pull request.

[1] https://github.com/pgmpy/pgmpy_viz/wiki/Detailed-Description

ankurankan commented 10 years ago

And why have you guys included the whole code of bootstrap and cytoscape in our repo? Shouldn't we be loading it from their repo at the time the page loads?

gargshashank5 commented 10 years ago

Hi,

@omniscius [1] Add a row with name of the node on the top of the table. [2] Place all the state names in center of the cells. [3] We need a button to delete a certain selected row from our table. So there must be a way to select rows. [4] The table must be placed at the bottom of the page. [5] Add name of the parent node in left, whose states are being displaying in the parents row. Refer wiki for this. Currently the parent states in 2nd row are incorrect.

I would also suggest using the same parent and parent state names as in wiki to avoid confusion.

@pramttl We will not need cells of variable height and width for probabilities. Variable width cells will be required only on top for containing the name of parents. These cells will be created when the empty table is displayed to the user. No such cell will be created by the user.

ankurankan commented 10 years ago

Yeah Definitely. This commit was the first of many to come. A lot of work still remains. Table names, dynamic columns based on parent nodes, deletion of rows etc. Working on those right now.

On Sun, Nov 17, 2013 at 3:33 AM, Shashank Garg notifications@github.comwrote:

Hi,

@omniscius https://github.com/omniscius [1] Add a row with name of the node on the top of the table. [2] Place all the state names in center of the cells. [3] We need a button to delete a certain selected row from our table. So there must be a way to select rows. [4] The table must be placed at the bottom of the page. [5] Add name of the parent node in left, whose states are being displaying in the parents row. Refer wikihttps://github.com/pgmpy/pgmpy_viz/wiki/Detailed-Descriptionfor this. Currently the parent states in 2nd row are incorrect.

I would also suggest using the same parent and parent state names as in wiki https://github.com/pgmpy/pgmpy_viz/wiki/Detailed-Description to avoid confusion.

@pramttl https://github.com/pramttl We will not need cells of variable height and width for probabilities. Variable width cells will be required only on top for containing the name of parents. These cells will be created when the empty table is displayed to the user. No such cell will be created by the user.

— Reply to this email directly or view it on GitHubhttps://github.com/pgmpy/pgmpy_viz/pull/16#issuecomment-28636927 .

You received this message because you are subscribed to the Google Groups "pgmpy" group. To unsubscribe from this group and stop receiving emails from it, send an email to pgmpy+unsubscribe@googlegroups.com. To post to this group, send email to pgmpy@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pgmpy/pgmpy/pgmpy_viz/pull/16/c28636927%40github.com .

For more options, visit https://groups.google.com/groups/opt_out.

ankurankan commented 10 years ago

@abinashpanda @pramttl @snigam3112 @gargshashank5 What do you think of the workflow that I mentioned in https://github.com/pgmpy/pgmpy_viz/pull/16#issuecomment-28633346?

ankurankan commented 10 years ago

And @omniscius please use 4 spaces and be consistent in indentation. You have used tabs and have also mixed single and double tabs.