Scala spark ML中的SVM如何像Python一样设置惩罚系数C核gamma

在阅读scala文档时发现调用机器学习函数只能设置参数默认步长核迭代次数,如何才能像python的SVM一样设置C核gamma呢

scala文档如下

import org.apache.spark.ml.classification.LinearSVC

// Load training data
val training = spark.read.format("libsvm").load("data/mllib/sample_libsvm_data.txt")

val lsvc = new LinearSVC()
  .setMaxIter(10)
  .setRegParam(0.1)

// Fit the model
val lsvcModel = lsvc.fit(training)

// Print the coefficients and intercept for linear svc
println(s"Coefficients: ${lsvcModel.coefficients} Intercept: ${lsvcModel.intercept}")