Unit-3 - Introduction To ML, Part-1
Unit-3 - Introduction To ML, Part-1
1. If there is a single input variable (x), such linear regression is called “simple linear
regression”. And if there is more than one input variable, such linear regression is called
“multiple linear regression”.
2. Cost function optimizes the regression coefficients or weights and
measures how a linear regression model is performing.
3. The cost function is used to find the accuracy of the mapping function that maps the input
variable to the output variable. This mapping function is also known as the Hypothesis
function
4. Gradient descent is a method of updating a0 and a1 to minimize the cost function (MSE).
5. In the gradient descent algorithm, the number of steps you take is the learning rate, and
this decides how fast the algorithm converges to the minima.
Advantages Disadvantages
Linear regression performs exceptionally well for The assumptions of linearity between dependent
linearly seperable data and independent variables.
Easier to implement,interpret and efficient to train. It is often quite prone to noise and overfitting
It handles overfitting pretty well using Linear regression is quite sensitive to outliers
dimensionally reduction
techniques,regualarization,and cross-validation
Logistic Regression:
The logistic function, also known as the sigmoid function, is defined as follows:
p = 1 / (1 + e^(-z))
where p is the probability of the occurrence of the event, e is the base of the natural
logarithm, and z is the linear combination of the independent variables and their coefficients.
The logistic regression model uses maximum likelihood estimation to estimate the
coefficients of the independent variables that maximize the likelihood of the observed data.
The model can be used to predict the probability of the occurrence of the event for new data.
Logistic regression has a wide range of applications, including in medical research, social
sciences, and business. It is particularly useful in cases where the dependent variable is
dichotomous, meaning that it has only two possible values.
Logistic Regression is much similar to Linear Regression except that how they are
used. Linear Regression is used for solving Regression problems, whereas Logistic
regression is used for solving the classification problems. The curve from the logistic function
indicates the likelihood of something such as whether the cells are cancerous or not, a
mouse is obese or not based on its weight, etc. Logistic regression uses the concept of
predictive modeling as regression; therefore, it is called logistic regression, but is used to
classify samples; Therefore, it falls under the classification algorithm.