break;
case NewSupportVectorRegression:
this.params.svm_type = svm_parameter.NU_SVR;
break;
default:
throw new NeuralNetworkError("Invalid svm type");
}
switch (kernelType) {
case Linear:
this.params.kernel_type = svm_parameter.LINEAR;
break;
case Poly:
this.params.kernel_type = svm_parameter.POLY;
break;
case RadialBasisFunction:
this.params.kernel_type = svm_parameter.RBF;
break;
case Sigmoid:
this.params.kernel_type = svm_parameter.SIGMOID;
break;
case Precomputed:
this.params.kernel_type = svm_parameter.PRECOMPUTED;
break;
default:
throw new NeuralNetworkError("Invalid kernel type");
}
// params[i].kernel_type = svm_parameter.RBF;
this.params.degree = DEFAULT_DEGREE;
this.params.coef0 = 0;