Answer the questions | Computer Science homework help



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

more likely to be a graduate or undergraduate 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}

• Engine = {Good, Bad}

• 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)) ]


 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.














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 –

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

We value our customers and so we ensure that what we do is 100% original..
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

The Product ordered is guaranteed to be original. Orders are checked by the most advanced anti-plagiarism software in the market to assure that the Product is 100% original. The Company has a zero tolerance policy for plagiarism.

Read more

Free-revision policy

The Free Revision policy is a courtesy service that the Company provides to help ensure Customer’s total satisfaction with the completed Order. To receive free revision the Company requires that the Customer provide the request within fourteen (14) days from the first completion date and within a period of thirty (30) days for dissertations.

Read more

Privacy policy

The Company is committed to protect the privacy of the Customer and it will never resell or share any of Customer’s personal information, including credit card data, with any third party. All the online transactions are processed through the secure and reliable online payment systems.

Read more

Fair-cooperation guarantee

By placing an order with us, you agree to the service we provide. We will endear to do all that it takes to deliver a comprehensive paper as per your requirements. We also count on your cooperation to ensure that we deliver on this mandate.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages