# Machine Learning in Elixir: B5 Page 105 Incorrect application of min\_max\_scale

**URL:** <https://forum.devtalk.com/t/machine-learning-in-elixir-b5-page-105-incorrect-application-of-min-max-scale/166043>\
**Category:** PragProg Customers\
**Tags:** book-machine-learning-in-elixir, errata\
**Created:** [14 August 2024 02:04 UTC](https://forum.devtalk.com/t/machine-learning-in-elixir-b5-page-105-incorrect-application-of-min-max-scale/166043 "2024-08-14T02:04:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![seanmor5](https://forum.devtalk.com/user_avatar/forum.devtalk.com/seanmor5/32/1169_2.png) [@seanmor5](https://forum.devtalk.com/u/seanmor5)\
**Post date:** [14 August 2024 13:52 UTC](https://forum.devtalk.com/t/machine-learning-in-elixir-b5-page-105-incorrect-application-of-min-max-scale/166043/2 "2024-08-14T13:52:15Z")

</div>

Good shout, the correct code should be something like:

```elixir
scaler = Scholar.Preprocessing.MinMaxScaler.fit(train_inputs)
train_inputs = Scholar.Preprocessing.MinMaxScaler.transform(scaler, train_inputs)
test_inputs = Scholar.Preprocessing.MinMaxScaler.transform(scaler, test_inputs)

```

---

_[View the full topic](https://forum.devtalk.com/t/machine-learning-in-elixir-b5-page-105-incorrect-application-of-min-max-scale/166043)._
