Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java programming: Consider the case of a spam detector for a receiving email. The 2% of the email we receive is spam. When an email

java programming:

Consider the case of a spam detector for a receiving email. The 2% of the email we receive is spam. When an email is spam it is detecting with accuracy of 99%. When an email is not spam, it will mark as spam with a very low rate of 0.1%. Please prepare a program (spamdet.java) that can find the probability of an email to be in fact spam if it is in the spam folder.

Hint: the formula that should be used is:

P(Spam/Detected) = (P(detected/Spam) * P(Spam) ) / P(Detected)

Variables for the program:

pSD = P(Spam/Detected), p(DSpam) = P(detected/Spam) , pSpam = P(Spam), pD = P(Detected).

Please create a method that can find the pSD.

Create a class. A method that use the formula. Method: pSD(pSpam, pDSPam, pDNoSpam)

Consider the: double pNoSpam = 1 pSpam;

Results should look like this:

pNoSpam:

pD: 0.02

pSD: 0.95

result 0.95

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

Does it avoid use of underlining?

Answered: 1 week ago