Question: No dataset provided. Based on the question asked you should still be able to fill in the correct code, where it says #your code here.

No dataset provided. Based on the question asked you should still be able to fill in the correct code, where it says #your code here. In python please
[10 points] Problem 2 - Clustering using EM Method A sample dataset has been provided to you in the '/data/sample_dataset_em.pickle' path. The centroids are in './data/sample_centroids_em.pickle' and the sample result is in './data/sample_result_em.pickle' path. You can use these to test your code. Here are the attributes for the dataset. Use this dataset to test your functions. Dataset should load the points in the form of a list of lists where each list item represents a point in the space. An example dataset will have the following structure. If there are 3 points in the dataset, this would appear as follows in the list of lists. dataset = 15,7,9) Note: A sample dataset to test your code has been provided in the location "data/em_dataset.pickle". Please maintain this as it would be necessary while grading. Do not change the variable names of the returned values. After calculating each of those values, assign them to the corresponding value that is being returned. = import numpy as np import math def em_clustering (centroids, dataset): Input: 1. centroids - A list of lists with each value representing the mean and standard deviation values picked from 2. dataset - A list of points randomly picked. Output: 1. results - Return the updated centroids (updated mean and std values after the Em step) after the first iterat new_centroids = list() # your code here return new centroids
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
