August 2018
Intermediate to advanced
522 pages
12h 45m
English
Normally, built-in kernels can efficiently solve most real-life problems; however, scikit-learn allows us to create custom kernels as normal Python functions:
import numpy as np def custom_kernel(x1, x2): return np.square(np.dot(x1, x2) + 1)
The function can be passed to SVC through the kernel parameter, which can assume fixed string values ('linear', 'rbf', 'poly', and 'sigmoid') or a callable (such as kernel=custom_kernel).
Read now
Unlock full access