CodingTrain / CodingTrain/Suggestion-Box

Force graph using numerical opimization

Open
#1,744 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

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:

1. define an adjacency matrix of your vertexes
2. define a loss function that describes the "error" of a single configuration
3. use your favorite optimization algorithm to minimize it, for example (Gradient Descent):
1. calculate the gradient with respect to the coordinates of the points
2. 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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.