How Machine Learns?
Learning
A computer program/algorithm (system/model) is said to learn from experience 'E' with respect to some class of tasks 'T' and performance measure 'P' if its performance at task 'T', as measured by 'P', improves with experience 'E'.
Example
A Chess Learning Problem
Task 'T': Playing chess
Performance Measure 'P': Percentage of games won against opponents
Experience 'E': Playing practice games against itself
Componenets of Learning process?
A learning process for human beings or machines can be divided into four components:
Data Storage: Data storage is a facility for storing and retrieving large amounts of data, which is a crucial component of the learning process for both humans and machines. Computers act as unutilized data storage, forming a foundation for advanced reasoning. In humans, data is stored in the brain and retrieved by electrochemical signals. Computers use hard disk drives, random access memory, and similar devices to store data and utilize cables and other technologies to retrieve data.
Abstraction: Abstraction is the process of extracting knowledge from stored data. The creation of knowledge involves applying known models and developing new ones. The process of fitting a model to a dataset is known as training.
Generalization: Generalization is the third component of the learning process. It describes the process of converting learned knowledge about stored data into a form that can be utilized for future actions. These actions are carried out for tasks that are similar but not identical to previous ones.
Evaluation: Evaluation is the final component of the learning process. It involves providing feedback to measure the utility of the learned knowledge. This feedback is then used to improve the overall learning process.
Types of Learning
Supervised Learning
In this learning, machine learning models and algorithms are trained with a dataset that has the features and the output class variables. Usually, the dataset is divided into two parts: one for training and another for testing.

The division ratio is normally 80:20. Training our datasets will make the machine learning model intelligent and efficient, while the testing part will check the performance of the model using diabetic data.
Diabetic Data (D1)
Age | B.P. | Glucose / mg |
|---|---|---|
35 | 90/40 | 95 |

Classification
Classification is a kind of problem in ML in which an unseen data point (with features) is provided to the machine learning model, and it is the responsibility of the model to determine the appropriate class for the given unseen data.
Testing: Confusion Matrix
Predicted Positive | Predicted Negative | |
|---|---|---|
Actual Positive | True Positive (TP) | False Negative (FN) |
Actual Negative | False Positive (FP) | True Negative (TN) |

