This document has very important concepts that explain the base of what components there are in Deep Learning. First, deep learning has its base in neural networks. An artificial neural network is a computer model whose goal is a computer resolver process without having an algorithm description or algorithm programming.

For that, we explain with a basic example; calculate price real estate. First, the model has historical data, in this case about size real estate “inputs” and its price “output” the following figure we can watch the basic mathematical model.

Where f(x) is a network, an algorithm essential is a linear regression.

More features are very important for calculating price in real life, for example, rooms number, location, real estate stratum, and places near. More features are very important for calculating price in real life, for example, rooms number, location, real estate stratum and places near. This feature can have relations but this depends on human analysis and avery F(x) might be linear regression.

Where

The goal is to find the values of W, which can with historical values and generate the formula of the line for every F(x). So in a Network neural artificial with one layer, we can see a relation with all features.

If we expand the functions and they are expressed as a matrix, we have the following:

We will have a formula very large with multiple W constants, and it needs that we found values for every constant, also we have a number of input “m,” and by every input, there are “n” number features “size, location etc.”, now our W constants must satisfy all functions for generating all answer. Matrix of equations, There are many methods to find solutions in linear algebra; reduction, equalization, substitution, Gauss, Cramer etc., but that matrix’s coefficient might be undefined because a matrix is not linear.

Then, linear regression is not a good idea, so we can’t think of exact values. But we can find more probable information about its input, and we can use logistic regression. For example, we can find out if the house is expensive or cheap.

Logistic regression (Wikipedia)

“In statistics, the **logistic model** (or **logit model**) is used to model the probability of a certain class or event existing such as pass/fail, win/lose, alive/dead or healthy/sick. This can be extended to model several classes of events, such as determining whether an image contains a cat, dog, lion, etc. Each object is detected in the image would be assigned a probability between 0 and 1, with a sum of one.

Logistic regression is a statistical model that, in its basic form, uses a logistic function to model a binary dependent variable, although many more complex extensions exist. In regression analysis, **logistic regression**[1] (or **logit regression**) is estimating the parameters of a logistic model (a form of binary regression).

The first thing we do is tag the data, for example, we want to find a model that helps determine whether the patient’s state with sleep apnea is **dangerous** or not concerning systolic pressure.

These are some data:

Second, we compute the linear regression but systolic pressure = 170:

Logit(P(**dangerous**)) = W0 + W1*systolic pressure = -6.16228 + 0.004681*170=0.8576

Logit(0.8576) = 1 / ( 1 + exp^(0.8576)) = 0.7021 ⇒ 70.21%

This is the case with a single variable, but if we have more input variables, then the function can look like this:

Logit(Z) = b + W1*X1 + W2*X2 …. Wm*Xn;

Express as matrix:

Yhat = Logit(Wtraspuesta * X + B)

With multiple inputs:

Yhat(i) = Logit(Wtraspuesta * X(i) + B)

When implementing a logistic regression, the job is to find the parameters W and B so that “Yhat” becomes a good estimate of the probability that Y is equal to 1.

When we work with few characteristics of the input of X, it is easy to calculate them but when these parameters start to grow, they are increasingly difficult to calculate without a computer.

We already know some basic concepts of Deep Learning, we also already know that everything is based on Neural Networks and we saw linear regression as a basic linear model. Still, it does not satisfy many conditions that are sought in Deep Learning. These are solved with logistic regression to find the parameters W and B to find the probability Yhat as an output estimate. So with all of the above, we propose the basic formulas of a model for a neural network. Now we have to find a solution for the variables W and B with the historical data to satisfy the equations. For this, we will see in the next blog post, and we will see the loss function, cost function, descent gradient, computational derivative, and the implementation of a python language.