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.0a3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b05b38c3e3a3215b87965c39fc4240a47e4a7eda258d49c23e3ac1034da6689c |
|
MD5 | 1ebd2c36d3509eac28b37a9b3b5533bf |
|
BLAKE2b-256 | 0bb486b1474e6b64543aaa83ae19cd8a17243d305aea5346aef6f69ebd0b58f1 |
Hashes for pyscagnostics-0.1.0a3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 425d9c61009935724df9f1c98e034e12beaf71799b4a8d2c23f4c63f087afba0 |
|
MD5 | bde501f47023bd44929e7f7c07049af5 |
|
BLAKE2b-256 | 49e058569f196ada3edb0faa13c2a475910e88b1fe0747ca0e8c673b4ef25163 |
Hashes for pyscagnostics-0.1.0a3-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e80e598437c42815b9dacfb43894e27ee6e86e2a1fcf4ffa0fee16ae5a8b51ad |
|
MD5 | bae017e23b027f0c353ed6726c83651f |
|
BLAKE2b-256 | 6c96e866afdbb0ba77084fab59a1dd2e84fce968a880732bf6fbec3416a99db3 |
Hashes for pyscagnostics-0.1.0a3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16f21a51318e057e07659eddb098c5eb86fead866e827296d2c1c91396262d7 |
|
MD5 | caef3e3a6525692bae6477d6d5eb30f4 |
|
BLAKE2b-256 | 9a7046199b867ae0c500f707093c03720ee5c277c01f00d164bb96efd8176286 |
Hashes for pyscagnostics-0.1.0a3-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fdfec4df59940aa407911b01c04f95e0ff033934c635552355430aed607bdda |
|
MD5 | b0e1bbd8290544e3f5a8497de581bfce |
|
BLAKE2b-256 | 9fb293de00445145deb337aea3207d14a878039528018bdaa66a69b95e8153cb |
Hashes for pyscagnostics-0.1.0a3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71692eeb99ff1fb8d4ec9074548bed61ec802bb64fe6353b0cfc3ee9618aee90 |
|
MD5 | 4fb43dda6abbff05a1d142d578a4e525 |
|
BLAKE2b-256 | 849d37fd7f647d30cf48f917683f7322bf4761cb7653e57e5bae64ebb715cfdc |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26573f367d564a6264f5fac95e7280c36e4e922bba8aa7a7414380e6d6add9a3 |
|
MD5 | ecd4e92722c8fef35ab0e418635e490c |
|
BLAKE2b-256 | d4810ab517b1350008021a63c87c8a7d44d02c9a2ae6c9005b381d24c6069dc0 |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d146e2072232a40c36546dacf2a278a510f12a631c5acdab687b70a9419a5642 |
|
MD5 | cf6f96981b6846d85cbbacbb1596209f |
|
BLAKE2b-256 | 6b387afd8f40df64d05d7de53c20a4ac672fa9996b3dbc6f1840f36112075b28 |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02d8c79b3c00af9bbc252f0c09da849d446432362231a4b27502cdddf21302a0 |
|
MD5 | d5e3f52275e5151370267deeff1a898f |
|
BLAKE2b-256 | 6f5640cdd75946363856f4da58ae00b820a722014a4afe34e261d45e81cd82fb |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c75a698db6e41cfce502f5adfc71b3765f945c765f2859b47a8eb1e48afc5f |
|
MD5 | a1cc043c17349ba73d1923b33934cf97 |
|
BLAKE2b-256 | dfbb5b1bc01b6cd972958bbdfabbe95a455ccfa85a23ccab1204ed5627c737a2 |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1962306b0e6146ca1ff4212b371cde9f96754d8eef531012db55aaf12ca0e49 |
|
MD5 | 97636772a6253b9131e86d1c3e2332e1 |
|
BLAKE2b-256 | cc29186215d49252659205b4ca3de29442122c1a9d2582a9a8e0bbbc9021b1b9 |
Hashes for pyscagnostics-0.1.0a3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a5cdd544ea9fe0f768711412484f5dbcfea5478232648cd99255c8a1c9ad2a4 |
|
MD5 | b0e93aab20006ea814e17c5b1c1c7892 |
|
BLAKE2b-256 | 2f01c375f563ba3323975820aaee15eb8a7771d46e5b36183f960f9bebc55f0b |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec6f077a7f3ecdb39cc321fcb3d912d94c1e94151e138e821ab35d2dbcef0878 |
|
MD5 | 2446deda6264ce80a2f9c6c653a534ee |
|
BLAKE2b-256 | e105ecc89d652da35e51292fcd7936edb16f05763011eec1a20d949d7c912a58 |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96209a0dd1ac9c6300c088ee11219f90d9f266ecd39a60325ab262ef98cfe921 |
|
MD5 | 333fcc0e72c543947a9b0fa67150e192 |
|
BLAKE2b-256 | d9bc343a990c95dcd602466260d6fe763875d6920ceec816a584ec07c2df1789 |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc94717ae4e1921516fcb16f5f5b66206918351d27ec00130bf2dfd1d4323496 |
|
MD5 | 9f9fb9821b6f10bd303cb86149409b3e |
|
BLAKE2b-256 | d9282a5db401998929d75088f44ec328ca5c9bc995f3fda3f156c14a4d915fe0 |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75fd9c49799c75321a62e890c663efc5b7db1d23537ac96876280a9f514caba4 |
|
MD5 | 557d5cb71eebdc4509b747567e2127b7 |
|
BLAKE2b-256 | cc7ca9dc14a1fe51cd0e539aaf37fb93381e0b25587e0ca381cadf4f1011c694 |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d200000e4e42e10e49babc63f6d6f8c0954e0e98eda3161452ea7502d1ca98f8 |
|
MD5 | ee183023fd6b3460cc299f1f3d23e89b |
|
BLAKE2b-256 | c5dd1f3c83707522a135ef774480bec1aafb8d66da199682c910c77c22a3f638 |
Hashes for pyscagnostics-0.1.0a3-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18691c85cff3868451aa575f38dad9c9587a3e4ba1e7d4467f067bd567a72210 |
|
MD5 | 5e1f6321bc6519da5666b7ff2a719c1d |
|
BLAKE2b-256 | 2747fd3920b64d1b8317327b5c31bd2bc477b56b8f2cb768210866aaf05cc7b1 |