How to use

Here's a minimum viable example using scikit-learn's iris dataset.

In [1]:
from bigholes import HoleFinder
from sklearn import datasets
%matplotlib inline
%load_ext autoreload
%autoreload 2

strategy = 'random' # or 'even' or 'sequential'
maxitr = 1000 # how many queries to do since last best found before satisfied
 # whether to consider only rectangles that are bounded on all sides by points rather than limits of the space
interiorOnly = False # for datasets with few points, finding interior rectangles is much harder
threshold = None # just find a list of the biggest

iris = datasets.load_iris() # Load your data
X = iris['data']

hf = HoleFinder(X, strategy, interiorOnly)
hallOfFame = hf.findLargestMEHRs(maxitr, threshold, verbose=False) # also dumps hallOfFame to disk

hallOfFame[-1].plot(X, iris['feature_names'])

Blue points are "behind" the rectangle (have smaller magnitude than its mean across all dimensions which are not the two compared in the plot), and orange points are "in front of" the rectangle (have greater magnitude than its mean across all dimensions not compared in the plot).