Problem with related terms
Summary
There is a problem in the display of nearest neighbors for Order 1 graph in the graph view. This is detectable at display but this is most likely a front-end issue (feel free to move it back-end if it's not).
Nearest neighbors of a term $i$ are the terms of the graph with the stronger links to $i$ relatively to the chosen proximity measure. In Order 1 graph, the link proximity is the conditional probability \frac{n_{ij}}{n_i} is the confidence metrics : $max(\frac{n_{ij}}{n_i},\frac{n_{ij}}{n_j})$ where $n_i$ is the number of docs containing $i$ and $n_{ij}$ is the number of docs mentioning both $i$ and $j$ ($\frac{n_{ij}}{n_i}$ is the probability of having term $j$ in a document mentioning $i$).
Nearest neighbors ('related terms') are displayed on the left panel after the selection of a term. The 'related terms' box should display the terms with stronger links in decreasing order of links strength. Since the proximity between two terms $i$ and $j$ only depend on the quantities n_{ij}$ and n_{i}$, it is independant of the other terms chosen in the maplist. Consequently, when removing a term B in the map list, the list of nearest neighbors of any given term should not change except the removing of B.
This is not the case, as it can be seen on the example below where several terms are added or removed after single term removal (parenting).
Available at https://dev.sub.gargantext.org/#/share/NodeGraph/188995
Available at https://dev.sub.gargantext.org/#/share/NodeGraph/188997
Steps to reproduce
- Make a map
- Select a term A (with lots neighbors preferably) and record nearest neighbors
- Remove a single term B from maplist that is also one of the nearest neighbors of A
- Select A again and check if the ordered list of related terms is the same less B
What is the current bug behavior?
The nearest neighbors can change a lot with single term removal
What is the expected correct behavior?
No change exept the removed term