[SOLVED] COEN240- Machine Learning: Homework 2

25.99 $

Programming resource
Digital learning resource
Category:
โœ“ Practical programming resource
โœ“ Suitable for guided study and reference
โœ“ Tutor guidance available when needed

Description

5/5 - (1 vote)

Problem 1 For the K-means clustering problem, when the binary indicators (responsibilities) ๐‘Ÿ a e fi ed f k=1, 2, , K a d =1, 2, , N, de i e f he cl e ce e ๐ฆ , k=1, 2, , K, ch ha he 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 , 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 ๐ถ . 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, ๐ถ , ย ย ย ย ย ย  , ๐ถ . 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?

 

 

ย 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.