Notes by Retraice

Re78-NOTES.pdf


Listen Later

(The below text version of the notes is for search purposes and convenience. See the PDF version for proper formatting such as bold, italics, etc., and graphics where applicable. Copyright: 2022 Retraice, Inc.)

Re78: Recap of Gradients and Partial Derivatives (AIMA4e pp. 119-122)

retraice.com

An overview of Re70-Re76. The airport problem; squares vs. sums of distances; the six-dimensional solution space for three airports, many cities; the gradient as `slope' toward the best solution; the two-dimensional solution space for one airport, two cities; vector calculus as `pile of numbers' approach; local- vs. global-best solutions; the partial derivatives that make up the gradient, a total derivative; solving the two-cities-one-airport problem by gradient descent.

Air date: Sunday, 11th Dec. 2022, 11:00 PM Eastern/US.

We're focusing on the math and code of AIMA4e^1 right now, December 2022. This is in service of our plan to deep-dive the book from Jan.-Jun., 2023.

The airport problem from p. 120: Where to locate three airports amongst several cities in Romania such that the sum of the squares of the straight-line distances between each city and its nearest airport (which is a good way of measuring how well the airports have been placed) is minimized?

Re70: Gradients and Partial Derivatives Part 1 (AIMA4e pp. 119-122)^2

The math of `Local Search in Continuous Spaces'. The three airports and the six-dimensional vector that represents their coordinates and therefore solutions to the problem; why the sums of squares of the distances reflects better and worse airport locations; how the gradient is like a `slope' in the space of better and worse solutions; the gap between passive and active knowledge and a demonstration of confidence being calibrated.

Re71: Gradients and Partial Derivatives Part 2 (AIMA4e pp. 119-122)^3

Put the airport problem first. A simple, two-city-one-airport version of the problem; how vectors and calculus can represent this real-world problem as a `pile of numbers'; the airport coordinates as independent variables; the objective function as dependent variable; the gradient as tool for improving our first guess-hypothesis; local vs. global solution optimization.

Re72: Gradients and Partial Derivatives Part 3 (AIMA4e pp. 119-122)^4

Be in the math. The four key equations that define our problem and solutions--the solution guesses (vectors), the objective function of the solution guesses (our `score' or `cost' to be minimized), the gradient vector (the `slope' toward better and worse solutions), and the six partial derivatives that combine to make up our gradient vector (a six-dimensional `slope').

Re73: Gradients and Partial Derivatives Part 4 (AIMA4e pp. 119-122)^5

The limits that define our gradient. Discussion of how the gradient will indicate the `direction' of improving our first guess; full expansion of the gradient for the three-airport problem into six equations of partial derivatives and limits, each with respect to a different independent variable (airport partial coordinate).

Re74: Gradients and Partial Derivatives Part 5 (AIMA4e pp. 119-122)^6

Bringing the algebra back down to numbers. Calculating squares of distances on the map of Romania; a first look at the algebra of calculating the objective function given the coordinates of cities and airports.

Re75: Gradients and Partial Derivatives Part 6 (AIMA4e pp. 119-122)^7

Can we please just place an airport? A first airport guess for the two-city version of the problem; calculating the objective function value given that first guess and the coordinates of our two cities.

Re76: Gradients and Partial Derivatives Part 7 (AIMA4e pp. 119-122)^8

Moving the airport to improve its value. Mapping one, two and three guesses as directed by gradient descent calculations; the lucky-unlucky choice of our first airport location; the hand-math algebraic manipulations and the spreadsheet-math iterations that show the behavior of the partial derivatives in the limit; the common-sense basis of our confidence in the solution provided by gradient descent.

_

References

Retraice (2022/12/04). Re70: Gradients and Partial Derivatives Part 1 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re70 Retrieved 5th Dec. 2022.

Retraice (2022/12/05). Re71: Gradients and Partial Derivatives Part 2 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re71 Retrieved 6th Dec. 2022.

Retraice (2022/12/06). Re72: Gradients and Partial Derivatives Part 3 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re72 Retrieved 7th Dec. 2022.

Retraice (2022/12/07). Re73: Gradients and Partial Derivatives Part 4 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re73 Retrieved 8th Dec. 2022.

Retraice (2022/12/08). Re74: Gradients and Partial Derivatives Part 5 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re74 Retrieved 9th Dec. 2022.

Retraice (2022/12/09). Re75: Gradients and Partial Derivatives Part 6 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re75 Retrieved 10th Dec. 2022.

Retraice (2022/12/10). Re76: Gradients and Partial Derivatives Part 7 (AIMA4e pp. 119-122). retraice.com. https://www.retraice.com/segments/re76 Retrieved 11th Dec. 2022.

Russell, S., & Norvig, P. (2020). Artificial Intelligence: A Modern Approach. Pearson, 4th ed. ISBN: 978-0134610993. Searches: https://www.amazon.com/s?k=978-0134610993 https://www.google.com/search?q=isbn+978-0134610993 https://lccn.loc.gov/2019047498

Footnotes

^1 Russell & Norvig (2020). ^2 Retraice (2022/12/04). ^3 Retraice (2022/12/05). ^4 Retraice (2022/12/06). ^5 Retraice (2022/12/07). ^6 Retraice (2022/12/08). ^7 Retraice (2022/12/09). ^8 Retraice (2022/12/10).

...more
View all episodesView all episodes
Download on the App Store

Notes by RetraiceBy Retraice, Inc.