Skip to main content

Python interface to langevintour

Project description

langevitour for Python

PyPI - Version PyPI - Python Version

Python interface for langevitour a HTML widget that randomly tours projections of a high-dimensional dataset with an animated scatter-plot.

For more information see the langevitour Github repo or website.

Installation

pip install langevitour

Python usage

import numpy as np

from langevitour import Langevitour

# Generate a sample dataset
X = []
group = []
n = 20000

def r():
    return np.random.normal(0, 0.02)

for i in range(n):
    a = i/n * np.pi * 2
    X.append([
        10 + np.sin(a)/3 + r(),
        20 + np.sin(a*2)/3 + r(),
        30 + np.sin(a*3)/3,
        40 + np.sin(a*4)/3,
        50 + np.sin(a*5)/3
    ])
    group.append(int(i*4/n))

# Extra axes (specified as columns of a matrix)
extra_axes = [[1], [2], [0], [0], [0]]
extra_axes_names = ["V1+2*V2"]

tour = Langevitour(
    X,
    group=group,
    extra_axes=extra_axes,
    extra_axes_names=extra_axes_names,
    point_size=1,
)
tour.write_html("langevitour_plot.html")

langevitour also works in jupyter notebooks.

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

langevitour-0.7.tar.gz (54.8 kB view details)

Uploaded Source

Built Distribution

langevitour-0.7-py3-none-any.whl (55.2 kB view details)

Uploaded Python 3

File details

Details for the file langevitour-0.7.tar.gz.

File metadata

  • Download URL: langevitour-0.7.tar.gz
  • Upload date:
  • Size: 54.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for langevitour-0.7.tar.gz
Algorithm Hash digest
SHA256 166a1e472c2c164eca4fc4882e5ff33c772e851058c62f7ee2a731d4157dae4a
MD5 f0dcb1413b5f7ae9671ba44b6971dbf8
BLAKE2b-256 c511d4913f0c97ae29bc18deb196ac535618e34d567cbaee3addf46a1b9aef95

See more details on using hashes here.

File details

Details for the file langevitour-0.7-py3-none-any.whl.

File metadata

  • Download URL: langevitour-0.7-py3-none-any.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for langevitour-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d22985e70684596f41f0db68274fb4a26062a41751fb55d95c8dfc5bd5f47b6
MD5 8537c73a19da4c4e36db4d007de0d792
BLAKE2b-256 7796e6e8d3169a0800b0a8d2d48cc7e18830d3b50ba3d3e4b9bbda8e4b63650c

See more details on using hashes here.

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