Skip to Main Content
Hands-On Artificial Intelligence for Beginners
book

Hands-On Artificial Intelligence for Beginners

by David Dindi, Patrick D. Smith
October 2018
Beginner content levelBeginner
362 pages
9h 32m
English
Packt Publishing
Content preview from Hands-On Artificial Intelligence for Beginners

Element–wise operations

In element-wise operations, position matters. Values that correspond positionally are combined to create a new value. 

To add to and/or subtract matrices or vectors:

 

And in Python:

vector_one = np.array([[1,2],[3,4]])vector_two = np.array([[5,6],[7,8]])    a + b    ## You should see:        array([[ 6, 8],[10, 12]])        array([[ 6, 8],[10, 12]])     a - b     ## You should see:         array([[-4, -4], [-4, -4]])

There are two forms of multiplication that we may perform with vectors: the Dot productand the Hadamard product.

The dot product is a special ...

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

Artificial Intelligence and Machine Learning Fundamentals

Artificial Intelligence and Machine Learning Fundamentals

Zsolt Nagy

Publisher Resources

ISBN: 9781788991063Supplemental Content