Gets sigmoid method working.
This commit is contained in:
julien Lengrand-Lambert
2015-11-22 10:43:17 +01:00
parent f6e27209da
commit fce4426cab
3 changed files with 8 additions and 8 deletions

View File

@@ -12,13 +12,14 @@ figure; hold on;
% examples and 'ko' for the negative examples.
%
% Find Indices of Positive and Negative Examples
pos = find(y==1); neg = find(y == 0);
% Plot Examples
plot(X(pos, 1), X(pos, 2), 'k+','LineWidth', 2, ...
'MarkerSize', 7);
plot(X(neg, 1), X(neg, 2), 'ko', 'MarkerFaceColor', 'y', ...
'MarkerSize', 7);
% =========================================================================

View File

@@ -10,8 +10,7 @@ g = zeros(size(z));
% vector or scalar).
g = ones(size(z)) ./ (1 + exp(-z));
% =============================================================

Binary file not shown.