xicor

pgxicor : XI Correlation Coefficient in Postgres

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4670
xicor
pgxicor
0.1.0
FUNC
GPL-3.0
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-dtr
No
Yes
No
Yes
yes
yes
Relationships
See Also
pg_idkit
pgx_ulid
pg_uuidv7
permuteseq
pg_hashids
sequential_uuids
topn
quantile

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
0.1.0
18
17
16
15
14
pgxicor-
RPM
PIGSTY
0.1.0
18
17
16
15
14
pgxicor_$v-
DEB
PIGSTY
0.1.0
18
17
16
15
14
postgresql-$v-pgxicor-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el8.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el9.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el9.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el10.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
el10.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d12.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d12.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d13.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
d13.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u22.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u22.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u24.x86_64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
u24.aarch64
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0
PIGSTY 0.1.0

Source

pig build pkg pgxicor;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pgxicor;		# install via package name, for the active PG version
pig install xicor;		# install by extension name, for the current active PG version

pig install xicor -v 18;   # install for PG 18
pig install xicor -v 17;   # install for PG 17
pig install xicor -v 16;   # install for PG 16
pig install xicor -v 15;   # install for PG 15
pig install xicor -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION xicor;

Usage

xicor: XI correlation coefficient for PostgreSQL

Provides the XI (xi) correlation coefficient, which can detect functional relationships between X and Y – a more powerful alternative to corr(X, Y) that works beyond linear relationships.

CREATE EXTENSION xicor;

Functions

FunctionDescription
xicor(x, y)Compute the XI correlation coefficient between two variables

Configuration

For reproducible results with tied data:

SET xicor.ties = true;
SET xicor.seed = 42;

Examples

CREATE TABLE xicor_test (x float8, y float8);
INSERT INTO xicor_test (x, y) VALUES
  (1.0, 2.0), (2.5, 3.5), (3.0, 4.0), (4.5, 5.5), (5.0, 6.0);

SELECT xicor(x, y) FROM xicor_test;
Last updated on