Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 15 pages
Other

COS4852 ASSIGNMENT 3 - 2026 [Unique No.: 230456]

Document preview thumbnail
Preview 3 out of 15 pages

Complete Solutions to COS4852 Assignment 3 - 2026. PLEASE DO NOT DISTRIBUTE! I've worked really hard on this assignment and it's guaranteed to get an 80% +. Passed all plaguarism checks on turnitin. Neatly set up and contains notes to help you with future assignments. You just have to convert to word and add your own cover page before submitting.

Content preview

Machine Learning COS4852
Assignment 3
Unique No.: 230456

Due Date: 20 August 2026

,How You Should Structure and Submit Assignments
Use this document both to check your own answers and as a model of the standard expected for future
assignment submissions. Before your next submission, make sure you do the following:
● Answer every sub-part (a, b, c, i, ii, iii …) separately and label it clearly — don't merge sub-parts into
one paragraph.
● Show every step of a calculation, not just the final number. Markers award marks for method, not
only the final answer.
● State the formula you are using before you substitute numbers into it.
● Draw diagrams neatly (by hand or using software), label axes, and mark every instance/point
referenced in the question.
● Where a question says 'prove it' or 'show that', explicitly state the conclusion in words after the
calculation — don't leave the marker to infer it.
● For coding questions, submit actual output/screenshots from code you ran yourself, not what you
expect the output to be.
● Round consistently (2–3 decimal places is usually sufficient) and keep units/labels consistent
throughout.
● Submit a single, clearly ordered PDF or Word document with question numbers as headings, in the
order they appear on the assignment paper.


The rest of this document works through the actual assignment (Machine Learning: KNN, Perceptrons, Neural
Networks, and hands-on coding) exactly the way a full-mark submission should look.

, Question 1 — K-Nearest Neighbours [100]
Dataset: A1(4.0,4.0), A2(4.3,2.5), A3(6.5,3.0), A4(6.0,4.5) — Class A; B1(7.5,8.5), B2(6.5,6.8), B3(7.5,6.0),
B4(5.0,6.5), B5(6.7,5.0) — Class B; C1(3.5,2.5) — Class C. New instance V = (5.0, 5.0).

a) Diagram




Figure Q1: All instances, V, and the k=5 neighbourhood boundaries for both distance measures (bonus part shown here
too).

b) Euclidean distance, k = 5
Formula: d(V,P) = √[(x_V − x_P)² + (y_V − y_P)²]
Instance Calculation Distance Class
A4 √[(5−6.0)²+(5−4.5)²] = √(1+0.25) 1.118 A
A1 √[(5−4.0)²+(5−4.0)²] = √(1+1) 1.414 A
B4 √[(5−5.0)²+(5−6.5)²] = √(0+2.25) 1.500 B
B5 √[(5−6.7)²+(5−5.0)²] = √(2.89+0) 1.700 B
B2 √[(5−6.5)²+(5−6.8)²] = √(2.25+3.24) 2.343 B
A3 √[(5−6.5)²+(5−3.0)²] = √(2.25+4) 2.500 A
A2 √[(5−4.3)²+(5−2.5)²] = √(0.49+6.25) 2.596 A
B3 √[(5−7.5)²+(5−6.0)²] = √(6.25+1) 2.693 B
C1 √[(5−3.5)²+(5−2.5)²] = √(2.25+6.25) 2.916 C
B1 √[(5−7.5)²+(5−8.5)²] = √(6.25+12.25) 4.301 B

Connected book
 image
Tom M. Mitchell Machine Learning
Publisher: 1997 ISBN: 9781259096952 Edition: Unknown

Document information

Uploaded on
August 17, 2026
Number of pages
15
Written in
2026/2027
Type
Other
Person
Unknown
$16.09

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
UnisaGuides
3.7
(261)
Sold
3799
Followers
1642
Items
101
Last sold
1 month ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions