From ed4de7c1ac5cf62821b5095d71e0fa2497a61d10 Mon Sep 17 00:00:00 2001 From: Murphy Chen Date: Sun, 14 May 2017 21:07:52 +0800 Subject: [PATCH] should use sigmoid function --- mlclass-ex3/predictOneVsAll.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlclass-ex3/predictOneVsAll.m b/mlclass-ex3/predictOneVsAll.m index 8b02a6c..9e4f46c 100644 --- a/mlclass-ex3/predictOneVsAll.m +++ b/mlclass-ex3/predictOneVsAll.m @@ -27,7 +27,7 @@ % % train each row for all classes and keep the label with the highest probability -htheta = X * all_theta'; +htheta = sigmoid (X * all_theta'); [temp, p] = max(htheta, [], 2); % =========================================================================