Week-14 Lecture 28
Week-14 Lecture 28
Week-14 Lecture-28
Agenda 2
❑ Concept of Learning
❑ Regression
► Polynomial Regression.
❑ Classification
► Logistic Regression.
► k-nearest neighbors.
Learning
4
Concept of Learning
► Self learning: Ability to recognize patterns, learn from data, and become more intelligent
over time (can be AI or programmatically based).
► Machine learning: It is an application of artificial intelligence (AI) that provides
systems the ability to automatically learn and improve from experience without being
explicitly programmed. Machine learning focuses on the development of computer
programs that can access data and use it to learn for themselves.
Regression
6
Recap: Linear Regression
�
�
�� Constant Coefficient
Dependent
Variable
�
Independent Variable
�
��
7
Example: Linear Regression
Salary Data
Example: Linear Regression (Ordinary Least 8
Squares)
9
Multiple features (variables)
2104 460
1416 232
1534 315
852 178
… …
10
Multiple features (variables)
2104 5 1 45 460
1416 3 2 40 232
1534 3 2 30 315
852 2 1 36 178
… … … … …
11
Multiple features (variables)
2104 5 1 45 460
1416 3 2 40 232
1534 3 2 30 315
852 2 1 36 178
… … … … …
Notation:
= number of features
= input (features) of training example.
= value of feature in training example.
12
Hypothesis:
Previously:
(No More)
Now:
13
Price
(y)
Size
(x)
16
Other Type of Regression
Importing Libraries
Data Import
❑ Single predictor
❑ Multiple predictor
Hasan, M.J.; Kim, J.-M. Fault Detection of a Spherical Tank Using a Genetic Algorithm-Based Hybrid Feature Pool and k-Nearest Neighbor Algorithm. Energies 2019, 12, 991.
Tree Based
Methods 28
► SuperDataScience