Login using Social Account
     Continue with GoogleLogin using your credentials
You are given an array of points of size 300x2 in the file /cxldata/mltut/points.csv in CSV format.
Each row in this file gives the (x, y) coordinates of a point on a map. Make a scatter plot of these points as per the instructions given below, and use the scatter plot to guess how many clusters there are.
Given a CSV file in the folder /cxldata/mltut/points.csv. You can load as a DataFrame in the notebook using pandas using the following way:
import pandas as pd
pointsdf = pd.read_csv("/cxldata/mltut/points.csv");
Now, convert it into a numpy array
import numpy as np
points = np.array(pointsdf)
Create an array called xs that contains the values of points[:,0] - that is, column 0 of points.
your code comes here
Create an array called ys that contains the values of points[:,1] - that is, column 1 of points.
your code comes here
You can import it in the following way:
import matplotlib.pyplot as plt
Make a scatter plot by passing xs and ys to the plt.scatter() function. Call the plt.show() function to show your plot.
your code comes here
How many clusters do you see?
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
No hints are availble for this assesment
Loading comments...