presto-ml/src/main/java/io/prestosql/plugin/ml/LibSvmUtils.java/LibSvmUtils/parseParameters
class LibSvmUtils:    public static svm_parameter parseParameters(String paramString)
    {
        svm_parameter params = new svm_parameter();
        params.kernel_type = svm_parameter.LINEAR;
        params.degree = 3;
        params.gamma = 0;
        params.coef0 = 0;
        params.nu = 0.5;
        params.cache_size = 100;
        params.C = 1;
        params.eps = 0.1;
        params.p = 0.1;
        params.shrinking = 1;
        params.probability = 0;
        params.nr_weight = 0;
        params.weight_label = new int[0];
        params.weight = new double[0];

        for (String split : Splitter.on(',').omitEmptyStrings().split(paramString)) {
            String[] pair = split.split("=");
            checkArgument(pair.length == 2, "Invalid hyperparameters string for libsvm");
            String value = pair[1].trim();

            String key = pair[0].trim();
            switch (key) {
                case "kernel":
                    params.kernel_type = parseKernelType(value);
                    break;
                case "degree":
                    params.degree = Integer.parseInt(value);
                    break;
                case "gamma":
                    params.gamma = Double.parseDouble(value);
                    break;
                case "coef0":
                    params.coef0 = Double.parseDouble(value);
                    break;
                case "C":
                    params.C = Double.parseDouble(value);
                    break;
                case "nu":
                    params.nu = Double.parseDouble(value);
                    break;
                case "eps":
                    params.eps = Double.parseDouble(value);
                    break;
                default:
                    throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format("Unknown parameter %s", pair[0]));
            }
        }

        return params;
    }