Search code examples
machine-learninglinear-regressionlogistic-regression

supervised learning,unsupervised learning ,regression


I know that:

  1. unsupervised learning is that of trying to find hidden structure in unlabeled data,otherwise ,we call it supervised learning.
  2. regression is also a type of classification ,except that its output is infinite number of numeric numbers.
  3. I also know that classification is a type of supervised learning.

But what make me confused is:

  1. linear regression(line fitting) is a type of regression? if so , why its data is unlabeled?For example, its sample data is just a quantity of coordinates like (1,2),(2,3),(1,4)?
  2. logistic regression(classification) is a type of regression ?if so ,why its output is just norminal(value,true of false ,0 or 1)?

Anyone can help me figure out this?


Solution

  • 1) Linear Regression is Supervised because the data you have include both the input and the output (so to say). So, for instance, if you have a dataset for, say, car sales at a dealership. You have, for each car, the make, model, price, color, discount etc. but you also have the number of sales for each car. If this task was unsupervised, you would have a dataset that included, maybe, just the make, model, price, color etc. (not the actual number of sales) and the best you could do is cluster the data. The example isn't perfect but aims to get across the big picture. A good question to ask yourself when deciding whether a method is supervised or not is to ask "Do I have a way of adjudging the quality of an input?". If you have Linear Regression data, you most certainly can. You just evaluate the value of the function (in this case, the line) for the input data to estimate the output. Not so in the other case.

    2) Logistic Regression isn't actually a regression. The name is misleading and does indeed lead to much confusion. It is usually only used for binary prediction which makes it perfect for classification tasks but nothing else.