Scikit-Learn
72
Following Python script uses
sklearn.svm.SVR
class
:
from
sklearn import svm
X = [[1, 1], [2, 2]]
y = [1, 2]
SVRReg = svm.SVR(
kernel=’linear’, gamma=’auto’
)
SVRReg.fit(X, y)
Output
SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1, gamma='auto',
kernel='linear', max_iter=-1, shrinking=True, tol=0.001, verbose=False)
Now, once fitted, we can get the weight vector with the help of following python script:
SVRReg.coef_
Dostları ilə paylaş: