In fault-diagnosis classification, a pressing issue is the lack of target-fault samples. Obtaining fault data requires a great amount of time, energy and financial resources. These factors affect the accuracy of diagnosis. To address this problem, a novel fault-diagnosis-classification optimization method, namely TLSCA-SVM, which combines the sine cosine algorithm and support vector machine (SCA-SVM) with transfer learning, is proposed here. Considering the availability of fault data, this thesis uses the data generated by analog circuits from different faults for analysis. Firstly, the data signal is collected from different faults of the analog circuit, and then the characteristic data are extracted from the data signals by the wavelet packets. Secondly, to employ the principal component analysis (PCA) reduces the feature-value dimension. Lastly, as an auxiliary condition, the error-penalty item is added to the objective function of the SCA-SVM classifier to construct an innovative fault-diagnosis model namely TLSCA-SVM. Among them, the Sallen–Key bandpass filter circuit and the CSTV filter circuit are used to provide the data for horizontal- and vertical-contrast classification results. Comparing the SCA with the five optimization algorithms, it is concluded that the performance of SCA optimization parameters has certain advantages in the classification accuracy and speed. Additionally, to prove the superiority of the SCA-SVM classification algorithm, the five classification algorithms are compared with the SCA-SVM algorithm. Simulation results showed that the SCA-SVM classification has higher precision and a faster response time compared to the others. After adding the error penalty term to SCA-SVM, TLSCA-SVM requires fewer fault samples to process fault diagnosis. Ultimately, the method which is proposed could not only perform fault diagnosis effectively and quickly, but also could run effectively to achieve the effect of transfer learning in the case of less failure data.