In this paper we extend the concept of the well-known input–output clustering (IOC) technique in Uykan et al. (IEEE Trans Neural Netw 11(4):851–858, 2000) to antenna location optimization problem in wireless networks and propose an input–output space clustering criterion (IOCC) to optimize the locations of the remote antenna units (RAUs) of generalized distributed antenna systems (DASs) under sum power constraint. In IOCC, the input space refers to RAU location space and output space refers to location specific ergodic capacity space for noise-limited environments. Given a location-specific arbitrary desired ergodic capacity function over a geographical area, we define the error as the difference between actual and desired ergodic capacity. Following the major steps of the well-known IOC technique in Uykan et al. (IEEE Trans Neural Netw 11(4):851–858, 2000) and Uykan (IEEE Trans Neural Netw 14(3):708–715, 2003) we show that for the DAS wireless networks: (1) the IOCC provides an upper bound to the cell averaged ergodic capacity error; and (2) the derived upper bound is equal to a weighted quantization error function in location-capacity space (input–output space) and (3) the upper bound can be made arbitrarily small by a clustering process increasing the number of RAUs for a feasible DAS. IOCC converts the RAU location problem into a codebook design problem in vector quantization in input–output space, and thus includes the Squared Distance Criterion (SDC) for DAS in Wang et al. (IEEE Commun Lett 13:315–317, 2009) (and other related papers) as a special case, which takes only the input space into account. Computer simulations confirm the theoretical findings and show that the IOCC outperforms the SDC for DAS in terms of the defined cell averaged “effective” ergodic capacity.