Decision function for kernel SVM not reproducible.

### Describe the bug

I want to calculate the decision function through the trained svm model, but the decision function I implement based on the [mathematical expression](https://scikit-learn.org/stable/modules/svm.html#svm-mathematical-formulation) of the SVM is not the same as the one that comes with sklearn.

$$
\sum_{i\in SV}y_i \alpha_i K(x_i, x) + b
$$

![pic](https://user-images.githubusercontent.com/13602602/195821709-c5b5a22a-4847-4d64-8f02-ee4d5543aa05.png)


### Steps/Code to Reproduce

```
from sklearn import datasets
from sklearn.svm import SVC
import numpy as np  

# Load the IRIS dataset for demonstration
iris = datasets.load_iris()
X = iris.data
y = iris.target

# Train-test split
X_train, y_train = X[:140], y[:140]
X_test, y_test = X[140:], y[140:]

print(X.shape, X_train.shape, X_test.shape) # prints (150, 4) (140, 4) (10, 4)

# Fit a rbf kernel SVM
gamma = 0.7
svc = SVC(kernel='rbf', gamma=gamma, C=64, decision_function_shape='ovo')
# svc = SVC(kernel='rbf', gamma=gamma, C=64, probability=True, decision_function_shape='ovo')
# svc = SVC(kernel='rbf', gamma=gamma, C=64)
svc.fit(X_train, y_train)
print(svc.score(X_test, y_test))

# Get prediction for a point X_test using train SVM, svc
def get_pred(svc, X_test):

    def RBF(x,z,gamma,axis=None):
        return np.exp((-gamma*np.linalg.norm(x-z, axis=axis)**2))

    A = []
    # Loop over all suport vectors to calculate K(Xi, X_test), for Xi belongs to the set of support vectors
    for x in svc.support_vectors_:
        # A.append(RBF(x, X_test, svc._gamma))
        A.append(RBF(x, X_test, gamma))
    A = np.array(A)

    return (np.sum(svc._dual_coef_*A)+svc.intercept_)


for i in range(X_test.shape[0]):
    print(get_pred(svc, X_test[i]))
    print(svc.decision_function([X_test[i]])) # The output should same
```

### Expected Results

Two function `get_pred` and `svc.decision_function` should has same outputs.

### Actual Results

```
(150, 4) (140, 4) (10, 4)
1.0
[-4.24105215 -4.38979215 -3.52427244]     --> this line's value should same as
[[-0.42115154 -1.06817962 -2.36560357]]   --> this line
[-2.34091311 -2.48965311 -1.6241334 ]
[[-0.61615543 -0.86736268 -0.47127757]]
[-4.34859785 -4.49733785 -3.63181814]
[[-0.86662754 -1.14637099 -1.94948189]]
[-4.14797518 -4.29671518 -3.43119547]
[[-0.32438219 -1.12869709 -2.30877848]]
[-3.80505008 -3.95379007 -3.08827037]
[[-0.3341635  -1.03315401 -2.05161515]]
[-3.83632958 -3.98506957 -3.11954987]
[[-0.62920059 -0.97474828 -1.84626328]]
[-3.94804683 -4.09678683 -3.23126712]
[[-0.90348467 -1.04135143 -1.61709331]]
[-4.24990319 -4.39864319 -3.53312348]
[[-0.83485694 -1.07466796 -1.95426087]]
[-3.39840443 -3.54714443 -2.68162472]
[[-0.52530703 -0.9980642  -1.48891578]]
[-3.03105705 -3.17979705 -2.31427734]
[[-0.93796146 -1.09834078 -0.60863738]]
```

### Versions

```shell
Python 3.10.7 (main, Sep  8 2022, 14:34:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn; sklearn.show_versions()

System:
    python: 3.10.7 (main, Sep  8 2022, 14:34:29) [GCC 12.2.0]
executable: /bin/python3
   machine: Linux-5.19.0-2-amd64-x86_64-with-glibc2.35

Python dependencies:
      sklearn: 1.1.2
          pip: 22.2
   setuptools: 59.6.0
        numpy: 1.23.3
        scipy: 1.9.1
       Cython: None
       pandas: 1.5.0
   matplotlib: 3.6.0
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
         prefix: libgomp
       filepath: /home/hero/.local/lib/python3.10/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
        version: None
    num_threads: 32

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /home/hero/.local/lib/python3.10/site-packages/numpy.libs/libopenblas64_p-r0-742d56dc.3.20.so
        version: 0.3.20
threading_layer: pthreads
   architecture: Zen
    num_threads: 32

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /home/hero/.local/lib/python3.10/site-packages/scipy.libs/libopenblasp-r0-9f9f5dbc.3.18.so
        version: 0.3.18
threading_layer: pthreads
   architecture: Zen
    num_threads: 32
```
```

COMMENT:
@rikonaka this is tested here https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/svm/tests/test_svm.py#L383

note that y should be -1 or 1 for your formula to hold (in the binary case).

AFAIK there is no bug

Labels: Bug, Needs Triage