Answered You can hire a professional tutor to get the answer.

QUESTION

Using the program JULIA: Make a function in your file with the signature : function partition data(data, centroids).

Using the program JULIA:

Make a function in your file with the signature : function partition data(data, centroids). Assume that the input variable data is a collection of vectors that we wish to cluster, and that centroids is a collection of vectors that represent our current guesses for the centroid of each cluster. For each vector data[i] in data, your function should find the nearest centroid to said vector. Your function should return a Julia vector of length length(data) that contains the new cluster index assigned to each input data vector. For example, if the closest centroid to the vector data[i] is centroid[j], then the ith entry in the vector you return should be j. 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question