Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We want to use the following dataset for this assignment. There are three features (number of bedrooms, number of bathrooms, and the size) and the

We want to use the following dataset for this assignment. There are three features (number of bedrooms, number of bathrooms, and the size) and the target output is the last column (type).

Bedrooms Bathrooms Size (based on SQ Footage) Type
1 1 Small Apartment
2 1 Small Apartment
3 2 Small Town House
4 2 Small Apartment
1 1 Small Apartment
2 2 Medium Apartment
3 3 Medium Apartment
4 3 Large House
1 2 Medium Town House
2 2 Large House
3 3 Large House
4 4 Large House

We also have the following test dataset:

Bedrooms Bathrooms Size (based on SQ Footage) Type
1 1 Large ?
2 2 Medium ?
3 3 Small ?
4 4 Medium ?

1) For the dataset, construct a categorical Nave Bayes model, with Laplace Smoothing. Then, classify the test data points.

2) Classify the test data points using KNN with K=1 and K=3. For Size, use the following function, to calculate the distance:

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_2

Step: 3

blur-text-image_3

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

Algebra and Trigonometry

Authors: Ron Larson

10th edition

9781337514255, 1337271179, 133751425X, 978-1337271172

More Books

Students also viewed these Mathematics questions

Question

What is unrealistic about the domino fault model?

Answered: 1 week ago