sigmoid method
Implementation
List<double> sigmoid(List<double> X) {
List<double> kernels =
List.generate(supportVectors.length, ((index) => index.toDouble()));
for (int i = 0; i < supportVectors.length; i++) {
double kernel = 0.0;
for (int j = 0; j < supportVectors[i].length; j++) {
kernel += supportVectors[i][j] * X[j];
}
kernels[i] = tanh((this.gamma * kernel) + this.coef0);
}
return kernels;
}