An algorithm named immune multidirection binary particle swarm optim i zation (IMBPSO) algorithm was presented and applied to optimize feature selectio n and parameters of support vector machine (SVM) simultaneously. It overcomes th e degression of diagnosis ability resulting from unmatch of the features and the classifier parameters and improves the diagnosis precision and search speed. An example of engine fault classification demonstrates the effectiveness the method.