def __call__(self, R):
        res = zeros(len(R))
        ranks = rankedFitness(R)
        cutoff = len(R) * (1. - self.topFraction)
        for i in range(len(R)):
            if ranks[i] >= cutoff:
                res[i] = ranks[i] - cutoff
            else:
                res[i] = 0.0
        res /= max(res)
        return res
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/rankingfunctions.py/TopLinearRanking.__call__/original