-
Notifications
You must be signed in to change notification settings - Fork 11
Assignment 6
For this assignment you will be given partially completed skeleton code that contains some of the logic you will need. All areas that you need to add or modify code to to complete the assignment requirements will be marked with a TODO comment and some more specific instructions. It is not necessary to add or modify code outside these sections.
Complete the populousity algorithm implementation by adding the code to find the most common color given a histogram.
Implement the split() method for the Box class. This should apply one step of the splitting algorithm described in the Lecture 22 slides to split one box at level N into two boxes at level N + 1.
Add code in find_box_to_split() that builds a list of all the boxes that are "tied" for having the lowest level.
The description in the slides should be helpful in giving you a visual idea of how the box splitting works.
As before, there are some numpy functions that could make your life a lot easier:
np.argsortnp.argmaxnp.sumnp.cumsumnp.searchsorted