Skip to main content

Noise contrastive data visualization

Project description

Conda PyPI GitHub Build Status

ncvis

NCVis is an efficient solution for data visualization. It uses HNSW for fast nearest neighbors graph construction and a parallel approach for building the graph embedding.

Using

import ncvis

vis = ncvis.NCVis()
Y = vis.fit_transform(X)

More detailed examples can be found here.

Installation

Conda [recommended]

You do not need to setup the environment if using conda, all dependencies are installed automatically.

$ conda install -c alartum ncvis 

Pip [not recommended]

Important: be sure to have a compiler with OpenMP support. GCC has it by default, which is not the case with clang. You may need to install llvm-openmp library beforehand.

  1. Install numpy and cython packages (compile-time dependencies):
    $ pip install numpy cython
    
  2. Install ncvis package:
    $ pip install ncvis
    

From source [not recommended]

Important: be sure to have OpenMP available.

First of all, download the pcg-cpp and hnswlib libraries:

$ make libs

Python Wrapper

If conda environment is used, it replaces library search paths. To prevent compilation errors, you either need to use compilers provided by conda or switch to pip and system compilers.

  • Conda

    $ conda install conda-build numpy cython scipy
    $ conda install -c conda-forge cxx-compiler c-compiler
    $ conda-develop -bc .
    
  • Pip

    $ pip install numpy cython
    $ make wrapper
    

You can then use pytest to run some basic checks

$ pytest -v recipe/test.py

C++ Binary

  • Release

    $ make ncvis
    
  • Debug

    $ make debug
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncvis-1.5.1.tar.gz (185.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page