Errata

Hands-On Unsupervised Learning Using Python

Errata for Hands-On Unsupervised Learning Using Python

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
ePub Page Page 196
08_autoencoders.ipynb

When executing 08_autoencoders.ipynb, an error was found. How to solve it?

# Evaluate on test set
predictions = model.predict(X_test, verbose=1)
anomalyScoresAE = anomalyScores(X_test, predictions)
preds = plotResults(y_test, anomalyScoresAE, True)
model.reset_states()

Error message when executing the above program:--------------

ValueError: y_true takes value in {"'0'", "'1'"} and pos_label is not specified: either make y_true take value in {0, 1} or {-1, 1} or pass pos_label explicitly.

Gavin Su  Oct 02, 2023