new_frequency_weights function

Construct a frequency weights vector