def get_weight_range(weights):
    # type: (FeatureWeights) -> float
    """ Max absolute feature for pos and neg weights.
    """
    return max_or_0(abs(fw.weight)
                    for lst in [weights.pos, weights.neg]
                    for fw in lst or [])
def get_weight_range ( weights ) : return max_or_0 ( abs ( fw . weight ) for lst in [ weights . pos , weights . neg ] for fw in lst or [ ] )
Max absolute feature for pos and neg weights.