. Which mathematical equations in SVM theory are implemented in the following Python functions. Write the corresponding two equations with their mathematical expressions. def compute_w(multipliers, X, y): return np.sum(multipliers[i] * y[i] * X[i] for i in range(len(y))) w = compute_w(multipliers, x, y) def compute_b(w, x, y): return np.sum([y[i] - np.dot(w, X[i]) for i in range(len(X))])/len(X) b = compute_b(w, x, y)

icon
Related questions
Question
4. Which mathematical equations in SVM theory are implemented in the following Python
functions. Write the corresponding two equations with their mathematical expressions.
equation -1:
equation-2:
def compute_w(multipliers, X, y):
return np.sum(multipliers[i] * y[i] * X[i]
for i in range(len(y)))
w = compute_w(multipliers, X, y)
def compute_b(w, x, y):
return np.sum([y[i] - np.dot(w, X[i])
for i in range(len(X))])/len(X)
b = compute_b(w, x, y)
Transcribed Image Text:4. Which mathematical equations in SVM theory are implemented in the following Python functions. Write the corresponding two equations with their mathematical expressions. equation -1: equation-2: def compute_w(multipliers, X, y): return np.sum(multipliers[i] * y[i] * X[i] for i in range(len(y))) w = compute_w(multipliers, X, y) def compute_b(w, x, y): return np.sum([y[i] - np.dot(w, X[i]) for i in range(len(X))])/len(X) b = compute_b(w, x, y)
Expert Solution
steps

Step by step

Solved in 3 steps with 16 images

Blurred answer