Linear Regression With One Variable: getting started

Housing Prices:

We are given the Size of houses in some area and their prices. We have to predict the prices given the size of a house in that area.

Is it supervised learning? Yes, we are given the data with true predictions, it is a supervised learning problem.

Are the predictions Real-Valued or Discrete? This requires some discussion.

Regression and classification Supervised learning:

The output in Supervised Learning can be either continuous or discrete. Continuous output means, that the output can be anything in a range.

What is the temperature going to be tomorrow? The output will be continuous, and not discrete, it can be anything, any practically possible real number.

Will it be cold or hot tomorrow? The output will be either 1 for cold or 0 for hot, the output is discrete, it can not be 0.5 or anything in between.

The problems of the first type, those which have continuous output, are called the regression problems, and the latter ones are called as the classification problem.

Image result for regression vs classification


Coming back:

Is housing prices prediction a regression or classification problem? A regression, the output is continuous it can be anything between a few thousand dollars to millions.

The training set of housing prices:


All data for the Machine Learning posts can be found here: https://github.com/geekRishabhjain/MLDataFolder

Understanding the data:
The first column contains, Size in feet squared, the second column contains the prices.
Generally, used notations are:
m: used to signify the number of training examples. Thus the number of rows in the data will be denoted by m.
X: denotes the input variables, or the features, here the Size is denoted by X.
y: denotes the output variables, or the target variable, here the prices denote the y.

(X(1), y(1)): denotes the first training example, so on and so forth up to m.

The data for Linear Regression with one variable is in the ex1data1.txt file in the folder given in the above link.

No comments:

Post a Comment

Installing albert on ubuntu 19.04

Installing Albert on Ubuntu 19.04... Albert is not still released for ubuntu 19.04. But still, you can install it using the following ...