def adaptiveTune(value, k):

    if k == 0:
        return 1.0
    else:
        return (2/(1 + math.exp(k*abs(value))))
Calculate the adaptive tuning function from Chouakira & Nagabhushan
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Timeseries/__init__.py/adaptiveTune