model = KernelRidgeRegression(kernel='rbf', gamma=5.0, lambda_reg=0.01) model.fit(X_train, y_train) y_pred = np.sign(model.predict(X_test))
While mapping data to higher dimensions works theoretically, it is computationally expensive. If your original data has $d$ dimensions, mapping it to a space of all polynomial combinations of degree 3 can result in $O(d^3)$ dimensions. For high-dimensional image data, this is impossible to compute. kernel methods for machine learning with math and python pdf