Components of Machine Learning

Aniket Patil
5 min readFeb 21, 2020

Machine Learning is composed of some basic blocks such as:

1. Matrices

2. Vectors

3. scalar

4. Tensors

5. Probability and statistics

6. Linear algebra

7. Calculus

Matrices:

A matrix is a representation of a set of numbers (or objects) arranged in rows

and columns. Matrices simplify larger amount of data or relationship in terms of representation.

The above matrices in image 1 and 2 are 3x3 (3 rows x 3 columns) and 2x3 (2 by 3, i.e. 2 rows and 3 columns)

That means, we can solve complex problems easily with the help of matrices.

We can perform addition, subtraction, multiplication, transpose and various such operations on matrices.

Vectors:

A vector is an ordered set of N elements, also called n-dimensional vector. Vector is an array of numbers. It can be represented as a matrix with just a single column. Multidimensional space can be represented through a vector which can be a matrix with just one column.

Scalar:

Scalar is a single number.

A scalar quantity is a one dimensional measurement of a quantity, like temperature, or mass. A vector has more than one number associated with it. A simple example is velocity. It has a magnitude, called speed, as well as a direction, like North or Southwest or 10 degrees west of North. You can have more that two numbers associated with a vector.

Tensors:

Tensors are a generalization of vectors in higher dimensions. A tensor of two dimensions is a matrix. Tensors with higher dimensions are represented by multidimensional.

Tensors used in machine learning are synonymous with multidimensional arrays in programming

Scalar, Vector, Matrix and Tensor comparison:

Probability and Statistics:

Probability indicates how likely a specific outcome is, of an observation or a measurement.

A number of things in this world appear to be random or unpredictable, e.g. tossing a coin. Many other phenomena in real world have an element of randomness (also known as stochastic phenomena) such as stock market index value, temperature at a given time, the number of people in a city at any time, etc.

For example, if you pick a card at random from a pack of cards containing 52 cards, Find the probability of drawing a king of heart.

There are 4 kings in a pack of cards (total 52 cards)

King of heart is 1, so probability is 1/52

Other example can be picking a random color ball from some amount of multi colored (single color per ball e.g. Red, green, blue) balls. Since such outcomes are all mutually exclusive, and since one of them will certainly occur, the sum of their probabilities is 1.

There is another concept known as probability distribution. The probability distribution shows the probability values for each of the possible outcomes. However, in real world probability distribution can be represented through mean , variance , mode etc. these are statistical terms .

Eg. Mean height of students in a particular school etc.

Now there is another concept known as discrete and continuous.

When the numeric values are continuous, you will only consider the probability for a range of values rather than a specific value.

probability density function (pdf) is the probability distribution for continuous variables. The pdf is defined in such a way that the probability over the whole range of values for the random variable is 1.

Normal distribution is an example of such probability distribution function.

Sampling distribution:

Sometimes we need a sampling distribution. E.g. opinion poles . Out of total population , we are able to get samples. So, we ask certain number of people about their opinion about candidates of political party. But asking every person is not possible. So, we make approximations from the samples.

Linear algebra:

Usually, we can represent any two-dimensional relationship through a graph.

Even a three-dimensional relationship can be mentally visualized and can also be represented on a graph. However, it is quite difficult to visualize a multidimensional relationship. We can demonstrate multidimensional relationships through numbers with that many dimensional vectors.

Calculus:

Differential calculus allows us to determine rate of change of a function at any

point, with respect to one of the input variables. This translates to the slope of a curve (i.e., function drawn as curve) at any given point for the curve.

If we know values of x in function f(x) we can calculate it, otherwise we make approximations, which is called function approximation.

We are now, well equipped with the basics of machine learning, in next part we will study various types of machine learning.

--

--

Aniket Patil

Product Management | Project Management | Data Science | ML | Renewable Energy | Wind | Solar | AMPS -> Asset performance management system