Skip to Main Content
Artificial Intelligence in Finance
book

Artificial Intelligence in Finance

by Yves Hilpisch
October 2020
Intermediate to advanced content levelIntermediate to advanced
475 pages
11h 39m
English
O'Reilly Media, Inc.
Book available
Content preview from Artificial Intelligence in Finance

Appendix B. Neural Network Classes

Building on the foundations from Appendix A, this appendix provides simple, class-based implementations of neural networks that mimic the APIs of packages such as scikit-learn. The implementation is based on pure, simple Python code and is for illustration and instruction. The classes presented in this appendix cannot replace robust, efficient, and scalable implementations found in the standard Python packages, such as scikit-learn or TensorFlow in combination with Keras.

The appendix comprises the following sections:

The implementations and examples in this appendix are simple and straightforward. The Python classes are not well suited to attack larger estimation or classification problems. The idea is rather to show easy-to-understand Python implementations from scratch.

Activation Functions

Appendix A uses two activation functions implicitly or explicitly: linear function and sigmoid function. The Python function activation adds the relu (rectified linear unit) and softplus functions to the set of options. For all these activation functions, the first derivative is also defined:

In [1]: import
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Machine Learning for Finance

Machine Learning for Finance

James Le, Jannes Klaas

Publisher Resources

ISBN: 9781492055426Errata PageSupplemental Content