Moving course1 to course1 subdir.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
function visualizeBoundaryLinear(X, y, model)
|
||||
%VISUALIZEBOUNDARYLINEAR plots a linear decision boundary learned by the
|
||||
%SVM
|
||||
% VISUALIZEBOUNDARYLINEAR(X, y, model) plots a linear decision boundary
|
||||
% learned by the SVM and overlays the data on it
|
||||
|
||||
w = model.w;
|
||||
b = model.b;
|
||||
xp = linspace(min(X(:,1)), max(X(:,1)), 100);
|
||||
yp = - (w(1)*xp + b)/w(2);
|
||||
plotData(X, y);
|
||||
hold on;
|
||||
plot(xp, yp, '-b');
|
||||
hold off
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user