<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _random_candidates(self, n=1000):
 """Generate a matrix of random parameters, column by column."""


        candidates = np.zeros((n, len(self.tunables)))
        for i, tunable in enumerate(self.tunables):
            param = tunable[1]
            lo, hi = param.range
            if param.is_integer:
                column = np.random.randint(lo, hi + 1, size=n)

            else:
                diff = hi - lo
                column = lo + diff * np.random.rand(n)

            candidates[:, i] = column

        return candidates