Proposed in this paper is a method of model selection based on kernel alignment for support vector machines-OMSA (optimal model selection algorithm) by means o f learning on kernel matrix. This algorithm aims at finding the optimal kernel p arameters and learning model from training data without performing the standard procedures of SVM training and testing so as to overcome the flaws of convention al methods of SVM model selection. The classification experiments on the UCI dat abase and the face recognition experiments on the FERET face database are deploy ed with this algorithm and the famous LOO (leave-one-out) algorithm. The four da tasets from UCI used in experiments are diabetis, glass, waveform and wine. By comparison with the LOO algorithm, the experimental results show that the optimal kernel parameters and kernel matrix are found by OMSA with the minimal testing error of SVM classifier. Specially, the results from face recognition experiment s are satisfactory. This algorithm provides a feasible method for SVM model sele ction as well as references for other kernel-based learning algorithms.