# \#book-programming-machine-learning

**URL:** https://forum.devtalk.com/tag/book-programming-machine-learning/203.md

[Latest](https://forum.devtalk.com/latest.md) · [Categories](https://forum.devtalk.com/categories.md) · [Tags](https://forum.devtalk.com/tags.md)

---

## [Programming Machine Learning: missing index in formula (p. 71)](https://forum.devtalk.com/t/programming-machine-learning-missing-index-in-formula-p-71/182916)

<div class="topic-metadata">

**Author:** [@HofmT](https://forum.devtalk.com/u/HofmT)\
**Replies:** 1\
**Last updated:** [6 January 2025 10:58 UTC](https://forum.devtalk.com/t/programming-machine-learning-missing-index-in-formula-p-71/182916 "2025-01-06T10:58:37Z")

</div>

Hello, I think there is a typo in the formula for the gradient of the mean squared error. Shouldn’t it be x with index i like it is in the formula above?

---

## [Programming Machine Learning: New repo with updated code](https://forum.devtalk.com/t/programming-machine-learning-new-repo-with-updated-code/158220)

<div class="topic-metadata">

**Author:** [@nusco](https://forum.devtalk.com/u/nusco)\
**Replies:** 4\
**Last updated:** [7 July 2024 22:00 UTC](https://forum.devtalk.com/t/programming-machine-learning-new-repo-with-updated-code/158220 "2024-07-07T22:00:27Z")

</div>

To readers of “Programming Machine Learning”: the code in the book runs on old-ish versions of Python and its libraries. If you have trouble running the examples, look for updated code and installation instructions on th…

---

## [Programming Machine Learning: matplotlib broadcast error on page 58](https://forum.devtalk.com/t/programming-machine-learning-matplotlib-broadcast-error-on-page-58/150774)

<div class="topic-metadata">

**Author:** [@tihnessa](https://forum.devtalk.com/u/tihnessa)\
**Replies:** 1\
**Last updated:** [12 April 2024 08:49 UTC](https://forum.devtalk.com/t/programming-machine-learning-matplotlib-broadcast-error-on-page-58/150774 "2024-04-12T08:49:01Z")

</div>

When I try to run the code multiple\_regression\_without\_bias.py from page 58 of the book, I get the following error: File “\[path snipped\]/multilple\_regression\_without\_bias.py”, line 13, in gradient return 2 \* np.matmul(…

---

## [Programming Machine Learning - Dimension numbers correct? (page 118)](https://forum.devtalk.com/t/programming-machine-learning-dimension-numbers-correct-page-118/147243)

<div class="topic-metadata">

**Author:** [@mscdit](https://forum.devtalk.com/u/mscdit)\
**Replies:** 1\
**Last updated:** [17 March 2024 15:11 UTC](https://forum.devtalk.com/t/programming-machine-learning-dimension-numbers-correct-page-118/147243 "2024-03-17T15:11:35Z")

</div>

Hi @nusco, I have a question regarding the dimension numbers of the matrices shown in the picture on page 118. What I am currently struggling with is, node “h\_0” is used for bias purpose (which means constant value 1). …

---

## [Programming Machine Learning: Setting up your system (p 13)](https://forum.devtalk.com/t/programming-machine-learning-setting-up-your-system-p-13/127581)

<div class="topic-metadata">

**Author:** [@roadbike](https://forum.devtalk.com/u/roadbike)\
**Replies:** 3\
**Last updated:** [9 October 2023 07:44 UTC](https://forum.devtalk.com/t/programming-machine-learning-setting-up-your-system-p-13/127581 "2023-10-09T07:44:15Z")

</div>

From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio Code pip3 install numpy==1.19.5 pip3 install matplotlib==3.2.2 pip3 install seab…

---

## [Programming Machine Learning:](https://forum.devtalk.com/t/programming-machine-learning/124473)

<div class="topic-metadata">

**Author:** [@kai](https://forum.devtalk.com/u/kai)\
**Replies:** 4\
**Last updated:** [3 October 2023 20:36 UTC](https://forum.devtalk.com/t/programming-machine-learning/124473 "2023-10-03T20:36:18Z")

</div>

@nusco Programming Machine Learning From Coding to Deep Learning German edition Chapter 11 Training the network Page 191 def back(X, Y, y\_hat, w2, h): w2\_gradient = np.matmul(prepend\_bias(h).T, y\_hat - Y) / X.shap…

---

## [Programming Machine Learning (PragProg)](https://forum.devtalk.com/t/programming-machine-learning-pragprog/425)

<div class="topic-metadata">

**Author:** [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Replies:** 3\
**Last updated:** [3 October 2023 15:08 UTC](https://forum.devtalk.com/t/programming-machine-learning-pragprog/425 "2023-10-03T15:08:13Z")

</div>

Machine learning can be intimidating, with its reliance on math and algorithms that most programmers don't encounter in their regular work. The good news is that it doesn't have to be that hard. Take a hands-on approach,…

---

## [Programming Machine Learning: some plot files are throwing error](https://forum.devtalk.com/t/programming-machine-learning-some-plot-files-are-throwing-error/83609)

<div class="topic-metadata">

**Author:** [@ggerico](https://forum.devtalk.com/u/ggerico)\
**Replies:** 5\
**Last updated:** [17 September 2023 09:42 UTC](https://forum.devtalk.com/t/programming-machine-learning-some-plot-files-are-throwing-error/83609 "2023-09-17T09:42:29Z")

</div>

I got this error when executing the plot files on macOS Ventura 13.0.1 with Python 3.10.8 and matplotlib 3.6.1: programming\_ML/code/03\_gradient: $ python3 plot\_loss\_with\_path.py Traceback (most recent call last): Fi…

---

## [Programming Machine Learning: a tip and a gotcha](https://forum.devtalk.com/t/programming-machine-learning-a-tip-and-a-gotcha/89716)

<div class="topic-metadata">

**Author:** [@wasshuber](https://forum.devtalk.com/u/wasshuber)\
**Replies:** 23\
**Last updated:** [6 March 2023 14:59 UTC](https://forum.devtalk.com/t/programming-machine-learning-a-tip-and-a-gotcha/89716 "2023-03-06T14:59:39Z")

</div>

Tip: If you are on a slow or old machine like me, or if you want to run many different examples to explore the design space you can speed up the calculations by removing a border from the MNIST image data. Every image ha…

---

## [Programming Machine Learning: MNIST benchmark for multi-layer networks](https://forum.devtalk.com/t/programming-machine-learning-mnist-benchmark-for-multi-layer-networks/89971)

<div class="topic-metadata">

**Author:** [@wasshuber](https://forum.devtalk.com/u/wasshuber)\
**Replies:** 12\
**Last updated:** [8 January 2023 15:56 UTC](https://forum.devtalk.com/t/programming-machine-learning-mnist-benchmark-for-multi-layer-networks/89971 "2023-01-08T15:56:13Z")

</div>

Does anybody have benchmark results on what accuracy is achievable on the MNIST data with a multilayer network? I am particularly interested in smaller node numbers but deeper networks. For example what can be done with …

---

## [Programming Machine Learning: Help: weird results I don't understand](https://forum.devtalk.com/t/programming-machine-learning-help-weird-results-i-dont-understand/89719)

<div class="topic-metadata">

**Author:** [@wasshuber](https://forum.devtalk.com/u/wasshuber)\
**Replies:** 9\
**Last updated:** [3 January 2023 19:58 UTC](https://forum.devtalk.com/t/programming-machine-learning-help-weird-results-i-dont-understand/89719 "2023-01-03T19:58:00Z")

</div>

I encountered something that I can’t explain. Any help, tips, or explanations would be great. I followed the one hidden layer example with 100 nodes and sigmoid activation function. Works great and I can get to 98.6% ac…

---

## [Programming Machine Learning:Error in Chapter 17?](https://forum.devtalk.com/t/programming-machine-learning-error-in-chapter-17/89875)

<div class="topic-metadata">

**Author:** [@arohl](https://forum.devtalk.com/u/arohl)\
**Replies:** 3\
**Last updated:** [3 January 2023 11:15 UTC](https://forum.devtalk.com/t/programming-machine-learning-error-in-chapter-17/89875 "2023-01-03T11:15:40Z")

</div>

Title: Name of book: description (page number) Example: Programming Flutter - ‘pub get’ command not working (page 15) I needed to change the L1 regularizer parameter to 0.004 rather than 0.0004 to get similar losses be…

---

## [Programming Machine Learning- gradient descent calculating the derivative (page 35)](https://forum.devtalk.com/t/programming-machine-learning-gradient-descent-calculating-the-derivative-page-35/81036)

<div class="topic-metadata">

**Author:** [@ggerico](https://forum.devtalk.com/u/ggerico)\
**Replies:** 5\
**Last updated:** [6 November 2022 22:11 UTC](https://forum.devtalk.com/t/programming-machine-learning-gradient-descent-calculating-the-derivative-page-35/81036 "2022-11-06T22:11:57Z")

</div>

if someone can help me to understand how to calculate the derivative: 2/m xi ((wxi + b) - yi) I thought it was: 2/m ((wxi + b) - yi) tks ~

---

## [Programming Machine Learning: P.Perrotta](https://forum.devtalk.com/t/programming-machine-learning-p-perrotta/28219)

<div class="topic-metadata">

**Author:** [@jert47](https://forum.devtalk.com/u/jert47)\
**Replies:** 8\
**Last updated:** [6 May 2022 16:49 UTC](https://forum.devtalk.com/t/programming-machine-learning-p-perrotta/28219 "2022-05-06T16:49:12Z")

</div>

Title: Programming ML (page 200) - installing keras 2.3.1 doesn’t install TensorFlow, as the book suggests.

---

## [Programming Machine Learning: Incorrect formula](https://forum.devtalk.com/t/programming-machine-learning-incorrect-formula/3716)

<div class="topic-metadata">

**Author:** [@Alexandr](https://forum.devtalk.com/u/Alexandr)\
**Replies:** 4\
**Last updated:** [6 April 2022 09:36 UTC](https://forum.devtalk.com/t/programming-machine-learning-incorrect-formula/3716 "2022-04-06T09:36:12Z")

</div>

Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You can’t just change the weighted sum to a sigmoid without first taking the derivative …

---

## [Get 50% off these PragProg books during our Think Again Sale](https://forum.devtalk.com/t/get-50-off-these-pragprog-books-during-our-think-again-sale/9523)

<div class="topic-metadata">

**Author:** [@Margaret](https://forum.devtalk.com/u/Margaret)\
**Replies:** 2\
**Last updated:** [11 May 2021 23:06 UTC](https://forum.devtalk.com/t/get-50-off-these-pragprog-books-during-our-think-again-sale/9523 "2021-05-11T23:06:15Z")

</div>

Think Again 50% Off Sale » The theme of this sale is new perspectives on familiar topics. Enter coupon code ThinkAgain2021 at checkout to save 50% on any of the following titles. Offer not valid for previous purchases.…

---

## [Spotlight: Paolo Perrotta (Author)](https://forum.devtalk.com/t/spotlight-paolo-perrotta-author/6868)

<div class="topic-metadata">

**Author:** [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Replies:** 15\
**Last updated:** [15 March 2021 20:28 UTC](https://forum.devtalk.com/t/spotlight-paolo-perrotta-author/6868 "2021-03-15T20:28:12Z")

</div>

“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles? More importantly, is making the switch from short-form to long-form worth the eff…

---

## [Programming Machine Learning:incorrect reference to datetime.format() method (p291)](https://forum.devtalk.com/t/programming-machine-learning-incorrect-reference-to-datetime-format-method-p291/6306)

<div class="topic-metadata">

**Author:** [@RichardMurnane](https://forum.devtalk.com/u/RichardMurnane)\
**Replies:** 1\
**Last updated:** [26 January 2021 22:43 UTC](https://forum.devtalk.com/t/programming-machine-learning-incorrect-reference-to-datetime-format-method-p291/6306 "2021-01-26T22:43:57Z")

</div>

Hi Paolo, thanks for what looks like a great book on this topic. Looking forward to no longer being an ML “noob”. Just a minor error: on p291, you mention that the datetime package has a format() method, but the code s…

---

## [Programming Machine Learning: New printing](https://forum.devtalk.com/t/programming-machine-learning-new-printing/6181)

<div class="topic-metadata">

**Author:** [@Margaret](https://forum.devtalk.com/u/Margaret)\
**Replies:** 0\
**Last updated:** [21 January 2021 14:01 UTC](https://forum.devtalk.com/t/programming-machine-learning-new-printing/6181 "2021-01-21T14:01:18Z")

</div>

Paulo @nusco is working on some updates to Programming Machine Learning #book-programming-machine-learning, so if you have any feedback for him, now would be a good time to leave a comment.

---

## [Programming Machine Learning: Incomplete sentence (page 45)](https://forum.devtalk.com/t/programming-machine-learning-incomplete-sentence-page-45/5240)

<div class="topic-metadata">

**Author:** [@HofmT](https://forum.devtalk.com/u/HofmT)\
**Replies:** 1\
**Last updated:** [20 December 2020 19:16 UTC](https://forum.devtalk.com/t/programming-machine-learning-incomplete-sentence-page-45/5240 "2020-12-20T19:16:00Z")

</div>

Hello, I’m not entirley sure if this is an errata but the third paragraph in chapter 2 starts with: “However simple linear regression is, don’t underestimate the challenge ahead.” This sounds to me as if the end of thi…

---

## [Programming Machine Learning: Bias in linear regression](https://forum.devtalk.com/t/programming-machine-learning-bias-in-linear-regression/845)

<div class="topic-metadata">

**Author:** [@samuiweb\_gm](https://forum.devtalk.com/u/samuiweb_gm)\
**Replies:** 5\
**Last updated:** [18 June 2020 12:26 UTC](https://forum.devtalk.com/t/programming-machine-learning-bias-in-linear-regression/845 "2020-06-18T12:26:14Z")

</div>

Hi there, bought “Programming Machine Learning” (great book) from pragprog. A question (from a newbie) for the author, or anyone can help: At the end of the chapter 4 in the paragraph “Bye Bye, Bias” is described how …
