Before we start discussing declassification techniques, we must take a moment to answer the question,
why can't we use linear regression to do classification?
Consider this example.
I have the data set of some profile of people which include whether that's true or not, that great
card balance and their incomes corresponding to each profile.
I have the great risk profile.
That is whether they defaulted on their loan payment or not.
That is whether they repaid their loan or not.
So if they repay, the default value will be no.
If they do not, they are defaulting.
That is their default value will be, yes.
So using this data, I want to classify how risky a particular profiler's.
Now, if I transform this data so that hiders is represented by one that is wherever default values,
yes, I put one and wherever there is lowest.
I represented by minus one.
I can run a linear regression on it.
So with this coding, when I an integration aggression, it will give me some predicted continuous values
of the response variable, and I can say that.
If the predicted value of the response variable is greater than zero, then it belongs to the class
Mondelēz one, which is hiders.
And if it is less than zero, it belongs to the class Magda's minus one, which is less risk.
So this is a fairly good classifying technique, but it has several problems.
The first problem we face with this classifier, which is using linear regression, is if we have more
than two levels in the response variable.
For example, in the response variable instead of yes and no.
If I had credit risk, low, medium and high.
Such a scenario cannot be handled using this.
Classify it.
So as we discussed in dummy variable Clie creation, Lichter, we cannot simply assign zero one two
values to these three classes.
We have to cleared and minus one dummy variables.
In this case, we will have to create three minus one, that is to do me with Abels for credit risk.
Then we will have to response.
We're able to be predicted, which cannot be handled.
Therefore, if response variable has more than two levels, linear regression cannot be used.
Second problem is that the predicted value of life from this classify, it can not be considered as
the probability of Y belonging to a particular class.
Since its values ranging from minus infinity to plus infinity, as you can see by this graph, it's
a straight line.
If you extend it further, it will go up to plus infinity.
And if you extend it backwards, it can go to minus infinity.
But my probability values can only range between zero and one.
So even though it is classifying in two classes, we are not sure about how confident we can be with
deep predictive response.
The third problem we face is the impact of outlaying values.
I'm not talking about the outliers which we handle in Prepossessing.
I'm talking about genuine but large or very small values.
To fit these far away points, regression model will change this slope.
So imagine if I have another point over here.
This line will try to change its slope to accommodate this point.
And this line will move something like this.
And in this process, we will wrongly classify a lot of points.
Does a Linnean model is very sensitive to outline point.
And when outlaying points out present, it gives out wrong predictions.
In the next we do I will tell you about logistic regression.
I will show you these problems of linear regression graphically and show you how logistic regression
overcomes them.