Weighted Partition Consensus via Kernels