Data Science Projects with Python by Stephen Klosterman
Author:Stephen Klosterman
Language: eng
Format: epub
Publisher: Packt Publishing Pvt. Ltd.
Published: 2019-04-29T00:00:00+00:00
Perform 14 iterations to converge toward the local minimum of the cost function by using the following code snippet (note that iterations = 15 but the endpoint is not included in the call to range()):iterations = 15
x_path = np.empty(iterations,)
x_path[0] = x_start
for iteration_count in range(1,iterations):
derivative = gradient(x_path[iteration_count-1])
x_path[iteration_count] = x_path[iteration_count-1] - (derivative*learning_rate)
x_path
You will obtain the following output:
array([ 4.5 , -0.75 , 1.875 , 0.5625 , 1.21875 ,
0.890625 , 1.0546875 , 0.97265625, 1.01367188, 0.99316406,
1.00341797, 0.99829102, 1.00085449, 0.99957275, 1.00021362])
From the resulting values of the gradient descent process, it looks like (by the end) we've gotten very close (1.00021362) to the optimal solution (1).
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Computer Vision & Pattern Recognition | Expert Systems |
Intelligence & Semantics | Machine Theory |
Natural Language Processing | Neural Networks |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Test-Driven Development with Java by Alan Mellor(6672)
Data Augmentation with Python by Duc Haba(6577)
Principles of Data Fabric by Sonia Mezzetta(6339)
Learn Blender Simulations the Right Way by Stephen Pearson(6225)
Microservices with Spring Boot 3 and Spring Cloud by Magnus Larsson(6097)
Hadoop in Practice by Alex Holmes(5958)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5806)
RPA Solution Architect's Handbook by Sachin Sahgal(5491)
Big Data Analysis with Python by Ivan Marin(5335)
The Infinite Retina by Robert Scoble Irena Cronin(5191)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5140)
Pretrain Vision and Large Language Models in Python by Emily Webber(4296)
Infrastructure as Code for Beginners by Russ McKendrick(4057)
Functional Programming in JavaScript by Mantyla Dan(4037)
The Age of Surveillance Capitalism by Shoshana Zuboff(3944)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3771)
Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson(3573)
Applied Machine Learning for Healthcare and Life Sciences Using AWS by Ujjwal Ratan(3549)
