Suggestion-Box
Suggestion-Box copied to clipboard
Force graph using numerical opimization
I've seen many videos on NN, and I would like to connect to that topic under the optimization prospective... there are a lot of very nice projects that can be done using optimization, and I've just finished implementing one myself that you can find here: https://github.com/AlbertoSinigaglia/force-graph
It's about "force graph" which are those graphs where you tell the algorithm what is connected and what is not, and it tries to find a nice structure with those connections
You can find more infos here: https://en.wikipedia.org/wiki/Force-directed_graph_drawing
The step to implement it are few and simple:
- define an adjacency matrix of your vertexes
- define a loss function that describes the "error" of a single configuration
- use your favorite optimization algorithm to minimize it, for example (Gradient Descent):
- calculate the gradient with respect to the coordinates of the points
- take a small step in the opposite direction fo the gradient
And with this you might have some opportunities to explain how NN actually learns, and a super intuitive way to descrive what means to get stuck on a local minima (sometimes a vertex of a graph gets stuck on the other side of the graph, and never reaches its actual neighbors, and from the optimization POV that's a local minima)