[SOLVED] CSCI347 Homework 2

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon 02-ogtwth.zip (382.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

CSCI 347 Homework 02

Show your work. Include any code snippets you used to generate an answer, using comments in the code to clearly indicate which problem corresponds to which code

Consider the following data matrix

X1 X2 X3

red yes blue no yellow no yellow no

red yes yellow yes

  1. Use matplotlib to create a bar plot for the counts of the variable X2. Make sure to label the axis.
  2.  Use one-hot encoding to transform all the categorical attributes to numerical values. Write down the transformed data matrix. (In what follows, we will referred to the transformed data matrix as Y).
  3.  What is the Euclidean distance between instance x2 (second row) and x7 (seventh row) after applying one-hot encoding.
  4.  What is the cosine similarity (cosine of the angle) between data instance x2 and data instance x7 after applying one-hot encoding?
  5.  What is the Hamming distance between data instance x2 and data instance x7 after applying one-hot encoding?
  6.  What is the Jaccard similarity between data instance x2 and x7 after applying one-hot encoding?
  7.  What is the multi-dimensional mean of Y ?
  8. What is the estimated variance of the first column of Y ?
  9.  What is the resulting matrix after applying standard (z-score) normalization to the matrix Y . In the following, we will call this matrix Z.
  10. What is the multi-dimensional mean of Z?
  11.  Let zi be the i-th row of Z. What is Euclidean distance between z2 and z7?

Acknowledgements: Homework problems adapted from assignments of Veronika Strnadova- Neeley.

Answer the following:

x1 x2

D= x3 x4

north south east west north north

x5
x6
x7 blue no west

  • 02-ogtwth.zip