From 6b8b03aa9c7f846f376de37bc450ef767d176600 Mon Sep 17 00:00:00 2001 From: Yukti Khosla <44090430+Yukti-09@users.noreply.github.com> Date: Tue, 18 Aug 2020 15:07:37 +0530 Subject: [PATCH] Create Parametric_ReLU.m --- algorithms/machine_learning/Parametric_ReLU.m | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 algorithms/machine_learning/Parametric_ReLU.m diff --git a/algorithms/machine_learning/Parametric_ReLU.m b/algorithms/machine_learning/Parametric_ReLU.m new file mode 100644 index 0000000..af8f51f --- /dev/null +++ b/algorithms/machine_learning/Parametric_ReLU.m @@ -0,0 +1,8 @@ +%Parametric ReLU function +x = -10:0.01:10; +a = input('Enter the value of the slope') +y = @(x) (x).*((x > 0)) + (a*x).*((x < 0)) ; +fplot(y); +xlabel('x'); +ylabel('y'); +grid on