Graph theoretic scatterplot diagnostics
Project description
pyscagnostics
Python wrapper for computing graph theoretic scatterplot diagnostics.
Scagnostics describe various measures of interest for pairs of variables, based on their appearance on a scatterplot. They are useful tool for discovering interesting or unusual scatterplots from a scatterplot matrix, without having to look at every individual plot.
Wilkinson L., Anand, A., and Grossman, R. (2006). High-Dimensional visual analytics: Interactive exploration guided by pairwise views of point distributions. IEEE Transactions on Visualization and Computer Graphics, November/December 2006 (Vol. 12, No. 6) pp. 1363-1372.
Installation
pip install pyscagnostics
Usage
from pyscagnostics import scagnostics
# Using NumPy arrays or lists
measures, _ = scagnostics(x, y)
print(measures)
# Using Pandas DataFrame
all_measures = scagnostics(df)
for measures, _ in all_measures:
print(measures)
Documentation
def scagnostics(
*args,
bins: int=50,
remove_outliers: bool=True
) -> Tuple[dict, np.ndarray]:
"""Scatterplot diagnostic (scagnostic) measures
Scagnostics describe various measures of interest for pairs of variables,
based on their appearance on a scatterplot. They are useful tool for
discovering interesting or unusual scatterplots from a scatterplot matrix,
without having to look at every individual plot.
Example:
`scagnostics` can take an x, y pair of iterables (e.g. lists or NumPy arrays):
```
from pyscagnostics import scagnostics
import numpy as np
# Simulate data for example
x = np.random.uniform(0, 1, 100)
y = np.random.uniform(0, 1, 100)
measures, bins = pyscagnostics.scagnostics(x, y)
```
A Pandas DataFrame can also be passed as the singular required argument. The
output will be a generator of results:
```
from pyscagnostics import scagnostics
import numpy as np
import pandas as pd
# Simulate data for example
x = np.random.uniform(0, 1, 100)
y = np.random.uniform(0, 1, 100)
z = np.random.uniform(0, 1, 100)
df = pd.DataFrame({
'x': x,
'y': y,
'z': z
})
results = pyscagnostics.scagnostics(df)
for measures, bins in results:
print(measures)
```
Args:
*args:
x, y: Lists or numpy arrays
df: A Pandas DataFrame
bins: Max number of bins for the hexagonal grid axis
The data are internally binned starting with a (bins x bins) hexagonal grid
and re-binned with smaller bin sizes until less than 250 empty bins remain.
remove_outliers: If True, will remove outliers before calculations
Returns:
(measures, bins)
measures is a dict with scores for each of 9 scagnostic measures.
See pyscagnostics.measure_names for a list of measures
bins is a 3 x n numpy array of x-coordinates, y-coordinates, and
counts for the hex-bin grid. The x and y coordinates are re-scaled
between 0 and 1000. This is returned for debugging and inspection purposes.
If the input is a DataFrame, the output will be a generator yielding scagnostics
for each combination of column pairs
"""
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f1c4744ef38b707deda029512d301b180e4a585b8a42c89d931a50f53b4c5c6 |
|
MD5 | d36b76898d2e688ed8f72ede26557307 |
|
BLAKE2b-256 | d08d8cb89bc252ae634d4844a444bcd8f205f9993048cf315223194a12089618 |
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b8d6c2ab4460f378d937175c64860517236bec08df28f1bf06e1fdb071f5b3 |
|
MD5 | 36e43ed631c9cffe37412fbeea8b10d8 |
|
BLAKE2b-256 | 39477cd72631fa84dedd935ae793f7f145c530cfeee2c5491888c814453d0d9e |
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ef264fb79538fa8f9587248b327ec87e0b2004264a0e219f135517adcbdea45 |
|
MD5 | 192f0cf7092e97c83d2ea25e7ffb1022 |
|
BLAKE2b-256 | 3f06533a9ee8e2c11e04e339a863099aa52f78035094cd35482fd4b0f4ff03ac |
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4190edea19da14066f7db0ebf7209656aad56a9bcc80c94b5b3c12a6601841 |
|
MD5 | 115ffe59ed3a95a12b69486a8c38af97 |
|
BLAKE2b-256 | 627fc9379e49858f3db90a615dc022f1fb8d3bd8cafc9b63b0b2f09c5a10f1eb |
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 910ee8d1d288526ef1023239888e189074d9fce5964ba6611fc2d6efbe98fc23 |
|
MD5 | e19b17e1b3f1c684954f4039ae80068e |
|
BLAKE2b-256 | a939d94999fc9337d4a4732a80704cfecb6cc0365b55efb50e8f86cc1f7d4679 |
Hashes for pyscagnostics-0.1.0a1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637ce8c17802a53592252b20466c92f3a0d46d04b242119a5dbafc98cfd939b0 |
|
MD5 | d86c0ef42b0ba7911059c3037d809fe7 |
|
BLAKE2b-256 | 53b6667dac5fd50b04ffcc544f323e79324801b5b5e006cfcd5ce3677f89f677 |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95e0c8c9a7cf252b986be9fda4ec2b812f3244e398cb04a42a2472133ec658ae |
|
MD5 | 1352007a93c08d9809c5ccb56ddfef12 |
|
BLAKE2b-256 | de4d8e5f6c38514072bebd06c585373d1b9caba96781b21466c2c001a818e6e1 |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8daafbd9d087a3d9e45dde531df4733e73dd327a67c7889f24bcc5a645633df1 |
|
MD5 | 16416fc8e3e40bdd1f48ebf20653e899 |
|
BLAKE2b-256 | 01cdd0b2cc982e19867840a2c9332a0f94bed2f3560c134fe6ddcfe29da5dabe |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58dcbfe7ecb18792fd7132d6cf63ae4553258a05c1c2f23874dc3c0981d2ed66 |
|
MD5 | 3048a4c4ba291c6a92ff4bd5da3b581d |
|
BLAKE2b-256 | 455e5fffade75ddc579e4d0c98c1cbf08af0c510e2b84f5675f7cbb871982781 |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 810add2f561778f3a3aa16beaef770ed6e04ffc9ae1ad5d1fe45c0d13248dd7a |
|
MD5 | 9cb8aa82630829c92e3d5aedde4d05ad |
|
BLAKE2b-256 | 71cac45b986ff60ee11eb841e55af6140d1d2eed5990bcd3fcb30235b1e78364 |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c8374524e6631fd6556f3249be0b4103f02f20442cd27f272c6023ecbfbb2bb |
|
MD5 | 7262f2be228e71885ab0d156b86142ea |
|
BLAKE2b-256 | 6776dbbe8bc2bb34922cf489a729706c212f82c062144c8b365550537753f676 |
Hashes for pyscagnostics-0.1.0a1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aefda632b35c8766a0dc256e4bb924c3a8f1df4824be8d5409f4752736742349 |
|
MD5 | a89fea762b28a53bd5d007b03d922d53 |
|
BLAKE2b-256 | 5a16e93e6c7a026e428bb9ef6aee84d4ef88da87e1b32bc4ae0ada374ef07e85 |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b5a0e7529f4615daf986a82fb36af70ca19a63822849203926938db9ce7e9e7 |
|
MD5 | d32e8cd91466c15cfd89d439e3a5b3f0 |
|
BLAKE2b-256 | 83df2f3ca8f3b3ff62defef89609031bb7ca806c68133e189d673f9d931ebf2c |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea685f53fc62c38a274e3c2a32cb6c32a83895c7f5274e2ed0c55a2cfe7c901 |
|
MD5 | 396dbfde1f6b3df5cb1ed2c95e344a9b |
|
BLAKE2b-256 | edb157bd1eb13aa3b43098538e9d34b85ce043b041fc7ed758c9c2c25f74a514 |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0cd60cf01e135347520e24b8934e12a583e83d02061bb6ef14472510b16f1b |
|
MD5 | 3c267799cc021c58f1be0e3d667e0dbc |
|
BLAKE2b-256 | 37ce15ab8900011300cf5d8c1591efc1af268cef6fe4510251422b9cb33a6994 |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04306dbb83d4918f3170972c08fcddc2fc381db15c4d4bea6176805cedb278bc |
|
MD5 | 2495f019e4c2650579954222e6db430f |
|
BLAKE2b-256 | 38e4a95771c94c936ce4684ba25e107bdcd5489d8fcfb30afd2b5e26333b5c12 |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f139ca346332f71ed44a533c6adc6c37bdb586ee63dce2d151f275c33d62bb66 |
|
MD5 | 007433e1e8d4437c280bbfe221930167 |
|
BLAKE2b-256 | d6c221a41ec6c2b16a1914d51f8b7b4ccb24cbc42ba3476280e4f1a756d868ea |
Hashes for pyscagnostics-0.1.0a1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c8f99a0f8ae12ba50a71c5705b8c26c99d1f16a0af1fb382bce0770b0540a5 |
|
MD5 | e57ab2ee4e785cf594086382706390fe |
|
BLAKE2b-256 | 8b5163e24a20d46107d61deccb55b07dba4662faf6cc7a8b204d425a787c46a9 |