Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README headings, add more Linux instructions #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#LargeVis
# LargeVis
This is the *official* implementation of the **LargeVis** model by the original authors, which is used to visualize large-scale and high-dimensional data [(Tang, Liu, Zhang and Mei)](https://arxiv.org/abs/1602.00370). It now supports visualizing both high-dimensional feature vectors and networks. The package also contains a very efficient algorithm for constructing K-nearest neighbor graph (K-NNG).

Contact person: Jian Tang, [email protected]. This work is done when the author is in Microsoft Research Asia.

##Install
## Install
Both C++ source codes and Python wrapper are provided on Linux, OS X and Windows. To install the package, external packages are required, including [GSL (GNU Scientific Library)](http://www.gnu.org/software/gsl/) on Linux and OS X or [BOOST](http://www.boost.org/) on Windows for generating random numbers.

####Linux
#### Linux

On Ubuntu, install the G++ and GSL dependencies:

`sudo apt-get install g++ libgsl-dev`

Compile the source files via:
```
cd Linux
g++ LargeVis.cpp main.cpp -o LargeVis -lm -pthread -lgsl -lgslcblas -Ofast -march=native -ffast-math
```

To install the Python wrapper, modify ```setup.py``` to make sure that the GSL path is correctly set and then run ```sudo python setup.py install```.

####OS X
#### OS X
Install gsl using [Homebrew](http://brew.sh/):
```
brew install gsl
Expand All @@ -27,12 +33,12 @@ g++ LargeVis.cpp main.cpp -o LargeVis -lm -pthread -lgsl -lgslcblas -Ofast -marc

To install the Python wrapper, run ```sudo python setup.py install```.

####Windows
#### Windows
To compile the source files, use Microsoft Visual Studio, where you need to set the BOOST path.

To install the Python wrapper, modify ```setup.py``` to make sure that the BOOST path is correctly set and then run ```python setup.py install```.

##Usage
## Usage
LargeVis is suitable for visualizing both high-dimensional feature vectors and networks. For high-dimensional feature vectors, the format of input file should be as follows: the first line specifies the number of feature vectors and the dimensionality (500 vectors with 10 dimensions in the following example), and each of the next 500 lines describes one feature vector with 10 float numbers.
```
500 10
Expand Down Expand Up @@ -79,7 +85,7 @@ Besides the two parameters, other optional parameters include:
* `-gamma`: The weights assigned to negative edges. Default is 7.
* `-perp`: The perplexity used for deciding edge weights in K-NNG. Default is 50.

##Examples
## Examples
We provide some examples including MNIST(high-dimensional feature vectors) and CondMat(networks) in the ```Examples/``` folder.

For example, to visualize the MNIST dataset,
Expand All @@ -91,7 +97,7 @@ python plot.py -input mnist_vec2D.txt -label mnist_label.txt -output mnist_vec2D
![plot of mnist](Examples/MNIST/mnist_plot.png)

Please cite the following paper if you use LargeVis to visualize your data.
##Citation
## Citation
```
@inproceedings{tang2016visualizing,
title={Visualizing Large-scale and High-dimensional Data},
Expand All @@ -102,5 +108,5 @@ Please cite the following paper if you use LargeVis to visualize your data.
organization={International World Wide Web Conferences Steering Committee}
}
```
##Acknowledgement
## Acknowledgement
Some methods of this package are from a previous work of the LargeVis authors, [LINE (Large-scale Information Network Embedding)](https://github.com/tangjianpku/LINE).