The least square support vector machines (LS-SVM) is applied to solve the practical problems of less samples and non-linear prediction better, and it is suitable for the forecasting dissolved gas in transformer oil. But in this model, the selecting values of the parameters impacts on the results of the diagnosis greatly, so it is necessary to optimize these parameters. A new method to optimize these parameters based on improved genetic algorithm (IGA) is proposed, and then, this model is applied in this paper to forecast dissolved gas in transformer oil. The IGA uses the encoding mechanism; it generates the initial population randomly, expends the search space fast, stabilizes the diversity of the individuals in population, and effectively improves the global search ability and convergence speed. Finally, the optimized model is used to analysis multiple sets of oil chromatogram data, the results show that: the accuracy of the LS-SVM based on the IGA is better than traditional LS-SVM models.