According to the difficulty of modeling parameters selection and the problem of the dimension of infrared spectral data is too large, in order to improve the accuracy of quantitative analysis of gas mixture based on infrared spectrum, least square support vector machine(LS-SVM) optimized by bare bones sine cosine algorithm(BBSCA) is proposed to build the regression model. There are 470 sets infrared spectrum sample data of the gas mixture are used to build the regression model, which the gas mixture contains methane, ethane, and propane, the concentration of each component gas range from 0. 01% to 0.15%, 0. 01% to 0.15% and 0. 01% to 0.1%. Firstly, in order to decrease to the dimension of the infrared spectrum data, principle component analysis(PCA) is adopted to extract eigenvalue, dimension of the model input variable is deduced form 1866 to 90. Then the penalty parameter c, the kernel parameter σ of the LS-SVM and the model input variable dimension pc were optimized by BBSCA. Finally, BBSCA is compared with standard sine cosine algorithm(SCA), particle swarm optimization(PSO) algorithm, bare bones particle swarm optimization(BBPSO) algorithm. The experiments result show that the mean relative error(MRE) of the three component gas analysis models built by BBSCA are minimum, the MRE are reduced about 12% to 19%, and the modeling time is equivalent. BBSCA has great advantages in global optimization and convergence speed. Therefore, BBSCA has certain practical significance and application value in the field of infrared spectrum analysis.