Giter Club home page Giter Club logo

hypertools's Introduction

Hypertools logo

"To deal with hyper-planes in a 14 dimensional space, visualize a 3D space and say 'fourteen' very loudly. Everyone does it." - Geoff Hinton

Hypertools example

Overview

HyperTools is designed to facilitate dimensionality reduction-based visual explorations of high-dimensional data. The basic pipeline is to feed in a high-dimensional dataset (or a series of high-dimensional datasets) and, in a single function call, reduce the dimensionality of the dataset(s) and create a plot. The package is built atop many familiar friends, including matplotlib, scikit-learn and seaborn. Our package was recently featured on Kaggle's No Free Hunch blog.

Try it!

Click the badge to launch a binder instance with example uses:

Binder

or

Check the repo of Jupyter notebooks from the HyperTools paper.

Installation

pip install hypertools

or

To install from this repo:

git clone https://github.com/ContextLab/hypertools.git

Then, navigate to the folder and type:

pip install -e .

(this assumes you have pip installed on your system)

Requirements

  • python 2.7, 3.4+
  • PPCA>=0.0.2
  • scikit-learn>=0.18.1
  • pandas>=0.18.0
  • seaborn>=0.7.1
  • matplotlib>=1.5.1
  • scipy>=0.17.1
  • numpy>=1.10.4
  • future
  • pytest (for development)
  • ffmpeg (for saving animations)

If installing from github (instead of pip), you must also install the requirements: pip install -r requirements.txt

Documentation

Check out our readthedocs here.

Citing

We wrote a paper about HyperTools, which you can read here. We also have a repo with example notebooks from the paper here.

Please cite as:

Heusser AC, Ziman K, Owen LLW, Manning JR (2017) HyperTools: A Python toolbox for visualizing and manipulating high-dimensional data. arXiv: 1701.08290

Here is a bibtex formatted reference:

@ARTICLE {,
    author  = "A C Heusser and K Ziman and L L W Owen and J R Manning",
    title   = "HyperTools: A Python toolbox for visualizing and manipulating high-dimensional data",
    journal = "arXiv",
    year    = "2017",
    volume  = "1701",
    number  = "08290",
    month   = "jan"
}

Contributing

(Some text borrowed from the Matplotlib contributing guide.)

Submitting a bug report

If you are reporting a bug, please do your best to include the following:

  1. A short, top-level summary of the bug. In most cases, this should be 1-2 sentences.
  2. A short, self-contained code snippet to reproduce the bug, ideally allowing a simple copy and paste to reproduce. Please do your best to reduce the code snippet to the minimum required.
  3. The actual outcome of the code snippet
  4. The expected outcome of the code snippet

Contributing code

The preferred way to contribute to HyperTools is to fork the main repository on GitHub, then submit a pull request.

  • If your pull request addresses an issue, please use the title to describe the issue and mention the issue number in the pull request description to ensure a link is created to the original issue.

  • All public methods should be documented in the README.

  • Each high-level plotting function should have a simple example in the examples folder. This should be as simple as possible to demonstrate the method.

  • Changes (both new features and bugfixes) should be tested using pytest. Add tests for your new feature to the tests/ repo folder.

Testing

Build Status

To test HyperTools, install pytest (pip install pytest) and run pytest in the HyperTools folder

Examples

See here for more examples.

Plot

import hypertools as hyp
hyp.plot(list_of_arrays, 'o', group=list_of_labels)

Plot example

Align

import hypertools as hyp
aligned_list = hyp.tools.align(list_of_arrays)
hyp.plot(aligned_list)

BEFORE

Align before example

AFTER

Align after example

Cluster

import hypertools as hyp
hyp.plot(array, 'o', n_clusters=10)

Cluster Example

Describe PCA

import hypertools as hyp
hyp.tools.describe_pca(list_of_arrays)

Describe Example

hypertools's People

Contributors

andrewheusser avatar jeremymanning avatar joefink2896 avatar kirstensgithub avatar swaroopgj avatar lucywowen avatar

Watchers

chuan wang 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.