November 2018
Beginner to intermediate
348 pages
8h 32m
English
Once we've done that, we may move the previous main() into a different function, leaving ourselves with a blank canvas for main() again. We're now ready for the meat of the program. This is a skeleton program. You're encouraged to actually actively change the program while writing this:
func main() { f, err := os.Open("dev.json") dieIfErr(err) tweets := load(f) p := newProcessor() tweets = p.process(tweets)expC := 20 distances, last := knn(asMatrix(tweets), expC, clusters.EuclideanDistance) log.Printf("distances %v | %v", distances, last)// plot for DBSCAN elbows plt, err := plot.New() dieIfErr(err) plotutil.AddLinePoints(plt, "KNN Distance", plotKNNDist(last)) plt.Save(25*vg.Centimeter, 25*vg.Centimeter, "KNNDist.png")// actually ...Read now
Unlock full access