PYHTON
Exercise 1. Use the gradient descent and newton python scripts attached to the lecture class in Platon 2. For both, try to find min of below functions: a. y = sin(x) + cos(√2x) + sin (√√3x) b. y = sin(x) + cos(√2x) - sin (√√3x) c. y = sin(x) + cos(√2x²) d. y = sin(x) + cos (√2²) e. y sin(1/x) + cos s (√2²) Using starting points: Start = [-5, -3, -1, 1, 3, 5] And different learn rates: Learn_rate= [5, 0.5, 0.05] Use number of iterations = 100 *in case of newton method, for all functions from point 2, you need to calculate function df(x) - a first derivative of function f(x)
PYHTON
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am