...

/

Functions in Data Science

Functions in Data Science

Learn the use of functions in data science.

Functions in data science

Functions are generally not restricted to having only numbers, arrays, matrices, or tensorsGeneralisation of scalars and vectors as inputs. The same is true for a function’s outputs and parameters. However, data science focuses on functions that consist of inputs, outputs, and parameters that are numbers, arrays, matrices, or tensors only. This is because the objects of interest, including images, text, audio, videos, and so on, are all numerical featuresNumericalFeatures. Let’s look at a few examples to understand this better.

Face recognition

A face recognition system takes the image of a face as input and outputs a number describing the identity of the face in the image. In this case, the face recognition system is a function, and the face image, usually represented as a matrix, is input. The function’s output is a scalar pointing to the position of the person’s name in a list. Thus, this function maps a matrix to a number.

Speech recognition

The figure above illustrates a typical speech recognition system. The input of the system is in the form of raw audio, usually represented as an array in the system. The output depends upon the speech processing task at hand. For instance, the textual output is usually expressed as an array in speech-to-text conversion.

Object detection

In an object detection system (depicted above), the input is an image, whereas the output is an array of bounding boxes and object identities in that image. Both the image and bounding boxes can be represented as matrices.

Function approximation in data science

As described in the examples above, the output of a real-world system is an unknown function (say, ff) of its input. Our goal in data science is to estimate this function reliably. We don’t know anything about the function except for a few sample inputs and corresponding outputs called training data. Let’s also assume the type of underlying function (say, a a second degree polynomial) based ...