What is the use of taking faeture_val

in conditional probability function we can use
num=np.sum(x_filter[ : , feature]==label)
instead of using feature val as its of no use
in calculating conditional probability …
correct me if i am wrong and also explain its use

Hey @yash443388, no your assumption is wrong, feature value is of importance, suppose you have column having 3 males and 7 females, in a single class having labels of all as 0. Now test example comes and you want to calculate conditional probability of person being male, given that it belongs to class 0, so do you think your method will give correct value i.e. 0.3

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.