We provide an analysis of a consensus-type algorithm with weights dependent only on the received data. Differently from previous approaches that require a global knowledge of the network, we consider general weights inferred only from local data which can be modified by local functions on each node. We provide convergence conditions of such algorithms for general weight functions and derive analytical steady states in some selected cases.