elbamos / largeVis

An implementation of the largeVis algorithm for visualizing large, high-dimensional datasets, for R
340 stars 63 forks source link

Overcoming p_{j|i} over flow #53

Closed akhst7 closed 5 years ago

akhst7 commented 6 years ago

I have a following data;

str(sLF) Classes ‘data.table’ and 'data.frame': 20000 obs. of 14 variables: $ SSC-A : num 134 123 169 122 133 ... $ CD43 : num 115.8 102.8 82.9 94.3 108 ... $ DEX : num 31.2 50.2 36.8 40 26.7 ... $ CD28 : num 106.6 112.7 71.5 73.3 93.4 ... $ CD45RA : num 95.4 28.4 39.9 90.7 61.5 ... $ CD27 : num 66.4 177.8 83.4 75.1 68.9 ... $ CD279 : num 55.9 97.3 57.2 61.8 55.4 ... $ CD14CD16CD19: num 163.8 50.6 99.4 35.7 167.1 ... $ CD57 : num 89.2 103.4 50 174.8 41.3 ... $ CD3 : num 39.5 120.5 53.6 49.8 51.7 ... $ KLRG1 : num 29.7 100.2 147.8 46.8 30.3 ... $ CD8 : num 65 150.4 57.7 63.1 122 ... $ CD56 : num 174.4 63.1 72 134 172.5 ... $ CD38 : num 138.3 138.8 130.9 99.6 161.4 ... attr(*, ".internal.selfref")=

I run largeVis and received an warning as follows;

v<-largeVis(sLF) Warning message: In largeVis(sLF) : The Distances between some neighbors are large enough to cause the calculation of p_{j|i} to overflow. Scaling the distance vector.

I am not quite sure about "Scaling the distance vector." Could you suggest an workaround of this issue ?

elbamos commented 6 years ago

The warning indicates that a workaround was applied. Part of the algorithm requires exponentiating the distances. If it appears that this will overflow, the implementation scales all the distances before exponentiating them.

You can try scaling your distances (perhaps divide every coordinate by 100?) before running the algorithm and see if the result is preferable.

On Mar 27, 2018, at 1:32 PM, akhst7 notifications@github.com wrote:

I have a following data;

str(sLF) Classes ‘data.table’ and 'data.frame': 20000 obs. of 14 variables: $ SSC-A : num 134 123 169 122 133 ... $ CD43 : num 115.8 102.8 82.9 94.3 108 ... $ DEX : num 31.2 50.2 36.8 40 26.7 ... $ CD28 : num 106.6 112.7 71.5 73.3 93.4 ... $ CD45RA : num 95.4 28.4 39.9 90.7 61.5 ... $ CD27 : num 66.4 177.8 83.4 75.1 68.9 ... $ CD279 : num 55.9 97.3 57.2 61.8 55.4 ... $ CD14CD16CD19: num 163.8 50.6 99.4 35.7 167.1 ... $ CD57 : num 89.2 103.4 50 174.8 41.3 ... $ CD3 : num 39.5 120.5 53.6 49.8 51.7 ... $ KLRG1 : num 29.7 100.2 147.8 46.8 30.3 ... $ CD8 : num 65 150.4 57.7 63.1 122 ... $ CD56 : num 174.4 63.1 72 134 172.5 ... $ CD38 : num 138.3 138.8 130.9 99.6 161.4 ... attr(*, ".internal.selfref")=

I run largeVis and received an warning as follows;

v<-largeVis(sLF) Warning message: In largeVis(sLF) : The Distances between some neighbors are large enough to cause the calculation of p_{j|i} to overflow. Scaling the distance vector.

I am not quite sure about "Scaling the distance vector." Could you suggest an workaround of this issue ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.