AI Model Training Process
In this lesson, let's summarize how an AI model learns from data, makes predictions, and evaluates performance based on what we've learned so far.
1. Training​
During the training stage, the model identifies patterns from given data, adjusts weights and biases, and aims to find optimal values.
The training process proceeds as follows:
-
Data Input : Provide input data to the model.
-
Loss Calculation : Measure the discrepancy between the model's predictions and the actual values.
-
Weight Adjustment : Adjust weights and biases to reduce loss using optimization algorithms like gradient descent.
-
Iterative Learning : Repeat the above steps so that the model can make increasingly accurate predictions.
Once the model has learned the data patterns, a machine learning model can perform predictions on new data.
2. Prediction​
A trained model receives new data and performs predictions.
-
New Data Input : Input data that has not been seen by the model into the machine learning model.
-
Result Output : Generate predictions based on the patterns learned by the model.
For example, if you input a new handwritten digit image into a machine learning model trained on handwriting, the model predicts which number between 0 and 9 it represents.
3. Evaluation​
This stage involves measuring how well the model performs predictions.
The evaluation process proceeds as follows:
-
Using Test Data : Measure performance using data not seen during training.
-
Accuracy Calculation : Compare predictions with actual values to assess accuracy.
-
Model Improvement : If performance is unsatisfactory, revise the data or training process and retrain the model.
AI model training doesn't end after one cycle.
If evaluation results are unsatisfactory, you need to alter the data or modify the model structure and retrain it.
Through these iterative processes, the machine learning model becomes increasingly accurate.
Typically, in machine learning, a large dataset is divided into Training
, Validation
, and Test
sets.
The training dataset constitutes 70-80%
of the total data and is used for training the model.
The validation dataset, making up 10-15%
, is used to tune the model's performance.
The test dataset, remaining at 10-15%
, is used to perform the final evaluation of the model's performance.
In the next lesson, we will delve deeper into the composition and characteristics of training data.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.