Radial basis function network (RBF) kernels are widely used for support vector machines (SVMs). But for model selection of an SVM, we need to optimize the kernel parameter and the margin parameter by time-consuming cross validation. In this paper we propose determining parameters for RBF and Mahalanobis kernels by maximizing the class separability by the second-order optimization. For multi-class problems, we determine the kernel parameters for all the two-class problems and set the average value of the parameter values to all the kernel parameters. Then we determine the margin parameter by cross-validation. By computer experiments of multi-class problems we show that the proposed method works to select optimal or near optimal parameters.