Question: Using python 53 def calculateCentroidPos (data): 56 function receives a 2D numpy array data (N x M dimensions) and calculates 58 Note: assume all the
53 def calculateCentroidPos (data): 56 function receives a 2D numpy array "data" (N x M dimensions) and calculates 58 Note: assume all the the examples given in "data" belong to one cluster (5 pts) the new "updated" centroid position for these data function should return a numpy array with 1xM dimensions (centroid position). 62 Parameters: 6 data: 2D numpy array (N x M dim) with continuous numerical values. return None
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
