O'Reilly logo

Machine Learning with Spark - Second Edition by Nick Pentreath, Manpreet Singh Ghotra, Rajdeep Dua

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Function types

Procedures versus Functions:

A procedure is a description of a computation that, given an input, produces an output.

Functions or computational problems don't indicate how to compute the output from the given input.

Many methods might exist for the same specification.

A computational problem may allow several possible outputs for each input.

We will write procedures in Breeze; often, these are called functions, but we will reserve that term for the mathematical objects.

  • One to One function:

f : D -> F is one-to-one if f (x) = f (y) implies x = y; that is, both x and y are in D.

  • Onto function:

F: D -> F is onto if for every z element of F, there exists an element a in D such that f (a) = z.

A function is invertible if it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required