Adaptively set weights