There's more...

This scaling factor can also be used to down-weight or up-weight features in the nearest-neighbor distance calculation. This can be useful in situations where we trust some features more than others.

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.