[SOLVED] COEN240 Homework2

30.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 HW02-klstpl.zip (673 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

Problem 1 For the K-means clustering problem, when the binary indicators (responsibilities) π‘Ÿπ‘˜π‘›β€™s are fixed for k=1, 2, …, K and n=1, 2, …, N, derive for the cluster centers π¦π‘˜, k=1, 2, …, K, such that the following objective function J is minimized:

Problem 2 Iris.xls contains 150 data samples of three Iris categories, labeled by outcome values 0, 1, and 2. Each data sample has four attributes: sepal length, sepal width, petal length, and petal width.

Implement the K-means clustering algorithm to group the samples into K=3 clusters. Randomly choose three samples as the initial cluster centers. Calculate the objective function value J as defined in Problem 1 after the assignment step in each iteration. Exit the iterations if the following criterion is met: 𝐽(Iterβˆ’1)βˆ’π½(Iter) < Ξ΅, where Ξ΅ = 10βˆ’5, and Iter is the iteration number. Plot the objective function value J versus the iteration number Iter. Comment on the result. Attach the code at the end of the homework.

Problem 3 Assume a data sample 𝐱 ∈ ℝ𝐷 comes from one of two classes, 𝐢1 and 𝐢2. Use logistic regression to do classification.

  1. Write the math expression of the logistic regression output, and the criterion used for the final classification.
  2. How many parameters (weights) need to be calculated/trained in this method?

Problem 4 Assume a data sample 𝐱 ∈ ℝ𝐷 comes from one of 𝐾 classes, 𝐢1, 𝐢2, …, 𝐢𝐾. Use logistic regression to do classification.

  1. Write the math expression of the logistic regression output, and the criterion used for the final classification.
  2. How many parameters (weights) need to be calculated/trained in this method?

 

 

  • HW02-klstpl.zip