11
$\begingroup$

I have samples of two classes which are vectors in high dimensional space and I want to plot them in 2D or 3D.

I know about dimensionality reduction techniques, but I need a really simple and easy to use tool (in matlab, python or a prebuilt .exe).

Also I wonder is representation in 2D going to be "meaningful"? (For example how two classes intersect or can be separable).

$\endgroup$
8
$\begingroup$

You could give tSNE a try. It is pretty straightforward to use. It works with Octave, in addition to Matlab and Python. Take a look at the guide to get a first plot within a minute.

$\endgroup$
10
$\begingroup$

One prebuilt tool for visualizing high dimensional data is ggobi. It lets you color the points to represent groups and then has a few options for reducing the high dimensions to a 2 dimensional representation. One particularly nice tool is the 2D grand tour that basically rotates the data cloud in multiple dimensions and shows you an animation of the 2D projection of the rotation. You can slow down or pause the rotation when you see interesting patterns.

$\endgroup$
  • $\begingroup$ A very good tool indeed, which also works with R. $\endgroup$ – Yves Apr 19 '13 at 17:26
2
$\begingroup$

How about a parrellel coordinates plot?

http://www.mathworks.com/help/stats/parallelcoords.html

$\endgroup$
2
$\begingroup$

The classical approach would be to use PCA (Principal Component Analysis) in order to perform a linear dimensionality reduction. Essentially, this projects your data onto a lower-dimension space (in the 2D case this is simply a plane) while preserving as much of the variance of the data as possible.

Running PCA usually involves executing a single command in most programming languages, so it is very simple.

You should remember that it is possible that your data cannot be accurately represented in 2 or 3 dimensions. PCA will automatically give you a quantitative estimate of this: It will tell you what percent of the variance is captured by the resulting low dimensional representation. This will give you a feeling of how much information you lose by looking at this simplified visualization.

$\endgroup$
2
$\begingroup$

Just to add my 5 cents. The python library Scikit-Learn has many algorithms for this:

http://scikit-learn.org/stable/auto_examples/manifold/plot_compare_methods.html#example-manifold-plot-compare-methods-py

enter image description here

$\endgroup$
1
$\begingroup$

The class membership probability is a great method of reduction of dimension. probability of membership in A vs. B ranges from 0 to 1. You can make a plot of the $p(A|x_i)$ vs $p(B|x_i)$ for all of your samples.

Consider the following example for display options. http://www.mathworks.com/help/stats/gmdistribution.cluster.html

$\endgroup$
1
$\begingroup$

Besides @juampa's suggestion you should also try NeRV (Neighbor Retrieval Visualizer), which "is a principled information retrieval based approach to nonlinear dimensionality reduction", and SNE/t-SNE can be seen as special cases of NeRV. The main point of NeRV is to minimize a tradeoff of the recall and the precision between the original space and the display. NeRV is provided as a command line tool written in C++.

A demo picture from their website: the left result emphasizes more on recall (less "misses"), while the right one emphasizes more on precision (less "false neighbors").

enter image description here

$\endgroup$
1
$\begingroup$

If you have no objection to commercial software you can try the software VisuMap that implements dozens of linear and non-linear mapping algorithms for high dimensional data, including methods like PCA, LDA, SMACOF, tSNE, CCA, Sammon, Kohonen Map, etc.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.