<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Klo.<br>
Yes, you could, but as the model is very simple, that's usually not
very interesting.<br>
It stores for each label an independent Bernoulli distribution for
each feature.<br>
these are stored in feature_log_prob_.<br>
I would suggest you look at this attribute, rather than sample from
the distribution.<br>
To sample from it you would have to exponentiate it and then sample
from these Bernoulli distributions.<br>
<br>
Andy<br>
<br>
<div class="moz-cite-prefix">On 10/03/2016 07:30 AM, klo uo wrote:<br>
</div>
<blockquote
cite="mid:CAA-8Ld9oZit0UCof8sSyw-PaCBQxp9ZpsENzuopTsvRK0GrHUQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
because naive bayes is a generative model, does that
mean that I can somehow generate data based on trained
model?<br>
<br>
</div>
For example:<br>
<br>
<span style="font-family:monospace,monospace">clf =
BernoulliNB()<br>
clf.fit(train, labels)</span><br>
<br>
</div>
Can I generate data for specific label?<br>
<br>
<br>
</div>
Thanks,<br>
</div>
Klo<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
scikit-learn mailing list
<a class="moz-txt-link-abbreviated" href="mailto:scikit-learn@python.org">scikit-learn@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/scikit-learn">https://mail.python.org/mailman/listinfo/scikit-learn</a>
</pre>
</blockquote>
<br>
</body>
</html>