Skip to main content

The Fourier-Schur transform for spatial statistics.

Project description

(prerelease)

Overview

Fourier-Schur analysis is an analogue of Fourier analysis in which the time domain and corresponding cyclic symmetry are replaced by the spatial joint moment tensor domain and permutation symmetry (or, equivalently, linear spatial symmetry). It is used to derive natural higher-order statistics for “registered” spatial datasets.

The transform works by decomposing the generalized covariance tensor of several random variables into canonical components. The “sectors” (irreducible subrepresentations) defining these components in tensor space are defined a priori by the condition that they are mutually unreachable from each other by arbitrary change-of-coordinate transformations, as part of a rich theory going back to the work of Issai Schur and Hermann Weyl.

The algorithm used here is described in A Schur Transform for Spatial Stochastic Processes. See also Persi Diaconis’ Group Representations in Probability and Statistics for background on the non-abelian Fourier transform in the context of the symmetric group.

Getting started

Install:

pip install schurtransform

Suppose that your data are stored in a multi-dimensional array data[i,j,a] (or similar list-of-list-of-lists), where

  • step index i ranges across n steps (e.g. time-steps, or random variables)

  • sample index j ranges cross N samples (e.g. number of trajectories or landmarks)

  • spatial index a ranges across k dimensions (e.g. k=3)

The following shows basic usage:

import schurtransform as st

data = [
    [[4,2], [4.01,2.1], [3.9,2.2]],
    [[3.99,2.1], [3.7,2.1] ,[4.0,2.2]],
    [[4.4,1.9], [4.3,1.8], [4.3,1.8]],
    [[4.6,2.0], [4.1,1.8], [4.3,1.7]],
]
decomposition = st.transform(
    samples=data,
)
print(list(decomposition.keys()))
print(decomposition['3+1'].data)

This outputs:

['1+1+1+1', '2+1+1', '2+2', '3+1', '4']

[[[[ 0.00000000e+00  4.44722222e-05]
   [ 3.48055556e-05 -3.82222222e-05]]

  [[ 2.09166667e-05  6.05555556e-05]
   [ 1.22222222e-05 -4.38888889e-05]]]


 [[[-1.00194444e-04 -1.22222222e-05]
   [-6.05555556e-05 -6.83333333e-05]]

  [[ 3.82222222e-05  5.61111111e-05]
   [ 5.61111111e-05  0.00000000e+00]]]]

The components are the GL(k)- or Sn-isotypic components of the covariance tensor of data in the tensor space with n tensor factors and k dimensions for each factor. Each one is presented as a multi-dimensional numpy array with n indices ranging across k values.

The library ships with the character tables up to S8. For more than 8-fold statistics, see generate_characters/ for information about using GAP to generate additional character tables.

Example

demo.py is a more extensive usage example. It calculates the Schur content (many Schur transforms for various subsets of the series index) of a lung deformation as measured by a 4D CT scan. Data available for download from DIR-lab.

![alttext](combo_dirlab_sc.png)

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

schurtransform-0.1.39.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

schurtransform-0.1.39-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file schurtransform-0.1.39.tar.gz.

File metadata

  • Download URL: schurtransform-0.1.39.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for schurtransform-0.1.39.tar.gz
Algorithm Hash digest
SHA256 f23f06aaebde63df506e6eb4d399a7acb5719b4044c9d61d0b8133ffaf71e6d8
MD5 5deb7743613b689ef7c21b98ae6caeeb
BLAKE2b-256 085220d4015de786eb4f23d565a3eb4c9cacc4b10a401f85e49e6286f96021c2

See more details on using hashes here.

File details

Details for the file schurtransform-0.1.39-py3-none-any.whl.

File metadata

  • Download URL: schurtransform-0.1.39-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for schurtransform-0.1.39-py3-none-any.whl
Algorithm Hash digest
SHA256 8bf180583242685d15a44c5f7510caf48e20cdc64f09a51d716d858136786580
MD5 68c5068257973634beb125d0cad8e4b4
BLAKE2b-256 680ab116810bd0169c753e884c0dde9cb909e4b408b1aa321e96782633dbd22c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page