A high-transition-temperature (high-TC) superconductor is an important material used in many practical applications like magnetically levitated trains and power transmission. The superconducting transition temperature TC is determined by the layered crystals, bond lengths, valency properties of the ions and Coulomb coupling between electronic bands in adjacent, spatially separated layers. The optimal TC can be attained upon doping and applying the pressure for the optimal compounds. There is an algebraic relation for the optimal TC of the optimal compounds, TCO = KB-1 b/(ix), where i and x are two structural parameters, KB is Boltzmann's constant, b is a universal constant and TCO is the optimal transition temperature. Nevertheless, the TC of the non-optimum compounds is smaller than TCO. To predict the TC for the all compounds, we developed a prediction model based on the machine-learning method called support vector regression (SVR) using structural and electronic parameters to predict TC. In addition, the principal component analysis (PCA) was applied to reduce dimensions and interdependencies among the parameters, and particle swarm optimization (PSO) was utilized to search for the optimal parameters of SVR for an improved performance of the prediction model. The results showed that the proposed PCA-PSO-SVR model takes advantage of the machine-learning method to directly predict TC and theoretically provide guidance on measuring TC.