diff --git a/Figure_1.png b/Figure_1.png new file mode 100644 index 0000000..c4f2755 Binary files /dev/null and b/Figure_1.png differ diff --git a/pos_recovery.py b/pos_recovery.py index 0b3399a..182e300 100644 --- a/pos_recovery.py +++ b/pos_recovery.py @@ -7,6 +7,7 @@ def compute_pos(dist, dim=2): """ This function computes the positions of points in space from their distance matrix. + https://math.stackexchange.com/questions/156161/finding-the-coordinates-of-points-from-distance-matrix :param dist: is a square distance matrix :param dim: dimention of the coord system :return: returns points coordinates diff --git a/readme.md b/readme.md index bdfe0f2..b21694c 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,4 @@ +![Alt text](Figure_1.png?raw=true "") ## What? This project is a playground for trying out ideas about sorting signals. ## Why? diff --git a/unscramler.py b/unscramler.py index da70c9a..de8bdcf 100644 --- a/unscramler.py +++ b/unscramler.py @@ -38,10 +38,20 @@ def calc_dist(data): def compute_pos(dist, dim=2): """ This function computes the positions of points in space from their distance matrix. + https://math.stackexchange.com/questions/156161/finding-the-coordinates-of-points-from-distance-matrix + http://www.galileoco.com/literature/OCRyoungHouseholder38.pdf :param dist: is a square distance matrix :param dim: dimention of the coord system :return: returns points coordinates """ + # ToDo: read on eigenvalue constraints and threasholding + # http: // www.galileoco.com / literature / OCRyoungHouseholder38.pdf + # https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4303596/ + # https://dl.acm.org/citation.cfm?id=2398462 + # https://www.stat.berkeley.edu/~bickel/BL2008Aos-thresholding.pdf + # use tSNE to project higher dimensions down to 2. http://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html + + d1j2 = np.expand_dims(np.square(dist[0, :]), 0) di12 = np.expand_dims(np.square(dist[:, 0]), 1) dij2 = np.square(dist)