Skip to main content

Noise contrastive data visualization

Project description

Conda PyPI GitHub Build Status

ncvis

NCVis is an efficient solution for data visualization and dimensionality reduction. It uses HNSW to quickly construct the nearest neighbors graph and a parallel (batched) approach to build its embedding. Efficient random sampling is achieved via PCGRandom. Detailed application examples can be found here.

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 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, cython and pybind11 packages (compile-time dependencies):
    $ pip install numpy cython pybind11
    
  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 -c conda-forge cxx-compiler c-compiler conda-build numpy cython pybind11 scipy
    $ conda-develop -bc .
    
  • Pip

    $ pip install numpy cython pybind11
    $ 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.12.tar.gz (325.8 kB view details)

Uploaded Source

File details

Details for the file ncvis-1.5.12.tar.gz.

File metadata

  • Download URL: ncvis-1.5.12.tar.gz
  • Upload date:
  • Size: 325.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for ncvis-1.5.12.tar.gz
Algorithm Hash digest
SHA256 886ec878d3dc533d0bc461b2897e4b25e7420c154d061c9e34c70596a950a274
MD5 14499396f0aa746d85227eb75e980093
BLAKE2b-256 bdce673e4bedd86e06ed13e477674d1a86cfcaa42e95446a16999aad011038b7

See more details on using hashes here.

Supported by

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