  We introduce the notion of optimal target vector, and describe how it creates
a link between supervised and unsupervised learning. We exploit this notion to
construct Ising models, for dichotomic clustering, whose couplings are (i) both
ferro- and anti-ferromagnetic (ii) depending on the whole data-set and not only
on pairs of samples. The effectiveness of the method is shown in the case of
the well known iris data-set and in benchmarks of gene expression levels.
