Machine Learning
What is Machine Learning
Arthur Samuel
- the field of study that gives computers the ability to learn without being explicitly programmed.
Tom Mitchell
- A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.
- Example: playing checkers.
E = the experience of playing many games of checkers
T = the task of playing checkers.
P = the probability that the program will win the next game.
In general, any machine learning problem can be assigned to one of two broad classifications:
Supervised learning and Unsupervised learning.Supervised Learning
Supervised Learning
- In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.
- Category
- Classification
- In a classification problem, we are instead trying to predict results in a discrete output. In other words, we are trying to map input variables into discrete categories.
- Regression
- Classification
- Gradient Descent For Linear Regression
Math Formula
-
- Multiple Features
- Defination
- Linear regression with multiple variables is also known as “multivariate linear regression”.
Math Formula
-- Feature Scaling
- How
- We can speed up gradient descent by having each of our input values in roughly the same range.
- Why
- This is because θ will descend quickly on small ranges and slowly on large ranges, and so will oscillate inefficiently down to the optimum when the variables are very uneven.
- Si is the range of Xi
- How
- Learning Rate
- To summarize:
If α is too small: slow convergence.
If α is too large ,may not decrease on every iteration and thus may not converge - Tips
- No matter how small the α is , it will reach reach minimum in the end。
- To summarize:
- Features and Polynomial Regression
- Defination
- Defination
- We don’t need to get the number result of each result , What we should do is just to try to get the bool of whether it in this category or not , or where does it belong to?
- How
- To attempt classification, one method is to use linear regression and map all predictions greater than 0.5 as a 1 and all less than 0.5 as a 0. However, this method doesn’t work well because classification is not actually a linear function.
- Hypothesis Representation
- Decision Boundary
- Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don’t necessarily know the effect of the variables.
Model
x ——- input
y ——- output
h ——- hypothesis functionCost Function
Defination
- We can measure the accuracy of our hypothesis function by using a cost function.
Form
Squared error function
- Tips
- We use 1/2m is simplify our compute level
- Result
- The method to estimate the parameters in the hypothesis function.
How
- We should try to get the minimum θ so we should change it along with the function changing, all the θ must change at once
- Tips
- A algorithm to try to consult out the derivative of the J(x) = 0 and use it as the θ
Math Furmula
Difference