1.) A function you have found with a minimum of 2 local points has a minimum Write a program that finds its points using the Stochastic Gradient Descent (SGD) algorithm. 2-dimensional (on the contours of the function) and 3-dimensional (the function's on the surface) with graphics and add the graph and codes to the homework.
2.) A self-found function that adds parasites and then eliminates them. Write a program, add the graphics and codes to the homework.
x = -5:30;
for n = 1:36
if x(n)<0
y(n) = 10;
elseif (0<=x(n))&&(x(n)<9)
y(n) = 10*x(n)+10;
else
y(n) = 15*sqrt(4*x(n))+10;
end
end
plot(x,y,'r',"LineWidth",2)
xlabel('Value of x')
ylabel('Function Y')
title('The plot of function y against x')
Comments
Leave a comment