Skip to content

vasco

discover hidden correlations in your data with MIC

vasco · discover hidden correlations in your data with MIC

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4660vascovasco0.1.0FUNCGPL-3.0C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--NoYesNoYesnono
Relationships
See Alsoweighted_statistics pg_math xicor fbsql

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.1.019 18 17 16 15vasco-
RPMPIGSTY0.1.019 18 17 16 15vasco_$v-
DEBPIGSTY0.1.019 18 17 16 15postgresql-$v-vasco-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
el8.aarch64N/APIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
el9.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
el9.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
el10.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
el10.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
d12.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
d12.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
d13.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
d13.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u22.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u22.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u24.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u24.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u26.x86_64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0
u26.aarch64PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0PIGSTY 0.1.0

Source

pig build pkg vasco;		# 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 vasco;		# install by package name

pig install vasco -v 19;   # install for PG 19
pig install vasco -v 18;   # install for PG 18
pig install vasco -v 17;   # install for PG 17
pig install vasco -v 16;   # install for PG 16
pig install vasco -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION vasco;

Usage

vasco: Maximal Information Coefficient (MIC) extension for PostgreSQL

Discover hidden correlations in your data using the Maximal Information Coefficient (MIC) and the MINE family of statistics.

CREATE EXTENSION vasco;

Aggregate Functions

FunctionDescription
mic(x, y)Maximal Information Coefficient – detects any relationship
mas(x, y)Maximum Asymmetry Score – deviation from monotonicity
mev(x, y)Maximum Edge Value – degree of continuous function sampling
mcn(x, y)Minimum Cell Number – complexity of association
mcn_general(x, y)MCN with eps = 1 - MIC
tic(x, y)Total Information Coefficient
gmic(x, y)Generalized Mean Information Coefficient

Utility Functions

FunctionDescription
vasco_corr_matrix(table_name, output_table)Compute MIC for all column pairs and store as a correlation matrix table

Configuration

SET vasco.mic_estimator = 'ApproxMIC';  -- or 'MIC_e'
SET vasco.mine_c = ...;
SET vasco.mine_alpha = ...;

Examples

-- Compute MIC between column pairs
SELECT mic(x, cubic), mic(x, periodic), mic(x, rand_y)
FROM vasco_data;
-- 1, 1, 0.15

-- Create a full correlation matrix
SELECT vasco_corr_matrix('my_table', 'mic_my_table');
SELECT * FROM mic_my_table;

Table reader