5080_assig_1_1

docx

School

Austin Peay State University *

*We aren’t endorsed by this school

Course

5080

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

8

Uploaded by JusticeGalaxyHorse20

Report
CSCI 5080 Assignment_01 1.(a) Mean (Average) Age: Mean = (11 + 13 + 15 + 17 + 19 + 21 + 21 + 23 + 23 + 23 + 23 + 25 + 27 + 30 + 33 + 33 + 33 + 33 + 36 + 36 + 38 + 40 + 46 + 48 + 54) / 25 Mean = 741 / 25 = 28.84 (rounded to two decimal places) Median Age = 27 (b) Mode Age and Modality : 23 and 33 . the data bimodal ( two modes). (c) Midrange = (11 + 54) / 2 = 32.5 (d) First Quartile (Q1) and Third Quartile (Q3): Q1: {11,13,15,17,19,21,21,23,23,23,23,25} = 𝟐? Q3: {30,33,33,33,33,36,36,38,40,46,48,54} = 𝟑? (e) Five-Number Summary: 1 CSCI 5080_Assignment_01
Minimum: 11 Q1: 21 Median: 27 Q3: 36 Maximum: 54 (f) Boxplot: Time spent30 mins 2.(a) b) age %fat min 20 7.6 Q1 33.25 25.13 Med 50 30 Q3 58.25 33.3 max 62 40.2 c) 2 CSCI 5080_Assignment_01 age %fat mean 45.78 28.25 median 50 30 Standard deviation 14.38 9.02
d) 3 CSCI 5080_Assignment_01
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Time spent 25 mins 3.(a) x y 15 12 7 0 24 16 21 10 √((15 − 12)^2 + (7 − 0)^2 + (24 − 16)^2 + (21 − 10)^2) = sqrt(9 + 49 + 64 + 121) = (243) = 15.588 15.588 The Manhattan distance : |15-12| + |7-0| + |24-16| + |21-10| = 3 + 7 + 8 + 11 = 29 Minkowski distance : ³√ ((15-12)^3 + (7-0)^3 + (24-16)^3 + (21-10)^3)) = ³√ (27 + 343 + 4096 + 1331)) = ³√ 5797) 4 CSCI 5080_Assignment_01 0 5 10 15 20 25 30 35 40 45 0 10 20 30 40 50 60 70 %fat Age Age, % fat
= 18.05 (d ) The Supremum distance max(|15-12|, |7-0|, |24-16|, |21-10|) = max(3, 7, 8, 11) = 11 Time spent : 25 Mins 4.(a) Ranking the database points based on different similarity measures for the query point x = (1.3, 1.5): Euclidean Distance X = (1.3, 1.5) = (x1,x2) X1 = (1.6, 1.8) = (a1,a2) d(x,a) = √(x1−a1)^2+(x2−a2)^2 = √(1.3−1.6)^2+(1.5−1.8)^2 = √(0.3)^2+(0.3)^2 = √(0.09+0.09) = √0.18 = 0.42 X = (1.3, 1.5) = (x1,x2) X2 = (2.1, 1.6) = (a1,a2) d(x,a) = √(x1−a1)^2+(x2−a2)^2 = √(1.3−2.1)^2+(1.5−1.6)^2 = √(0.8)^2+(0.1)^2 = √0.64+0.01 = √0.65 = 0.81 X = (1.3, 1.5) = (x1,x2) X3 = (1.7, 1.2) = (a1,a2) d(x,a) = √(x1−a1)^2+(x2−a2)^2 = √(1.3−1.7)^2+(1.5−1.2)^2 = √(0.4)^2+(0.3)^2 = √0.16+0.09 = √0.25 = 0.5 X = (1.3, 1.5) = 5 CSCI 5080_Assignment_01
(x1,x2) X4 = (1.2, 1.4) = (a1,a2) d(x,a) = √(x1−a1)^2+ (x2−a2)^2 = √(1.3−1.2)^2+(1.5−1.4)^2 = √(0.1)^2+(0.1)^2 = √0.01+0.01 = √0.02 = 0.14 X = (1.3, 1.5) = (x1,x2) X5 = (1.5, 1.3) = (a1,a2) d(x,a) = √(x1−a1)^2+(x2−a2)^2 = √(1.3−1.5)^2+(1.5−1.3)^2 = √(0.2)^2+(0.2)^2 = √0.04+0.04 = √0.08 = 0.28 Manhattan Distance: X1: |1.3 - 1.6| + |1.5 - 1.8| = 0.6 X2: |1.3 - 2.1| + |1.5 - 1.6| = 1.1 X3: |1.3 - 1.7| + |1.5 - 1.2| = 0.7 X4: |1.3 - 1.2| + |1.5 - 1.4| = 0.2 X5: |1.3 - 1.5| + |1.5 - 1.3| = 0.4 Supremum Distance: X1: max(|1.3 - 1.6|, |1.5 - 1.8| = 0.3 X2: max(|1.3 - 2.1|, |1.5 - 1.6|) = 0.8 X3: max(|1.3 - 1.7|, |1.5 - 1.2|) = 0.5 X4: max(|1.3 - 1.2|, |1.5 - 1.4|) = 0.3 X5: max(|1.3 - 1.5|, |1.5 - 1.3|) 6 CSCI 5080_Assignment_01
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
= 0.2 Cosine Similarity: X1: (1.3 * 1.6 + 1.5 * 1.8) / (√(1.3^2 + 1.5^2) * √(1.6^2 + 1.8^2)) ≈ 0.987 X2: (1.3 * 2.1 + 1.5 * 1.6) / (√(1.3^2 + 1.5^2) * √(2.1^2 + 1.6^2)) ≈ 0.92 X3: (1.3 * 1.7 + 1.5 * 1.2) / (√(1.3^2 + 1.5^2) * √(1.7^2 + 1.2^2)) ≈ 0.918 X4: (1.3 * 1.2 + 1.5 * 1.4) / (√(1.3^2 + 1.5^2) * √(1.2^2 + 1.4^2)) ≈ 0.999 X5: (1.3 * 1.5 + 1.5 * 1.3) / (√(1.3^2 + 1.5^2) * √(1.5^2 + 1.3^2)) ≈ 0.999 rankings Euclidean Distance Order: X4, X3, X5, X1, X2 Manhattan Distance Order: X4, X5, X3, X1, X2 Supremum Distance Order: X4, X2, X3, X1, X5 Cosine Similarity Order: X1, X4, X3, X2, X5 (b) Normalizing the data using Euclidean distance: normalize the data, divide each data point by its Euclidean norm (or Euclidean length). X1: (1.6, 1.8) = (1.6 / √(1.6^2 + 1.8^2), 1.8 / √(1.6^2 + 1.8^2)) ≈ (0.71, 0.71) X2: (2.1, 1.6) = (2.1 / √(2.1^2 + 1.6^2), 1.6 / √(2.1^2 + 1.6^2)) ≈ (0.89, 0.46) X3: (1.7, 1.2) = (1.7 / √(1.7^2 + 1.2^2), 1.2 / √(1.7^2 + 1.2^2)) ≈ (0.89, 0.46) 7 CSCI 5080_Assignment_01
X4: (1.2, 1.4) = (1.2 / √(1.2^2 + 1.4^2), 1.4 / √(1.2^2 + 1.4^2)) ≈ (0.77, 0.64) X5: (1.5, 1.3) = (1.5 / √(1.5^2 + 1.3^2), 1.3 / √(1.5^2 + 1.3^2)) ≈ (0.87, 0.50) Euclidean distance for the query point (1.3, 1.5) to the normalized points: X1: √((1.3 - 0.71)^2 + (1.5 - 0.71)^2) ≈ 1.08 X2: √((1.3 - 0.89)^2 + (1.5 - 0.46)^2) ≈ 1.02 X3: √((1.3 - 0.89)^2 + (1.5 - 0.46)^2) ≈ 1.02 X4: √((1.3 - 0.77)^2 + (1.5 - 0.64)^2) ≈ 0.98 X5: √((1.3 - 0.87)^2 + (1.5 - 0.50)^2) ≈ 1.06 Euclidean distance for the normalized data is: X4, X2, X3, X5, X1 Time spent = 30minutes 8 CSCI 5080_Assignment_01