摘要: * lrCostFunction.mfunction [J, grad] = lrCostFunction(theta, X, y, lambda)%LRCOSTFUNCTION Compute cost and gradient for logistic regression with %regularization% J = LRCOSTFUNCTION(theta, X, y, lambda) computes the cost of using% theta as the parameter for regularized logistic regression and the... 阅读全文
posted @ 2013-11-24 16:57 登山者 阅读(3758) 评论(0) 推荐(0) 编辑
摘要: * nnCostFunction.mfunction [J grad] = nnCostFunction(nn_params, ... input_layer_size, ... hidden_layer_size, ... num_labels, ... X, y, lambda)%NNCOSTFUNCTION Implem... 阅读全文
posted @ 2013-11-24 16:56 登山者 阅读(2918) 评论(0) 推荐(0) 编辑
摘要: * sigmoid.mfunction 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.. 阅读全文
posted @ 2013-11-24 16:47 登山者 阅读(2815) 评论(0) 推荐(0) 编辑