renaming
This commit is contained in:
16
5/data science/r/7/mlclass-ex2/sigmoid.m
Normal file
16
5/data science/r/7/mlclass-ex2/sigmoid.m
Normal file
@ -0,0 +1,16 @@
|
||||
function g = sigmoid(z)
|
||||
%SIGMOID Compute sigmoid functoon
|
||||
% J = SIGMOID(z) computes the sigmoid of z.
|
||||
|
||||
% You need to return the following variables correctly
|
||||
g = zeros(size(z));
|
||||
|
||||
% ====================== YOUR CODE HERE ======================
|
||||
% Instructions: Compute the sigmoid of each value of z (z can be a matrix,
|
||||
% vector or scalar).
|
||||
|
||||
g = 1 ./ (1 + exp(-z));
|
||||
|
||||
% =============================================================
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user