# Supervised Learning or Unsupervised Learning?
Notes of the course Machine Learning by Andrew Ng.
Supervised Learning Algorithm
example of supervised learning(1)
a data of house prices, horizontal axis is the square of the house and the vertical axis is the price
of the house.
Given that your friend has a house of a certain square. and you need to know how much they can get from selling the house
- we put a straight line to fit the data.
- we can use different types of functions to fit the data.
we gave the algorithm a dataset in which contains a certain quantities of "right answers", and we use the algorithm to produce more ''correct answers" like the offered dataset. In this case, we provide the algorithm with the actual price of a house, and we need to know how much the other houses are.
Above are also called regression problem.
we regard it as a continuous value number, and regression problems are working to predict continuous values attribute.
another example:
given the size of the breast tumor, we use the algorithm to predict whether the tumor is benign or malignant.
- at first, we draw a number axis and use different symbols to represent the status of the breast tumor, malignant or benign,
- given the size of the tumor, try to predict the probability of benign tumor.
the output of it is discrete, representing different types of circumstances.
- in 1&2 ,we just use one feature to predict the probability of benign tumor.
- we apply a new feature> age and we draw a two-dimensional graph.
- the learning algorithm try to draw a line and try to distinct two areas.
- we introduce other features, like clump thickness, uniformity of cell size, or uniformity of cell shape to our algorithm.
but in real use, you may use infinite number of features/ attributes.
Support Vector Machine-- allow the computer to deal with infinite number of features without running out of memory.
Recapitulation:
in the case of supervised learning, we are given the right answers and we would like to predict more right answers like given ones.
Regression Problems: continuous valued output
classification Problem: discrete valued output.
Unsupervised Learning Algorithm
2021年9月30日
20:53
Every data given has the same label or there are no label, unlike supervised learning, there are two outputs: "benign or malignant", or we are not told what to do about it in advance.
The unsupervised can break the data into two clusters, hence, we call it clustering algorithm.
e.g. there are thousands of pieces of news about one event in the world. The news should be grouped so that when you search a word "BPOil Spill" , there are so many results available.
what news app do is automatically search each news report and cluster them into groups.
KeyPoint:
we do not know how many types or groups of outcome there will be when we put the data into the algorithm.
Apply this tech to: Social Network analysis; Market segmentation; Astronomical data analysis
The other type besides clustering problem is Cocktail party problem.
In the Cocktail party, there are so many voices in the party so we can't make them out clearly. Our task is to extract each sound from the combination. We recognize it as sound that came from different sources.
Namely we can call it a Sound Separating Problem.
We use a tool Matlab or Octave to learn Machine Learning.(prototype them) before we use Python Java for grand scale applications.
we use Octave to operate on the algorithm, and introduce it to python, that will save a lot of time of learning.