Git Product home page Git Product logo

dosnes's Introduction

DOSNES

DOSNES is a new method to visualize your data.

Project Page

http://yaolubrain.github.io/dosnes/

Paper

Doubly Stochastic Neighbor Embedding on Spheres
Yao Lu, Jukka Corander, Zhirong Yang
Pattern Recognition Letters, 2019

How to use?

Here is a simple example.

% Generate data and its similarity matrix
X = randn(1000,10);
D = pdist2(X,X,'squaredeuclidean');
P = exp(-D);

% Normalize the similarity matrix to be doubly stochastic by Sinkhorn-Knopp method
for i = 1:100
    P = bsxfun(@rdivide,P,sum(P,1));
    P = bsxfun(@rdivide,P,sum(P,2));
end    

% Run t-SNE with the spherical constraint
Y = tsne_p_sphere(P);

% Normalize Y to have unity radius for visualization
Y = bsxfun(@rdivide,Y,sqrt(sum(Y.^2,2)));

% Save the data 
dosnes_data = [Y ones(length(Y),1) 5*ones(length(Y),1)];
csvwrite('data.csv',dosnes_data);

Now open dosnes.html with Firefox. Don't use Chrome. You now have the DOSNES visualization in your browser.

For visualizations of more features and real world data, please see the demo folder.

In main javascript code of the demos, makeTextSprite() is to create the facing-to-viewer text labels. In the CSV files, the first three columns are XYZ-coordinates, the forth column is the class label and the last column is the size of the data points.

Python Implementation

https://github.com/Coni63/DOSNES

dosnes's People

Contributors

yaolubrain avatar eglassman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.