def multiplicative_epsilon(front, **kargs):
 wobj = (numpy.array([ind.fitness.wvalues for ind in front]) * (-1))
 def contribution(i):
  mwobj = numpy.ma.array(wobj)
  mwobj[i] = numpy.ma.masked
  return numpy.min(numpy.max((wobj[i] / mwobj), axis=1))
 contrib_values = map(contribution, range(len(front)))
 return numpy.argmin(contrib_values)

def multiplicative_epsilon ( front , ** kargs ) : wobj = ( numpy . array ( [ ind . fitness . wvalues for ind in front ] ) * ( - 1 ) ) def contribution ( i ) : mwobj = numpy . ma . array ( wobj ) mwobj [ i ] = numpy . ma . masked return numpy . min ( numpy . max ( ( wobj [ i ] / mwobj ) , axis = 1 ) ) contrib_values = map ( contribution , range ( len ( front ) ) ) return numpy . argmin ( contrib_values )
returns the index of the individual with the least the multiplicative epsilon contribution .