Skip to content

michaelbrunnbauer/ucf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This code was written for Python 2.x and has been tested with Python 2.7.x.

Systematic search for certain families
--------------------------------------

systematic.py is called with the size m of the universe as command line argument
and will search all families that separate this universe for families where 
the total abundance is lower than m.

The total abundance is the sum of (frequency - n/2 + 1) for all abundant
elements.

If track_progress=True, you can stop calculation and save the current todos by
creating a file named "stop". Calculation can be resumed by removing this file
and calling systematic.py with the todo file as command line argument. The 
todo file can be split for paralell processing with split_todo.py.

Random sampling
---------------

database.py will let you generate random, union closed, separating families as
a function of several parameters:

 universe size m
 number of basis sets (excluding the empty set, which is implicit)
 target minimum member cardinality (without empty set)
 target maximum member cardinality (of basis sets)

The members are drawn uniformly from the search space defined by the four
parameters above. This means that you will find less families with members of
cardinality near 1 or m as they usually represent only a small fraction of the
search space.

Families will be saved in a MySQL database together with characteristics:

 number of abundant elements
 total abundance
 total size
 minimum member cardinality (without empty set)
 maximum member cardinality (of basis sets)
 average member cardinality (of basis sets without empty set)

Families breeded from the selected families with a genetic algorithm 
optimizing for minimum total abundance will also be saved.

If the program is run several times, it will retry parameter tuples for which
no random family has been generated yet.

About

Python code for union closed families

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages