# Answer the questions | Computer Science homework help

Instructions

You must make your own calculations and you must show your calculations in the answer document. Insufficient calculation steps will result in reduced points earned.

Imbalanced Classifiers

1. Begin by writing the formula for each calculation, then show your steps to arrive at your answer.

a. Calculate Accuracy

b. Precision

c. Recall

d. F- Measure

2. Begin by writing the formula for each calculation, then show your steps to arrive at your answer.

a. Calculate Accuracy

b. Precision

c. Recall

d. F- Measure

Bayes Theorem

3. (a) Suppose the fraction of undergraduate students who smoke is 15% and

the fraction of graduate students who smoke is 23%. If one-fifth of the college students are graduate students and the rest are undergraduates, what is the probability that a student who smokes is a graduate student?

(b) Given the information in part (a), is a randomly chosen college student

(c) Repeat part (b) assuming that the student is a smoker.

(d) Suppose 30% of the graduate students live in a dorm but only 10% of

the undergraduate students live in a dorm. If a student smokes and lives in the dorm, is he or she more likely to be a graduate or undergraduate student? You can assume independence between students who live in a dorm and those who smoke.

Bayes Theorem

4. Consider the data set below.

a) Estimate the conditional probabilities for (P(A|+), P(B|+), P(C|+), P(A|-). P(B|-), P(C|-)

(b) Use the estimate of conditional probabilities given in the previous question to predict the class label for a test sample (A =0, B =1, C =0) using the naïve Bayes approach.

1. Consider a binary classification problem with the following set of attributes and attribute values:

• Air Conditioner = {Working, Broken}

• Mileage = {High, Medium, Low}

• Rust = {Yes, No}

Suppose a rule-based classifier produces the following rule set:

(a) Are the rules mutually exclusive?

(b) Is the rule set exhaustive?

(c) Is ordering needed for this set of rules?

(d) Do you need a default class for the rule set?

2. Consider a training set that contains 100 positive examples and 400 negative examples. For each of the following candidate rules.

R1: A -→ + (covers 4 positive and 1 negative examples)

R2: B -→ + (covers 30 positive and 10 negative examples)

R3: C -→ + (covers 100 positive and 90 negative examples)

Note: The rules do not cover the entire training set. This is not an exhaustive rule set.

a. Determine which is the best and worst candidate rule according to Rule accuracy.

b. Determine which is the best and worst candidate rule according to FOIL’s information gain.

Review of FOIL’s Information Gain

R0: {} => class (initial rule)

R1: {A} => class (rule after adding conjunct)

Gain(R0, R1) = t [ log (p1/(p1+n1)) – log (p0/(p0 + n0)) ]

where…
t (total) number of positive instances covered by both R0 and R1

p0 number of positive instances covered by R0

n0 number of negative instances covered by R0

p1 number of positive instances covered by R1

n1 number of negative instances covered by R1

3. Consider the one-dimensional data set shown below.

Data set for Exercise 3.

x

0.5

3.0

4.5

4.6

4.9

5.2

5.3

5.5

7.0

9.5

y – 1st

y – 2nd

y – 3rd

y – 4th

a. Place the indicated symbol ( + or – ) into each cell for the purpose of classifying the data point x =5.0 according to its 1-, 3-, 5-, and 9-nearest neighbors (using majority vote).

Number of data points  symbol to be used/inserted into y row

1st Row 1-nearest neighbor  +

2nd Row 3-nearest neighbor  –

3rd Row 5-nearest neighbor +

4th Row 9-nearest neighbor –

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Other
thank you very much
Customer 462327, September 22nd, 2022
Ethics
Thanks so much!!!
Customer 454087, June 24th, 2020
Healthcare & Medical
Good content and organization.
Customer 452441, April 13th, 2022
Other
Smart response.
Customer 462457, April 13th, 2022
Technology
I want to say, "Thank you so much!" to the writer that completed the revision to my specifications. Although there are slight changes that need to be made, I am satisfied with the final product.
Customer 452455, January 19th, 2023
Military
excellent job
Customer 456821, August 3rd, 2022
Marketing
Very good job! I really appreciate the work and effort you've done. it helped me a lot. the feedback has been followed one by one and I appreciate that! I will assign you for future work, and I will be sending a tip soon!
Customer 462787, August 1st, 2022
Outstanding work!!
Customer 460073, August 4th, 2022
Management
The paper was great but it was almost 24 hours late
Customer 454067, February 21st, 2020
Commendable. Review credentials alignment in APA cover page. Student paper https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/apa_sample_paper.html
Customer 453187, March 31st, 2022
Education
excellent
Customer 463813, March 10th, 2023
excellent job
Customer 456821, July 30th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend