Home/ Projects/ Skyline Sort

Multi-Category Skyline Sort

A Python class that computes the skyline of a set of data objects across N categories — returning only the non-dominated objects in a multi-dimensional dataset.

TimelineJan – Feb 2024
TypePersonal Project
StatusOpen Source
2 4 6 8 10 2 4 6 8 Category 1 (higher = better) Category 2 (higher = better) A B C D dominated Skyline point Dominated Boundary

Points A, B, C, D form the skyline — no other point dominates them on both axes simultaneously. Gray points are all dominated.

The problem

In multi-dimensional datasets, standard sorting only works along a single axis. The skyline problem asks: which objects are not dominated by any other object across all N dimensions simultaneously?

This comes up in database query optimization and multi-criteria decision making — finding hotels that are neither too expensive nor too far away, without being beaten on both dimensions by another option.

What I built

A self-contained Python class that accepts a dataset and N category dimensions, then returns the skyline — objects not dominated by any other object across all N categories.

Technical decisions

Object A dominates object B if A is at least as good as B on every category, and strictly better on at least one. The naive dominance check is O(n²·k) for n objects and k dimensions. The implementation prunes dominated candidates early to keep this tractable, and uses a clean class structure that separates the skyline computation from result formatting.

Python Data Structures Algorithms

Outcome