Nowadays, mechanical devices such as robots are widely adopted for limb rehabilitation. Due to the variety of human body parameters, the rehabilitation motion for different patient usually has its individual pattern. Thus it is obviously not an optimal solution to use a single motion generator to suit all patients. Yet it would also be unpractical if we design a different motion or even a different mechanism for each user individually. Therefore, in this paper we seek to adopt clustering-based machine learning technique to find a limited number of motion patterns for upper-limb rehabilitation, so that they could represent the large amount of those from people who have various body parameters. Firstly, the trajectory of a specified rehabilitation motion are recorded from various subjects, and then 4 types of machine learning algorithms (spectral clustering, hierarchical clustering, self-organizing mapping neural network and Gaussian mixture model) are implemented and compared. It is shown that spectral clustering (SC) yields the best performance and is hereby adopted to generate three clusters of motion patterns. After regression of each cluster, three types of motion for upper limb-rehabilitation are constructed, which could reflect the trajectories’ similarity and difference of people who have various body parameters. These work will provide help for the design of rehabilitation mechanisms.