A task motion trajectory usually needs to be determined for the training process and mechanism design for rehabilitation patients since they are not capable of providing a normal motion. In this paper, a machine-learning-based approach of gait trajectory prediction for lower limb rehab patients is proposed to provide the basis for the design of simple 1-degree-of-freedom (DOF) rehab mechanisms. First, a large amount of gait trajectories from various healthy volunteers are collected along with their body parameters, and a normalization method is presented to trim/expand these trajectory samples to a standard length and timing while retaining their shape and velocity information. Then, these normalized gait samples are clustered and regressed into a limited number of representative trajectories with K-means algorithm, and the cluster index is recorded as the label for each trajectory. Next, a genetic-algorithm-optimized support vector machine method is adopted to train a classifier for the trajectories, obtaining the correspondence between body parameters and cluster labels of gait trajectories. As a result, once a group of body parameters are input into the classifier, it can predict a most suitable gait trajectory for the specific patient. It shows that the accuracy of trajectory prediction reaches 96% both on training set and test set which verifies the effectiveness of the method. In the end, a 1-DOF gait rehab mechanism design example is provided to illustrate the application of the proposed method. Taking the predicted result from the classifier as the task motion trajectory for the synthesis of mechanisms, a 1-DOF six-bar mechanism is designed and the patient-mechanism matching can be realized.