Machine learning algorithms:
- Supervised learning
- Unsupervised learning
- others:
- Reinforcement learning
- Recommender systems
Practical advice for applying learning algorithms
Supervised learning is the machine learning task of inferring a function from labeled training data. The training data consist of a set of training examples.
supervised learning give the “right answer” for each example in the data.
- Regression Problem: predict real-valued output(continuous-value)
- Classification Problem: discrete-valued output
Notation:
- m = Number of training examles
- x’s = “input” variable / features
- y’s = “output” variable /”target” variable
- (x, y) – one training example
- (x^i, y^i) – i^th training example
With the training set and learning algorithm, we get hypothesis, which we use to make predictions, is this linear function.
Hypothesis: hθ(x) = θ0 + θ1x
minimize θ0, θ1, J(θ0, θ1) is cost function(squared error function).
Want
Gradient descent to minimize some arbitrary function J.
Outline
- Start with some θ0,θ1
- Keep changing θ0,θ1 to reduce J(θ0,θ1) until we hopefully end up at a minimum
Gradient descent algorithm(梯度下降)
Here α is learning rate,it controls how big a step we take when updating parameter theta J. is the derivative(导数) term.
We must update θ0 and θ1 simultaneously.
Correct: Simultaneously update
!Incorrect
Gradient descent alogirthm
repeat until convergence {
}
Unsupervised learning refers to the problem of trying to find hidden structure in unlabeled data.