Machine Learning Terminology and Basic Concepts #
Before learning Machine Learning algorithms such as Linear Regression, Logistic Regression, KNN, Decision Trees, and Neural Networks, it is important to understand the basic terminology used in Machine Learning.
Terms such as dataset, features, target, samples, training data, testing data, model, prediction, parameters, and hyperparameters appear in almost every Machine Learning project.
The following diagram connects the most important concepts from the dataset to the final prediction.
2. What Is a Dataset? #
Simple Explanation #
Example: Student Placement Dataset #
Suppose we have the following student data:
| IQ | CGPA | Study Hours | Placement |
|---|---|---|---|
| 90 | 8.2 | 5 | Yes |
| 75 | 6.5 | 2 | No |
| 110 | 9.1 | 6 | Yes |
The complete table is called a dataset.
3. What Are Features? #
Simple Explanation #
Example #
In the student placement dataset, the following columns are features:
- IQ
- CGPA
- Study Hours
4. What Is a Target or Label? #
Simple Explanation #
Example #
For our student placement problem:
- IQ → Feature
- CGPA → Feature
- Study Hours → Feature
- Placement → Target / Label
Target = Output
5. What Is a Sample? #
Simple Explanation #
Example #
| IQ | CGPA | Study Hours | Placement |
|---|---|---|---|
| 90 | 8.2 | 5 | Yes |
| 75 | 6.5 | 2 | No |
The first row represents one sample.
If a dataset contains 10,000 rows, it generally contains 10,000 samples.
6. What Is Training Data? #
Simple Explanation #
Example #
Suppose we have 1,000 samples:
- 800 samples → Training
- 200 samples → Testing
7. What Is Testing Data? #
Simple Explanation #
Dataset = 1,000 samples
Training = 800 samples
Testing = 200 samples
The model learns from the training samples and is evaluated using the testing samples.
Testing Data → Evaluate
8. What Is a Machine Learning Model? #
Simple Explanation #
Example #
Suppose we want to predict house prices. The model may learn relationships between:
- House size
- Number of rooms
- Location
- House age
and the corresponding house price.
9. What Is a Prediction? #
Simple Explanation #
Example: Student Placement #
- IQ = 95
- CGPA = 8.0
- Study Hours = 5
The trained model processes these features.
Prediction → Placement = Yes
10. What Are Parameters? #
Simple Explanation #
Example: Linear Regression #
Consider the equation:
y = mx + c
During training, the model learns values such as:
- m → coefficient / slope
- c → intercept
These learned values are parameters.
11. What Are Hyperparameters? #
Simple Explanation #
Common Examples #
- Learning Rate
- Number of Neighbors (K) in KNN
- Maximum Tree Depth
- Number of Trees
- Number of Epochs
- Batch Size
- Regularization Strength
Example: KNN #
Suppose we choose:
K = 5
The value 5 is a hyperparameter because we configure K as part of setting up the KNN algorithm.
Example: Gradient Descent #
Suppose we choose:
Learning Rate = 0.01
The learning rate controls the step size used when updating model parameters during optimization.
12. Parameters vs Hyperparameters #
| Parameters | Hyperparameters |
|---|---|
| Learned from training data | Configured externally |
| Updated during training | Control training/model behavior |
| Example: weights | Example: learning rate |
| Example: regression coefficients | Example: K in KNN |
| Example: neural network weights | Example: number of epochs |
Parameter → Model learns it.
Hyperparameter → We configure it.
13. Complete Example: Student Placement Prediction #
Now let’s connect all the terminology using one complete Machine Learning example.
| IQ | CGPA | Study Hours | Placement |
|---|---|---|---|
| 90 | 8.2 | 5 | Yes |
| 75 | 6.5 | 2 | No |
| 110 | 9.1 | 6 | Yes |
| 85 | 7.2 | 3 | Yes |
Identify Each Term #
| Term | In Our Example |
|---|---|
| Dataset | Complete student placement table |
| Sample | One student’s row |
| Features | IQ, CGPA, Study Hours |
| Target / Label | Placement |
| Training Data | Data used to teach the model |
| Testing Data | Unseen data used for evaluation |
| Model | Learned relationship from training data |
| Prediction | Predicted Placement |
| Parameters | Values learned during training |
| Hyperparameters | Settings used to control training/model behavior |
14. Simple Python Example #
The following example shows how some of these concepts appear in a typical Machine Learning workflow.
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
# Features
X = [
[90, 8.2, 5],
[75, 6.5, 2],
[110, 9.1, 6],
[85, 7.2, 3]
]
# Target / Label
y = ["Yes", "No", "Yes", "Yes"]
# Split the data
X_train, X_test, y_train, y_test = train_test_split(
X,
y,
test_size=0.2,
random_state=42
)
# Create model
model = LogisticRegression()
# Train model
model.fit(X_train, y_train)
# Make prediction
prediction = model.predict(X_test)
print(prediction)
X = Feature matrix
y = Target vector
X_train and y_train = Training data
X_test and y_test = Testing data
model = Machine Learning model
prediction = Model output
15. Quick Revision for Exams #
Dataset: Collection of data.
Sample: One observation or row.
Feature: Input variable.
Target / Label: Output that the model learns to predict.
Training Data: Data used for learning.
Testing Data: Data used for evaluation.
Model: Learned representation of patterns in data.
Prediction: Output produced by the trained model.
Parameter: Value learned from training data.
Hyperparameter: Configuration value used to control the learning process.
16. One Diagram to Remember Everything #
Conclusion #
Understanding Machine Learning terminology is one of the first steps toward understanding Machine Learning algorithms.
Whenever you see a Machine Learning problem, try to identify:
- What is the dataset?
- What are the features (X)?
- What is the target (y)?
- Which data is used for training?
- Which data is used for testing?
- What model is being trained?
- What parameters does it learn?
- Which hyperparameters control the model?
- What prediction does the model produce?
Machine Learning Concepts Quiz #
1. What is the first step in a typical Machine Learning workflow?
Model Deployment
Data Collection
Model Evaluation
Feature Engineering
Explanation
Data Collection is usually the first step because the model needs relevant data before preprocessing and training can begin.
2. What is the main purpose of data preprocessing?
To deploy the model
To increase the number of algorithms
To clean and prepare data for Machine Learning
To generate predictions
Explanation
Data preprocessing involves tasks such as handling missing values, removing duplicates, encoding categorical variables, and scaling features.
3. What does EDA stand for in Machine Learning?
Efficient Data Algorithm
Exploratory Data Analysis
Extended Dataset Application
Evaluation Data Architecture
Explanation
EDA stands for Exploratory Data Analysis. It is used to understand distributions, relationships, outliers, missing values, and patterns in the data.
4. What is the main purpose of feature engineering?
To delete the target variable
To create or transform useful input features
To deploy the model
To split the test data only
Explanation
Feature engineering involves creating, transforming, selecting, or combining features to provide useful information to a Machine Learning model.
5. Why is a dataset commonly divided into training and testing data?
To make the dataset smaller
To evaluate the model on unseen data
To remove all features
To avoid collecting data
Explanation
Train-test splitting allows the model to learn from the training data and then be evaluated on separate unseen testing data.
6. Which part of the dataset is primarily used to learn model parameters?
Testing set
Training set
Production set
Deployment set
Explanation
The training set is used to fit the Machine Learning model and learn its parameters.
7. What is the main purpose of model evaluation?
To collect raw data
To measure how well the trained model performs
To create features only
To install Python libraries
Explanation
Model evaluation measures how well a trained model performs using suitable metrics such as accuracy, precision, recall, F1-score, MAE, MSE, or R².
8. Which of the following is an example of a classification evaluation metric?
Mean Absolute Error
Mean Squared Error
Accuracy
Root Mean Squared Error
Explanation
Accuracy is commonly used for classification problems, while MAE, MSE, and RMSE are commonly used for regression problems.
9. What is the purpose of model deployment?
To make the trained model available for real-world use
To remove the training data
To perform EDA only
To collect duplicate records
Explanation
Model deployment makes a trained Machine Learning model available so that it can receive real-world inputs and generate predictions.
10. What is feature scaling used for?
To change the target into text
To put numerical features on comparable scales
To delete the dataset
To deploy the model
Explanation
Feature scaling transforms numerical features to comparable ranges or distributions. It is particularly important for algorithms such as KNN, SVM, and gradient-based models.
11. Which problem can occur if information from the test set is used during training?
Underflow
Data leakage
Feature naming
Model deployment
Explanation
Data leakage occurs when information that should be unavailable during training, such as information from the test set, influences model training.
12. What is the purpose of a validation set?
To provide a final unbiased test after all model decisions
To tune and compare models during development
To replace the training set completely
To collect new raw data
Explanation
A validation set is used during development to compare models, tune hyperparameters, and make modeling decisions before final evaluation on the test set.
13. What happens during model training?
The model learns patterns from training data
The model is automatically deployed
The test set is deleted
Only the dataset name is changed
Explanation
During model training, the learning algorithm uses training data to estimate or update model parameters so the model can learn relationships in the data.
14. Why is monitoring important after deploying a Machine Learning model?
Because deployed models never change
To detect performance problems and changes in real-world data
To remove all predictions
To replace preprocessing with deployment
Explanation
Post-deployment monitoring helps detect issues such as data drift, concept drift, changes in prediction quality, and system failures.