  Distributed processing over networks relies on in-network processing and
cooperation among neighboring agents. Cooperation is beneficial when agents
share a common objective. However, in many applications agents may belong to
different clusters that pursue different objectives. Then, indiscriminate
cooperation will lead to undesired results. In this work, we propose an
adaptive clustering and learning scheme that allows agents to learn which
neighbors they should cooperate with and which other neighbors they should
ignore. In doing so, the resulting algorithm enables the agents to identify
their clusters and to attain improved learning and estimation accuracy over
networks. We carry out a detailed mean-square analysis and assess the error
probabilities of Types I and II, i.e., false alarm and mis-detection, for the
clustering mechanism. Among other results, we establish that these
probabilities decay exponentially with the step-sizes so that the probability
of correct clustering can be made arbitrarily close to one.
