You are referring to the problem of Multiple Kernel Learning (MKL). Where you can train different kernels for different groups of features. I have used this in a multi-modal case, where I wanted different kernels for image and text.

I am not sure if you actually can do it via scikit-learn.

There are some libraries provided on GitHub, for example, this one: https://github.com/IvanoLauriola/MKLpy1

Hopefully, it can help you to achieve your goal.

Answer from alift on Stack Overflow
🌐
scikit-learn
scikit-learn.org › stable › auto_examples › svm › plot_svm_kernels.html
Plot classification boundaries with different SVM Kernels — scikit-learn 1.8.0 documentation
Go to the end to download the full example code or to run this example in your browser via JupyterLite or Binder. This example shows how different kernels in a SVC (Support Vector Classifier) influence the classification boundaries in a binary, two-dimensional classification problem.
🌐
scikit-learn
scikit-learn.org › stable › modules › svm.html
1.4. Support Vector Machines — scikit-learn 1.8.0 documentation
One is advised to use GridSearchCV with C and gamma spaced exponentially far apart to choose good values. ... You can define your own kernels by either giving the kernel as a python function or by precomputing the Gram matrix.
🌐
Medium
medium.com › @abhishekjainindore24 › svm-kernels-and-its-type-dfc3d5f2dcd8
SVM kernels and its type. Support Vector Machines (SVMs) are a… | by Abhishek Jain | Medium
September 11, 2024 - For more complex data, consider polynomial or RBF kernels. Computational Resources: RBF and polynomial kernels are computationally more intensive than the linear kernel. Ensure that your computational resources can handle the increased complexity.
🌐
GeeksforGeeks
geeksforgeeks.org › machine learning › implementing-svm-and-kernel-svm-with-pythons-scikit-learn
Implementing Different SVM Kernels - GeeksforGeeks
November 4, 2025 - Linear kernel draws a straight line between classes. ... model_linear = svm.SVC(kernel='linear') model_linear.fit(X, y) plot_decision_boundary(model_linear, X, y, "SVM with Linear Kernel")
🌐
Dataaspirant
dataaspirant.com › home › seven most popular svm kernels
Seven Most Popular SVM Kernels
October 23, 2023 - You can specify different kernel functions to make a proper decision boundary. It requires very high training time, hence not recommended for large datasets. It is very sensitive to outliers.
🌐
DataFlair
data-flair.training › blogs › svm-kernel-functions
Kernel Functions-Introduction to SVM Kernel & Examples - DataFlair
July 28, 2025 - Now we are going to provide you a detailed description of SVM Kernel and Different Kernel Functions and its examples such as linear, nonlinear, polynomial, Gaussian kernel, Radial basis function (RBF), sigmoid etc.
🌐
scikit-learn
scikit-learn.org › stable › modules › generated › sklearn.svm.SVC.html
SVC — scikit-learn 1.8.0 documentation
If a callable is given it is used to pre-compute the kernel matrix from data matrices; that matrix should be an array of shape (n_samples, n_samples). For an intuitive visualization of different kernel types see Plot classification boundaries with different SVM Kernels.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › major-kernel-functions-in-support-vector-machine-svm
Major Kernel Functions in Support Vector Machine (SVM) - GeeksforGeeks
Now we are going to learn in detail about SVM Kernel and Different Kernel Functions and its examples.Types of SVM Kernel FunctionsSVM algorithm use the mathematical function defined by the kernel.
Published   February 7, 2025
🌐
Medium
medium.com › geekculture › kernel-methods-in-support-vector-machines-bb9409342c49
Kernel Tricks in Support Vector Machines | by Aman Gupta | Geek Culture | Medium
June 1, 2021 - SVM Classification with a Gaussian Kernel Function · This is in close relation with the previous kernel i.e. the Gaussian kernel with the only difference is — the square of the norm is removed.
🌐
Quark Machine Learning
quarkml.com › home › data science › machine learning
SVM Kernels: Polynomial Kernel - From Scratch Using Python. - Quark Machine Learning
April 6, 2025 - Alright, now let's do the practical implementation of the polynomial kernel in python. For this demo, we need a random dataset. So let's create a non-linearly separable dataset using sklearn ... This dataset is not linearly separable since the two classes are intermixed. Here the basic linear SVM will not be able to classify this dataset with high accuracy.
🌐
The IoT Academy
theiotacademy.co › home › types of kernel in svm | kernels in support vector machine
Types of Kernel in SVM | Kernels in Support Vector Machine
April 4, 2024 - Explore the different types of kernels in SVM (Support Vector Machine), understanding their roles in classification and regression tasks.
🌐
scikit-learn
scikit-learn.org › 1.2 › auto_examples › svm › plot_svm_kernels.html
SVM-Kernels — scikit-learn 1.2.2 documentation
# Code source: Gaël Varoquaux # License: BSD 3 clause import numpy as np import matplotlib.pyplot as plt from sklearn import svm # Our dataset and targets X = np.c_[ (0.4, -0.7), (-1.5, -1), (-1.4, -0.9), (-1.3, -1.2), (-1.1, -0.2), (-1.2, -0.4), (-0.5, 1.2), (-1.5, 2.1), (1, 1), # -- (1.3, 0.8), (1.2, 0.5), (0.2, -2), (0.5, -2.4), (0.2, -2.3), (0, -2.7), (1.3, 2.1), ].T Y = [0] * 8 + [1] * 8 # figure number fignum = 1 # fit the model for kernel in ("linear", "poly", "rbf"): clf = svm.SVC(kernel=kernel, gamma=2) clf.fit(X, Y) # plot the line, the points, and the nearest vectors to the plane p
🌐
Stack Abuse
stackabuse.com › implementing-svm-and-kernel-svm-with-pythons-scikit-learn
Implementing SVM and Kernel SVM with Python's Scikit-Learn
July 2, 2023 - In this article we studied the simple linear kernel SVM. We got the intuition behind the SVM algorithm, used a real dataset, explored the data, and saw how this data can be used along with SVM by implementing it with Python's Scikit-Learn library.
🌐
Kaggle
kaggle.com › code › residentmario › kernels-and-support-vector-machine-regularization
Kernels and support vector machine regularization
Checking your browser before accessing www.kaggle.com · Click here if you are not automatically redirected after 5 seconds
🌐
Analytics Vidhya
analyticsvidhya.com › home › support vector machine with kernels and python iterators
Support Vector Machine with Kernels and Python Iterators
June 8, 2022 - Later, we will discuss the Maximal-Margin Classifier and Soft Margin Classifier for Support Vector Machine. At last, we will learn about some SVM Kernels, such as Linear, Polynomial, and RBF.
🌐
KDnuggets
kdnuggets.com › 2016 › 06 › select-support-vector-machine-kernels.html
How to Select Support Vector Machine Kernels - KDnuggets
June 13, 2016 - In practice, it is less useful for efficiency (computational as well as predictive) performance reasons. So, the rule of thumb is: use linear SVMs (or logistic regression) for linear problems, and nonlinear kernels such as the Radial Basis Function kernel for non-linear problems.
🌐
EDUCBA
educba.com › home › data science › data science tutorials › machine learning tutorial › kernel methods
Kernel Methods | Need And Types of Kernel In Machine Learning
March 20, 2023 - Kernels or kernel methods (also called Kernel functions) are sets of different types of algorithms that are being used for pattern analysis. They are used to solve a non-linear problem by using a linear classifier. Kernels Methods are employed in SVM (Support Vector Machines) which are used in classification and regression problems.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai