Muutke küpsiste eelistusi

E-raamat: Math for Programmers: 3D graphics, machine learning, and simulations with Python

  • Formaat: 688 pages
  • Ilmumisaeg: 30-Nov-2020
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638357070
  • Formaat - EPUB+DRM
  • Hind: 51,64 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 688 pages
  • Ilmumisaeg: 30-Nov-2020
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638357070

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

To score a job in data science, machine learning, computer graphics, and cryptography, you need to bring strong math skills to the party. Math for Programmers teaches the math you need for these hot careers, concentrating on what you need to know as a developer.

Filled with lots of helpful graphics and more than 200 exercises and mini-projects, this book unlocks the door to interesting-and lucrative!-careers in some of today's hottest programming fields.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.



In Math for Programmers you&;ll explore important mathematical concepts through hands-on coding. Filled with graphics and more than 300 exercises and mini-projects, this book unlocks the door to interesting&;and lucrative!&;careers in some of today&;s hottest fields. As you tackle the basics of linear algebra, calculus, and machine learning, you&;ll master the key Python libraries used to turn them into real-world software applications.

Summary
To score a job in data science, machine learning, computer graphics, and cryptography, you need to bring strong math skills to the party. Math for Programmers teaches the math you need for these hot careers, concentrating on what you need to know as a developer. Filled with lots of helpful graphics and more than 200 exercises and mini-projects, this book unlocks the door to interesting&;and lucrative!&;careers in some of today&;s hottest programming fields.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Skip the mathematical jargon: This one-of-a-kind book uses Python to teach the math you need to build games, simulations, 3D graphics, and machine learning algorithms. Discover how algebra and calculus come alive when you see them in code!

About the book
In Math for Programmers you&;ll explore important mathematical concepts through hands-on coding. Filled with graphics and more than 300 exercises and mini-projects, this book unlocks the door to interesting&;and lucrative!&;careers in some of today&;s hottest fields. As you tackle the basics of linear algebra, calculus, and machine learning, you&;ll master the key Python libraries used to turn them into real-world software applications.

What's inside

    Vector geometry for computer graphics
    Matrices and linear transformations
    Core concepts from calculus
    Simulation and optimization
    Image and audio processing
    Machine learning algorithms for regression and classification

About the reader
For programmers with basic skills in algebra.

About the author
Paul Orland is a programmer, software entrepreneur, and math enthusiast. He is co-founder of Tachyus, a start-up building predictive analytics software for the energy industry. You can find him online at www.paulor.land.

Table of Contents

1 Learning math with code

PART I - VECTORS AND GRAPHICS

2 Drawing with 2D vectors

3 Ascending to the 3D world

4 Transforming vectors and graphics

5 Computing transformations with matrices

6 Generalizing to higher dimensions

7 Solving systems of linear equations

PART 2 - CALCULUS AND PHYSICAL SIMULATION

8 Understanding rates of change

9 Simulating moving objects

10 Working with symbolic expressions

11 Simulating force fields

12 Optimizing a physical system

13 Analyzing sound waves with a Fourier series

PART 3 - MACHINE LEARNING APPLICATIONS

14 Fitting functions to data

15 Classifying data with logistic regression

16 Training neural networks

Arvustused

'A gentle introduction to some of the most useful mathematical concepts that should be in your developer toolbox.' Christopher Haupt, New Relic 'A rigorous yet approachable overview of the mathematics that underpin a number of modern programming domains.' Dan Sheikh, BCG Digital Ventures 'Engaging, practical, recommend for all levels.' V incent Zhu, rethinkxsocial.com 'It provides a bridge for programmers who need to brush up on their math skills, and does a nice job of making the math less mysterious and more approachable.' Robert Walsh, Excalibur Solutions

preface xvii
acknowledgments xxi
About this book xxiii
About the author xxviii
About the cover illustration xxix
1 Learning math with code
1(18)
1.1 Solving lucrative problems with math and software
2(9)
Predicting financial market movements
2(3)
Finding a good deal
5(2)
Building 3D graphics and animations
7(2)
Modeling the physical world
9(2)
1.2 How not to learn math
11(2)
Jane wants to learn some math
12(1)
Slogging through math textbooks
13(1)
1.3 Using your well-trained left brain
13(6)
Using a formal language
14(1)
Build your own calculator
15(1)
Building abstractions with functions
16(3)
Part 1 Vectors and graphics
19(282)
2 Drawing with 2D vectors
21(54)
2.1 Picturing 2D vectors
22(10)
Representing 2D vectors
24(2)
2D drawing in Python
26(3)
Exercises
29(3)
2.2 Plane vector arithmetic
32(19)
Vector components and lengths
35(2)
Multiplying vectors by numbers
37(2)
Subtraction, displacement, and distance
39(3)
Exercises
42(9)
2.3 Angles and trigonometry in the plane
51(16)
From angles to components
52(4)
Radians and trigonometry in Python
56(1)
From components back to angles
57(3)
Exercises
60(7)
2.4 Transforming collections of vectors
67(5)
Combining vector transformations
69(1)
Exercises
70(2)
2.5 Drawing with Matplotlib
72(3)
3 Ascending to the 3D world
75(46)
3.1 Picturing vectors in 3D space
77(6)
Representing 3D vectors with coordinates
79(1)
3D drawing with Python
80(2)
Exercises
82(1)
3.2 Vector arithmetic in 3D
83(9)
Adding 3D vectors
83(2)
Scalar multiplication in 3D
85(1)
Subtracting 3D vectors
85(1)
Computing lengths and distances
86(1)
Computing angles and directions
87(2)
Exercises
89(3)
3.3 The dot product: Measuring vector alignment
92(11)
Picturing the dot product
93(2)
Computing the dot product
95(2)
Dot products by example
97(1)
Measuring angles with the dot product
97(3)
Exercises
100(3)
3.4 The cross product: Measuring oriented area
103(11)
Orienting ourselves in 3D
103(3)
Finding the direction of the cross product
106(2)
Finding the length of the cross product
108(1)
Computing the cross product of 3D vectors
109(1)
Exercises
110(4)
3.5 Rendering a 3D object in 2D
114(7)
Defining a 3D object with vectors
114(2)
Projecting to 2D
116(1)
Orienting faces and shading
116(3)
Exercises
119(2)
4 Transforming vectors and graphics
121(37)
4.1 Transforming 3D objects
123(15)
Drawing a transformed object
124(2)
Composing vector transformations
126(3)
Rotating an object about an axis
129(2)
Inventing your own geometric transformations
131(3)
Exercises
134(4)
4.2 Linear transformations
138(20)
Preserving vector arithmetic
138(2)
Picturing linear transformations
140(2)
Why linear transformations?
142(4)
Computing linear transformations
146(3)
Exercises
149(9)
5 Computing transformations with matrices
158(47)
5.1 Representing linear transformations with matrices
159(16)
Writing vectors and linear transformations as matrices
159(2)
Multiplying a matrix with a vector
161(2)
Composing linear transformations by matrix multiplication
163(3)
Implementing matrix multiplication
166(1)
3D animation with matrix transformations
166(3)
Exercises
169(6)
5.2 Interpreting matrices of different shapes
175(16)
Column vectors as matrices
176(2)
What pairs of matrices can be multiplied?
178(2)
Viewing square and non-square matrices as vector functions
180(1)
Projection as a linear map from 3D to 2D
181(3)
Composing linear maps
184(2)
Exercises
186(5)
5.3 Translating vectors with matrices
191(14)
Making plane translations linear
191(3)
Finding a 3D matrix for a 2D translation
194(1)
Combining translation with other linear transformations
195(1)
Translating 3D objects in a 4D world
196(3)
Exercises
199(6)
6 Generalizing to higher dimensions
205(96)
6.1 Generalizing our definition of vectors
206(13)
Creating a class for 2D coordinate vectors
207(1)
Improving the Vec2 class
208(1)
Repeating the process with 3D vectors
209(1)
Building a vector base class
210(2)
Defining vector spaces
212(2)
Unit testing vector space classes
214(2)
Exercises
216(3)
6.2 Exploring different vector spaces
219(18)
Enumerating all coordinate vector spaces
219(2)
Identifying vector spaces in the wild
221(2)
Treating functions as vectors
223(3)
Treating matrices as vectors
226(1)
Manipulating images with vector operations
227(3)
Exercises
230(7)
6.3 Looking for smaller vector spaces
237(21)
Identifying subspaces
238(2)
Starting with a single vector
240(1)
Spanning a bigger space
240(3)
Defining the word dimension
243(1)
Finding subspaces of the vector space of functions
244(1)
Subspaces of images
245(3)
Exercises
248(9)
Solving systems of linear equations
257(1)
7.1 Designing an arcade game
258(5)
Modeling the game
259(1)
Rendering the game
260(1)
Shooting the laser
261(1)
Exercises
262(1)
7.2 Finding intersection points of lines
263(15)
Choosing the right formula for a line
263(2)
Finding the standard form equation for a line
265(2)
Linear equations in matrix notation
267(1)
Solving linear equations with NumPy
268(2)
Deciding whether the laser hits an asteroid
270(1)
Identifying unsolvable systems
271(2)
Exercises
273(5)
7.3 Generalizing linear equations to higher dimensions
278(16)
Representing planes in 3D
278(2)
Solving linear equations in 3D
280(2)
Studying hyperplanes algebraically
282(1)
Counting dimensions, equations, and solutions
283(2)
Exercises
285(9)
7.4 Changing basis by solving linear equations
294(7)
Solving a 3D example
296(1)
Exercises
297(4)
Part 2 Calculus and physical simulation
301(196)
8 Understanding rates of change
303(34)
8.1 Calculating average flow rate from volume
305(5)
Implementing an average_flow_rate function
305(1)
Picturing the average flow rate with a secant line
306(2)
Negative rates of change
308(1)
Exercises
309(1)
8.2 Plotting the average flow rate over time
310(5)
Finding the average flow rate in different time intervals
310(1)
Plotting the interval flow rates
311(2)
Exercises
313(2)
8.3 Approximating instantaneous flow rates
315(8)
Finding the slope of small secant lines
315(3)
Building the instantaneous flow rate function
318(2)
Currying and plotting the instantaneous flow rate function
320(2)
Exercises
322(1)
8.4 Approximating the change in volume
323(5)
Finding the change in volume for a short time interval
323(1)
Breaking up time into smaller intervals
324(1)
Picturing the volume change on the flow rate graph
325(3)
Exercises
328(1)
8.5 Plotting the volume over time
328(9)
Finding the volume over time
328(1)
Picturing Riemann sums for the volume function
329(3)
Improving the approximation
332(2)
Definite and indefinite integrals
334(3)
9 Simulating moving objects
337(17)
9.1 Simulating a constant velocity motion
338(4)
Adding velocities to the asteroids
339(1)
Updating the game engine to move the asteroids
339(1)
Keeping the asteroids on the screen
340(2)
Exercises
342(1)
9.2 Simulating acceleration
342(2)
Accelerating the spaceship
343(1)
9.3 Digging deeper into Euler's method
344(4)
Carrying out Euler's method by hand
344(2)
Implementing the algorithm in Python
346(2)
9.4 Running Euler's method with smaller time steps
348(6)
Exercises
349(5)
10 Working with symbolic expressions
354(38)
10.1 Finding an exact derivative with a computer algebra system
355(3)
Doing symbolic algebra in Python
356(2)
10.2 Modeling algebraic expressions
358(7)
Breaking an expression into pieces
358(1)
Building an expression tree
359(1)
Translating the expression tree to Python
360(2)
Exercises
362(3)
10.3 Putting a symbolic expression to work
365(9)
Finding all the variables in an expression
365(1)
Evaluating an expression
366(3)
Expanding an expression
369(3)
Exercises
372(2)
10.4 Finding the derivative of a function
374(7)
Derivatives of powers
374(1)
Derivatives of transformed functions
375(2)
Derivatives of some special functions
377(1)
Derivatives of products and compositions
378(1)
Exercises
379(2)
10.5 Taking derivatives automatically
381(6)
Implementing a derivative method for expressions
382(1)
Implementing the product rule and chain rule
383(1)
Implementing the power rule
384(2)
Exercises
386(1)
10.6 Integrating functions symbolically
387(5)
Integrals as antiderivatives
387(1)
Introducing the SymPy library
388(1)
Exercises
389(3)
11 Simulating force fields
392(30)
11.1 Modeling gravity with a vector field
393(3)
Modeling gravity with a potential energy function
394(2)
11.2 Modeling gravitational fields
396(3)
Defining a vector field
396(2)
Defining a simple force field
398(1)
11.3 Adding gravity to the asteroid game
399(5)
Making game objects feel gravity
400(3)
Exercises
403(1)
11.4 Introducing potential energy
404(4)
Defining a potential energy scalar field
405(2)
Plotting a scalar field as a heatmap
407(1)
Plotting a scalar field as a contour map
407(1)
11.5 Connecting energy and forces with the gradient
408(14)
Measuring steepness with cross sections
409(2)
Calculating partial derivatives
411(2)
Finding the steepness of a graph with the gradient
413(2)
Calculating force fields from potential energy with the gradient
415(3)
Exercises
418(4)
12 Optimizing a physical system
422(41)
12.1 Testing a projectile simulation
425(7)
Building a simulation with Euler's method
426(1)
Measuring properties of the trajectory
427(1)
Exploring different launch angles
428(1)
Exercises
429(3)
12.2 Calculating the optimal range
432(8)
Finding the projectile range as a function of the launch angle
432(3)
Solving for the maximum range
435(2)
Identifying maxima and minima
437(2)
Exercises
439(1)
12.3 Enhancing our simulation
440(9)
Adding another dimension
441(1)
Modeling terrain around the cannon
442(1)
Solving for the range of the projectile in 3D
443(4)
Exercises
447(2)
12.4 Optimizing range using gradient ascent
449(14)
Plotting range versus launch parameters
449(1)
The gradient of the range function
450(1)
Finding the uphill direction with the gradient
451(2)
Implementing gradient ascent
453(4)
Exercises
457(6)
13 Analyzing sound waves with a Fourier series
463(34)
13.1 Combining sound waves and decomposing them
465(1)
13.2 Playing sound waves in Python
466(5)
Producing our first sound
467(2)
Playing a musical note
469(2)
Exercises
471(1)
13.3 Turning a sinusoidal wave into a sound
471(7)
Making audio from sinusoidal functions
471(2)
Changing the frequency of a sinusoid
473(2)
Sampling and playing the sound wave
475(2)
Exercises
477(1)
13.4 Combining sound waves to make new ones
478(8)
Adding sampled sound waves to build a chord
478(1)
Picturing the sum of two sound waves
479(2)
Building a linear combination of sinusoids
481(2)
Building a familiar function with sinusoids
483(3)
Exercises
486(1)
13.5 Decomposing a sound wave into its Fourier series
486(11)
Finding vector components with an inner product
487(1)
Defining an inner product for periodic functions
488(2)
Writing a function to find Fourier coefficients
490(1)
Finding the Fourier coefficients for the square wave
491(1)
Fourier coefficients for other waveforms
492(2)
Exercises
494(3)
Part 3 Machine learning applications
497(98)
14 Fitting functions to data
499(27)
14.1 Measuring the quality of fit for a function
502(9)
Measuring distance from a function
503(2)
Summing the squares of the errors
505(2)
Calculating cost for car price functions
507(3)
Exercises
510(1)
14.2 Exploring spaces of functions
511(4)
Picturing cost for lines through the origin
512(2)
The space of all linear functions
514(1)
Exercises
515(1)
14.3 Finding the line of best fit using gradient descent
515(4)
Rescaling the data
516(1)
Finding and plotting the line of best fit
516(2)
Exercises
518(1)
14.4 Fitting a nonlinear function
519(7)
Understanding the behavior of exponential functions
519(2)
Finding the exponential function of best fit
521(2)
Exercises
523(3)
15 Classifying data with logistic regression
526(33)
15.1 Testing a classification function on real data
528(4)
Loading the car data
529(1)
Testing the classification function
529(1)
Exercises
530(2)
15.2 Picturing a decision boundary
532(4)
Picturing the space of cars
532(1)
Drawing a better decision boundary
533(1)
Implementing the classification function
534(1)
Exercises
535(1)
15.3 Framing classification as a regression problem
536(8)
Scaling the raw car data
536(2)
Measuring the "BMWness" of a car
538(2)
Introducing the sigmoid function
540(1)
Composing the sigmoid function with other functions
541(2)
Exercises
543(1)
15.4 Exploring possible logistic functions
544(7)
Parameterizing logistic functions
545(1)
Measuring the quality of fit for a logistic function
546(2)
Testing different logistic functions
548(1)
Exercises
549(2)
15.5 Finding the best logistic function
551(8)
Gradient descent in three dimensions
551(1)
Using gradient descent to find the best fit
552(2)
Testing and understanding the best logistic classifier
554(1)
Exercises
555(4)
16 Training neural networks
559(36)
16.1 Classifying data with neural networks
561(1)
16.2 Classifying images of handwritten digits
562(6)
Building the 64-dimensional image vectors
563(2)
Building a random digit classifier
565(1)
Measuring performance of the digit classifier
566(1)
Exercises
567(1)
16.3 Designing a neural network
568(9)
Organizing neurons and connections
568(1)
Data flow through a neural network
569(3)
Calculating activations
572(2)
Calculating activations in matrix notation
574(2)
Exercises
576(1)
16.4 Building a neural network in Python
577(5)
Implementing an MLP class in Python
578(2)
Evaluating the MLP
580(1)
Testing the classification performance of an MLP
581(1)
Exercises
582(1)
16.5 Training a neural network using gradient descent
582(6)
Framing training as a minimization problem
582(2)
Calculating gradients with backpropagation
584(1)
Automatic training with scikit-learn
585(1)
Exercises
586(2)
16.6 Calculating gradients with backpropagation
588(7)
Finding the cost in terms of the last layer weights
589(1)
Calculating the partial derivatives for the last layer weights using the chain rule
590(1)
Exercises
591(4)
Appendix A Getting set up with Python 595(12)
Appendix B Python tips and tricks 607(28)
Appendix C Loading and rendering 3D Models with OpenGL and PyGame 635(10)
index 645
Paul Orland is CEO of Tachyus, a Silicon Valley startup building predictive analytics software to optimize energy production in the oil and gas industry. As founding CTO, he led the engineering team to productize hybrid machine learning and physics models, distributed optimization algorithms, and custom web-based data visualizations. He has a B.S. in mathematics from Yale University and a M.S. in physics from the University of Washington.