munichpavel / fake-data-for-learning

Sample interesting fake data for machine and human learning
https://munichpavel.github.io/fake-data-for-learning
MIT License
7 stars 0 forks source link

Eliminate global aspects of interface #2

Closed munichpavel closed 5 years ago

munichpavel commented 5 years ago

The main functionality of the GraphProbabilityTable s as of https://github.com/munichpavel/fake-data-for-learning/commit/e3299f49c0b1c495b47ee1f45d64bdf57f5c01ad is the method embet_pt which figures out a globally consistent representation for local (i.e. for a node and its parents) probability table.

This is perhaps pedagogically interesting but practically silly, as the whole point of graphical models is to avoid writing down and calculating the entire probability table / pdf.

In branch local-tables I try to fix this. In terms of the interfaces

munichpavel commented 5 years ago

Make GraphProbabilityTable a derived class from scipy.stats.rv_discrete??? https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_discrete.html This was my initial idea.

munichpavel commented 5 years ago

Issues with derived class, see https://github.com/scipy/scipy/issues/8057 and same on SO https://stackoverflow.com/questions/46635803/instance-of-scipy-stats-rv-discrete-subclass-throws-error-on-pmf-method

munichpavel commented 5 years ago

Closed as of commit https://github.com/munichpavel/fake-data-for-learning/commit/aab44f84bd7c133f02e57a25029df363124d2679 (sooner actually)