[scikit-learn] Generate data from trained naive bayes
Manoj Kumar
manojkumarsivaraj334 at gmail.com
Mon Oct 3 11:23:55 EDT 2016
Hi,
feature_log_prob_ is an array of size (n_classes, n_features).
exp(feature_log_prob_[class_ind, feature_ind]) gives P(X_{feature_ind} = 1
| class_ind)"
Using the conditional independence assumptions of NaiveBayes, you can use
this to sample each feature independently given the class.
Hope that helps.
On Mon, Oct 3, 2016 at 11:09 AM, klo uo <klonuo at gmail.com> wrote:
> On Mon, Oct 3, 2016 at 5:08 PM, klo uo <klonuo at gmail.com> wrote:
>
>> I can see how can I sample from `feature_log_prob_`...
>>
>
> I meant I cannot see
>
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
--
Manoj,
http://github.com/MechCoder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20161003/b3a49c25/attachment.html>
More information about the scikit-learn
mailing list