Firefly algorithm (FA) optimizing Least squares support vector machine (LSSVM) structural parameters, there are problems such as premature convergence and slow convergence in the late stage, an improved cloud model firefly algorithm (CCAFA) algorithm for optimizing LSSVM parameters is proposed. Firstly, The chaotic map initializes the initial position of the FA to obtain the diversity of the population; Secondly, the population is divided into three intervals according to the fitness value of firefly, the inertia weight of a certain interval is adjusted by cloud adaptive evolution strategy, then the cloud model is used to mutate the initial position of the firefly; Finally, chaotic sequences are used to optimize the optimal population position and enhance the global search ability of the population. The typical four benchmark functions were tested to verify the feasibility of the algorithm. The CCAFA-LSSVM model is applied to the fault diagnosis of analog circuits, experimental results show that the improved algorithm has fast convergence speed and strong global search capability, the proposed algorithm has certain effectiveness.