Simplified the compute() function by adding the additional isFemale argument and added individual weights for the categories. (#2)