Skip to content
ml-recall

#epsilon-insensitive

1 question from Support Vector Machines

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: True or false

mediumAI-checkedSupport Vector Machines
import numpy as np
from sklearn.svm import SVR

X = np.array([[0.0], [1.0], [2.0], [3.0], [4.0]])
y = np.array([0.0, 1.2, 1.9, 3.1, 4.0])
svr = SVR(kernel="linear", epsilon=0.5, C=10).fit(X, y)

# add one point whose target is 0.2 above the current prediction
x_new = 2.5
X2 = np.vstack([X, [[x_new]]])
y2 = np.append(y, svr.predict([[x_new]])[0] + 0.2)
svr2 = SVR(kernel="linear", epsilon=0.5, C=10).fit(X2, y2)

print(np.allclose(svr.predict(X), svr2.predict(X)))

True or false: the last line prints True.

Choose one option