<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setHalfLife(self, halfLife, timeUnit):
 """ Set number of batches after which the centroids of that particular batch has half the weightage. """

        self._timeUnit = timeUnit
        self._decayFactor = exp(log(0.5) / halfLife)
        return self