lvdmaaten / bhtsne

Barnes-Hut t-SNE
Other
890 stars 240 forks source link

transposition based on input method #67

Open karoraw1 opened 6 years ago

karoraw1 commented 6 years ago
[karoraw1@jhu.edu@login-node03 bhtsne]$ echo -e '1.0\t0.0\n0.0\t1.0' 
1.0 0.0
0.0 1.0
[karoraw1@jhu.edu@login-node03 bhtsne]$ echo -e '1.0\t0.0\n0.0\t1.0' | ./bhtsne.py -d 2 -p 0.1
-2227.32653069  6608.48958328
2227.32653069   -6608.48958328
[karoraw1@jhu.edu@login-node03 bhtsne]$ echo -e '1.0\t0.0\n0.0\t1.0' > a_file.txt
[karoraw1@jhu.edu@login-node03 bhtsne]$ cat a_file.txt 
1.0 0.0
0.0 1.0
[karoraw1@jhu.edu@login-node03 bhtsne]$ ./bhtsne.py -d 2 -p 0.1 -i a_file.txt 
-6863.21277159  -1236.73732294
6863.21277159   1236.73732294
karoraw1 commented 6 years ago
[karoraw1@jhu.edu@login-node03 bhtsne]$ ./bhtsne.py -d 2 -p 0.1 -i a_file.txt | python -c 'import numpy;  from sys import stdin, stdout; d = numpy.loadtxt(stdin); d -= d.min(axis=0); d /= d.max(axis=0); numpy.savetxt(stdout, d, fmt="%.8f", delimiter="\t")'
0.00000000  0.00000000
1.00000000  1.00000000
[karoraw1@jhu.edu@login-node03 bhtsne]$ echo -e '1.0\t0.0\n0.0\t1.0' | ./bhtsne.py -d 2 -p 0.1 | python -c 'import numpy;  from sys import stdin, stdout; d = numpy.loadtxt(stdin); d -= d.min(axis=0); d /= d.max(axis=0); numpy.savetxt(stdout, d, fmt="%.8f", delimiter="\t")'
1.00000000  0.00000000
0.00000000  1.00000000
karoraw1 commented 6 years ago

i don't think it makes a difference. i just wondered why it happens.

lvdmaaten commented 6 years ago

By definition, the loss of any multidimensional scaling method (that is, a loss that measures to what extent pairwise distances are preserved) is invariant under rotations and inflections of the embedding. I suppose that is what you're seeing here?