Module spatial_inequality.optimization

Functions and classes specifically designed to minimize the temporal complexity of our algorithm.

Expand source code
"""
Functions and classes specifically designed to minimize the temporal complexity
of our algorithm.
"""

Sub-modules

spatial_inequality.optimization.early_stopper

Implements an "early stopping" termination criterion for our algorithm, preventing unnecesary computations when improvements are no longer observed.

spatial_inequality.optimization.entity_nodes

Provides class abstractions to both schools and districts, allowing a more intuitive interface with our data.

spatial_inequality.optimization.holdout

Implements a "holdout queue" data structure, which allows for items to be conditionally held out from the results upon dequeing.

spatial_inequality.optimization.lazy_heap

Implements a "lazy heap" data structure, which provides a max-heap behavior but uses lazy evaluation for optimized node update and removal.

spatial_inequality.optimization.lookup

Dynamic programming abstractions for fast(er) lookup methods and incremental updates.

spatial_inequality.optimization.run_metrics

Structured information container, to track specified metrics over a single run of our algorithm.