September 2017
Beginner to intermediate
304 pages
7h 2m
English
The first way that we can evaluate the clusters that we just generated is visually. Let's create another scatter plot. However, this time let's use different shapes for each of the groups:
// Open the driver dataset file.f, err := os.Open("fleet_data.csv")if err != nil { log.Fatal(err)}defer f.Close()// Create a dataframe from the CSV file.driverDF := dataframe.ReadCSV(f)// Extract the distance column.yVals := driverDF.Col("Distance_Feature").Float() // clusterOne and clusterTwo will hold the values for plotting. var clusterOne [][]float64 var clusterTwo [][]float64 // Fill the clusters with data. for i, xVal := range driverDF.Col("Speeding_Feature").Float() { distanceOne := floats.Distance([]float64{yVals[i], ...Read now
Unlock full access