Hi Andy,

Thank you very much for offering to mentor my project! But sadly, it looks
like sklearn is not in the GSoC organization list :(...

I still want to go ahead and implement bayes-nets in sklearn. However, i
will also be applying to other places at GSoC, so i'll have to go slow on
the bayes nets implementation.

To answer your question about how i'll go about implementing the first case:

The first thing to decide would be how to represent the DAG. For that, i
could either use something like py_graph, or roll my own, like so:

dag = {'A': ['B', 'C'],
           'B': ['C', 'D']}

dag represents a graph with nodes A, B, C, D and edges from A to B,C and
from B to C,D.

Once we have that, we will next need to represent factors. Factors are
similar to conditional probability distributions, except that they don't
normalize to unity. Inference operations on bayes nets are done by
manipulating factors. Each factor has a scope: for example, phi(X1, X2, X3)
has a scope of X1, X2, X3. phi(X1=x1, X2=x2, X3=x3) = y means that the
factor phi attains value y when X1, X2, X3 are assigned the values x1, x2,
x3.

I'll design a custom class that will hold the scope of the factors, and
have a mechanism to set/get the factor values for each assignment of the
variables in it's scope.

Finally, i'll implement methods for factor multiplication and
marginalization. Once these are done, we can now do inference operations on
our DAG.

regards,
shankar.




On Thu, Mar 15, 2012 at 5:27 PM, Andreas <[email protected]> wrote:

> Hi Shankar.
> I am not really saying that graphical models are not useful tools.
> What I am questioning is whether it is reasonable to formulate these
> problems as general as you do and how they fit into the scikit-learn.
>
> By the way, there are several "Bayes nets" already implemented in the
> scikit-learn, for example logistic regression
> and Bayesian Regression and Gaussian mixture models (which have latent
> variables).
>
> Let's stay in case 1), where the model and parameters are know, which is
> the easiest case. Can you describe
> how you would want to implement this?
>
> If you can make a reasonable proposal that stays within the scope of
> scikit-learn, I would gladly mentor
> your project.
>
> Btw, there is also PyMC which implements a language to describe models
> and do Monte Carlo inference.
>
> Cheers,
> Andy
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to