Skip to content

apastor/entropy-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

entropy-postgresql

Aggregate user-defined function to compute Shannon's entropy in PostgreSQL (>=9.4).

The functions are implemented in C and compute the entropy from counts of events. The probabilities are estimated by maximum likelihood from the counts.

Install

  1. Compile and install the entropy functions in postgres
make && sudo make install
  1. Create the entropy functions in the postgres databases where you want to use them
psql -d <database> -f create_functions.sql

How to use the functions

The file test_functions.sql contains examples using the functions to query a temporary table.

About

Aggregate user-defined function to compute Shannon's entropy in PostgreSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published