  We study how to detect groups in a complex network each of which consists of
component nodes sharing a similar connection pattern. Based on the mixture
models and the exploratory analysis set up by Newman and Leicht (Newman and
Leicht 2007 {\it Proc. Natl. Acad. Sci. USA} {\bf 104} 9564), we develop an
algorithm that is applicable to a network with any degree distribution. The
partition of a network suggested by this algorithm also applies to its
complementary network. In general, groups of similar components are not
necessarily identical with the communities in a community network; thus
partitioning a network into groups of similar components provides additional
information of the network structure. The proposed algorithm can also be used
for community detection when the groups and the communities overlap. By
introducing a tunable parameter that controls the involved effects of the
heterogeneity, we can also investigate conveniently how the group structure can
be coupled with the heterogeneity characteristics. In particular, an
interesting example shows a group partition can evolve into a community
partition in some situations when the involved heterogeneity effects are tuned.
The extension of this algorithm to weighted networks is discussed as well.
