• Stars
    star
    1,813
  • Rank 25,607 (Top 0.6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python toolbox for gaining geometric insights into high-dimensional data

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. For a general overview, you may find this talk useful (given as part of the MIND Summer School at Dartmouth).

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

To install the latest stable version run:

pip install hypertools

To install the latest unstable version directly from GitHub, run:

pip install -U git+https://github.com/ContextLab/hypertools.git

Or alternatively, clone the repository to your local machine:

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

Then, navigate to the folder and type:

pip install -e .

(These instructions assume that you have pip installed on your system)

NOTE: If you have been using the development version of 0.5.0, please clear your data cache (/Users/yourusername/hypertools_data).

Requirements

  • python>=3.6
  • PPCA>=0.0.2
  • scikit-learn>=0.24.0
  • pandas>=0.18.0
  • seaborn>=0.8.1
  • matplotlib>=1.5.1
  • scipy>=1.0.0
  • numpy>=1.10.4
  • umap-learn>=0.4.6
  • requests
  • pytest (for development)
  • ffmpeg (for saving animations)

Documentation

Check out our readthedocs page for further documentation, complete API details, and additional examples.

Citing

We wrote a short JMLR paper about HyperTools, which you can read here, or you can check out a (longer) preprint here. We also have a repository with example notebooks from the paper here.

Please cite as:

Heusser AC, Ziman K, Owen LLW, Manning JR (2018) HyperTools: A Python toolbox for gaining geometric insights into high-dimensional data. Journal of Machine Learning Research, 18(152): 1--6.

Here is a bibtex formatted reference:

@ARTICLE {,
    author  = {Andrew C. Heusser and Kirsten Ziman and Lucy L. W. Owen and Jeremy R. Manning},    
    title   = {HyperTools: a Python Toolbox for Gaining Geometric Insights into High-Dimensional Data},    
    journal = {Journal of Machine Learning Research},
    year    = {2018},
    volume  = {18},	
    number  = {152},	
    pages   = {1-6},	
    url     = {http://jmlr.org/papers/v18/17-434.html}	
}

Contributing

Join the chat at https://gitter.im/hypertools/Lobby

If you'd like to contribute, please first read our Code of Conduct.

For specific information on how to contribute to the project, please see our Contributing page.

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, '.', group=list_of_labels)

Plot example

Align

import hypertools as hyp
hyp.plot(list_of_arrays, align='hyper')

BEFORE

Align before example

AFTER

Align after example

Cluster

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

Cluster Example

Describe

import hypertools as hyp
hyp.tools.describe(list_of_arrays, reduce='PCA', max_dims=14)

Describe Example

More Repositories

1

human-memory

Course materials for Dartmouth course: Human Memory (PSYC 51.09)
TeX
243
star
2

hypertools-paper-notebooks

Supporting notebooks and data from hypertools paper
Jupyter Notebook
147
star
3

storytelling-with-data

Course materials for Dartmouth Course: Storytelling with Data (PSYC 81.09).
Jupyter Notebook
90
star
4

cs-for-psych

Course materials for PSYC 132: Introduction to Programming for Psychological Scientists
Jupyter Notebook
83
star
5

computational-neuroscience

Short undergraduate course taught at University of Pennsylvania on computational and theoretical neuroscience. Provides an introduction to programming in MATLAB, single-neuron models, ion channel models, basic neural networks, and neural decoding.
TeX
36
star
6

davos

Import packages in Python, even if they aren't installed!
TeX
34
star
7

timecorr

Estimate dynamic high-order correlations in multivariate timeseries data
Jupyter Notebook
32
star
8

supereeg

Infer activity throughout the brain from a small(ish) number of electrodes using Gaussian process regression
Python
30
star
9

sherlock-topic-model-paper

Data and code for the paper "Geometric models reveal behavioural and neural signatures of transforming naturalistic experiences into episodic memories" by Andrew C. Heusser, Paxton C. Fitzpatrick, and Jeremy R. Manning
Jupyter Notebook
28
star
10

chatify

Add ipython magic commands to Jupyter notebooks that provide LLM-driven enhancements
Python
21
star
11

quail

A python toolbox for analyzing and plotting free recall data
Python
21
star
12

lab-manual

Lab manual for the Contextual Dynamics Laboratory at Dartmouth College
TeX
20
star
13

experimental-psychology

Course materials for PSYC 11: Laboratory in Psychological Science, Dartmouth College (Instructor: Jeremy Manning)
20
star
14

abstract2paper

Auto-generate an entire paper from a prompt or abstract using NLP
Jupyter Notebook
17
star
15

CDL-tutorials

Repo containing useful tutorials on different topics, methods, software tools, and packages used by the CDL
Jupyter Notebook
15
star
16

timecorr-paper

Paper and code for High-level cognition during story listening is reflected in high-order dynamic correlations in neural activity patterns
Jupyter Notebook
11
star
17

brainfit-paper

Paper, code, and data related to the paper "Fitness tracking reveals task-specific associations between memory, mental health, and exercise" by Jeremy R. Manning, Gina M. Notaro, Esme Chen, and Paxton C. Fitzpatrick
Jupyter Notebook
10
star
18

data-wrangler

Wrangle messy numerical, image, and text data into consistent well-organized formats
Python
9
star
19

attention-memory-task

An experiment used to explore interactions between covert attention and recognition memory
Jupyter Notebook
9
star
20

Dartmouth-OpenBCI-Hackathon

Open BCI demo
Python
9
star
21

autoFR

Template for a free recall experiment with automatic audio transcription
JavaScript
8
star
22

supereeg_paper

paper analyses
Jupyter Notebook
7
star
23

CDL-bibliography

Bibtex file shared by the Contextual Dynamics Lab at Dartmouth College
TeX
7
star
24

brain-plots

Quickly and easily create 2d and 3d plots of fMRI data (using MATLAB).
MATLAB
6
star
25

efficient-learning-khan

Experiment, data, and analysis code for "Text embedding models yield high-resolution insights into conceptual knowledge from short multiple-choice quizzes" by Paxton C. Fitzpatrick, Andrew C. Heusser, and Jeremy R. Manning
Python
6
star
26

mental-time-travel-paper

Code for exploring how we distribute our thoughts over time when we remember, using data from a naturalistic memory experiment.
Jupyter Notebook
5
star
27

neurosim

Create synthetic brain data
MATLAB
5
star
28

hypertools-matlab

A set of generic and widely useful tools for manipulating and visualizing high-dimensional data.
MATLAB
5
star
29

cluster-tools-dartmouth

Template scripts for getting jobs to run on Dartmouth's "Discovery" cluster
Python
4
star
30

CDL-docker-stacks

Lightweight, customizable, hierarchically built docker images for common neuro/data science applications. Pre-built images available on Docker Hub
Python
3
star
31

FRFR-analyses

Binder for Feature-rich Free Recall analyses
Jupyter Notebook
3
star
32

hypertools-paper

repo for the HyperTools paper
TeX
3
star
33

chuck-closeify

Automatically create artworks in Chuck Close's iconic style from a reference JPG image
MATLAB
3
star
34

latex-base

Template repository for latex documents produced by the Contextual Dynamics Lab
Jupyter Notebook
2
star
35

storytelling-with-data-binary-converter

Storytelling with Data Assignment 3: Binary converter
Jupyter Notebook
2
star
36

psyc32-eliza

ELIZA chatbot assignment for PSYC 32
Jupyter Notebook
2
star
37

pupil-memory-analysis

Jupyter Notebook
2
star
38

brainfit-task

a package for acquiring fitness tracker (Fitbit) and cognitive task (JsPsych) data on the Amazon Mechanical Turk platform
JavaScript
2
star
39

tubeTopics

Creates a topic model from a YouTube audio track using Latent Dirichlet Allocation (LDA) and google speech-to-text
JavaScript
2
star
40

pca_paper

Jupyter Notebook
2
star
41

CDL-algonauts-2021

Contextual Dynamics Lab (Dartmouth) code related to the CCN Algonauts 2021 challenge
1
star
42

AttentionGroupHackathon

Hackathon for the attention group
1
star
43

prediction-retrodiction-paper

Jupyter Notebook
1
star
44

DIRSA

Dynamic Inter-subject Representational Similarity Analysis
Jupyter Notebook
1
star
45

hypertools-examples-data

Contains example datasets for HyperTools package
1
star
46

sequences

Define a "repeatability" index that says, for an arbitrary time series, how much "fractal structure" there is in the signal.
1
star
47

magellan_data

Data from Manning et al. (2014) in an updated and convenient format
Python
1
star
48

hopfield-demo

Demo hopfield network code
MATLAB
1
star
49

quail-example-notebooks

Interactive tutorials for quail
Jupyter Notebook
1
star
50

thought-trajectories-demo

Demo of hypertools-derived thought trajectories
Jupyter Notebook
1
star
51

llm-course

Dartmouth undergraduate course on large language models and chatbots
Shell
1
star