Errata

Artificial Intelligence in Finance

Errata for Artificial Intelligence in Finance

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Other Digital Version
chapter 5
Code. cells 25 to 28

The code from cells 25 to 28, doesn't work:

res.iloc[100:].plot(figsize=(10, 6))
plt.ylabel('MSE')
plt.xlabel('epochs');
# plt.savefig('../../images/ch05/figure_ml_04.png');

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-28-8c8f449c6bb6> in <module>
----> 1 res.iloc[100:].plot(figsize=(10, 6))
2 plt.ylabel('MSE')
3 plt.xlabel('epochs');
4 # plt.savefig('../../images/ch05/figure_ml_04.png');

/anaconda/lib/python3.8/site-packages/pandas/plotting/_core.py in __call__(self, *args, **kwargs)
845 data.columns = label_name
846
--> 847 return plot_backend.plot(data, kind=kind, **kwargs)
848
849 __call__.__doc__ = __doc__

/anaconda/lib/python3.8/site-packages/pandas/plotting/_matplotlib/__init__.py in plot(data, kind, **kwargs)
59 kwargs["ax"] = getattr(ax, "left_ax", ax)
60 plot_obj = PLOT_CLASSES[kind](data, **kwargs)
---> 61 plot_obj.generate()
62 plot_obj.draw()
63 return plot_obj.result

/anaconda/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py in generate(self)
259 def generate(self):
260 self._args_adjust()
--> 261 self._compute_plot_data()
262 self._setup_subplots()
263 self._make_plot()

/anaconda/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py in _compute_plot_data(self)
408 # no non-numeric frames or series allowed
409 if is_empty:
--> 410 raise TypeError("no numeric data to plot")
411
412 # GH25587: cast ExtensionArray of pandas (IntegerArray, etc.) to

TypeError: no numeric data to plot






Note from the Author or Editor:
The API of Keras has been changed recently with regard to dealing with training history.

Code cell [22] should be changed to:
[22] %time h = model.fit(f, l, epochs=1500, verbose=False)

Code cell [27] should be changed to:
[27] res = pd.DataFrame(h.history)

Same approach should be used for code cells [49] and [51].

Jorge Thomas  Nov 22, 2020 
Page 17
All of chapter 1 (so far)

It seems that there might be a figure missing causing all the diagrams to be moved into the wrong direction once.

For example: on page 17 it says:
"the following code generates the random sample data set and creates the OLS regression estimation based on varying numbers of monomial basis functions. Figure 1-7 visualise the results"

However the code following this statement visualise the results shown in Figure 1-6, just before this statement.

The version of my book is Copyright 2021 - First Release 2020-10-14.

Note from the Author or Editor:
Indeed, in the first release there was a hiccup with regard to the numbering of figures. Newer versions (electronic ones) do not have this issue anymore.

Stephan Paul  Apr 08, 2021