Before learning Machine Learning algorithms such as Linear Regression, Logistic Regression, KNN, Decision Trees, and Neural Networks, it is important to understand some basic Machine Learning terminology.
The following diagram shows how the major Machine Learning terms are connected.
1. Dataset #
Simple Explanation #
Example #
Suppose we have the following 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 the dataset.
2. Features #
Simple Explanation #
Example #
In our student placement dataset:
- IQ
- CGPA
- Study Hours
These are the features.
3. Target / Label #
Simple Explanation #
Example #
In the student placement example:
- IQ → Feature
- CGPA → Feature
- Study Hours → Feature
- Placement → Target / Label
Target = Output
4. Samples #
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.
5. Training Data #
Simple Explanation #
Example #
Suppose we have 1,000 samples.
- 800 samples → Training
- 200 samples → Testing
6. Testing Data #
Simple Explanation #
Dataset = 1,000 samples
Training = 800 samples
Testing = 200 samples
The model learns from the 800 training samples and is evaluated using the 200 testing samples.
Testing Data → Evaluate
7. Model #
Simple Explanation #
Example #
Suppose we want to predict house prices. The model may learn the relationship between:
- House size
- Number of rooms
- Location
- House age
and the corresponding house price.
8. Prediction #
Simple Explanation #
Example #
New student:
- IQ = 95
- CGPA = 8.0
- Study Hours = 5
The trained model processes these features.
Prediction → Placement = Yes
9. 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.
10. Hyperparameters #
Simple Explanation #
Examples #
- Learning Rate
- Number of Neighbors (K) in KNN
- Maximum Tree Depth
- Number of Trees
- Number of Epochs
- Batch Size
- Regularization Strength
Suppose we choose:
K = 5
The value 5 is a hyperparameter. The model does not learn K automatically from the training examples in standard KNN; we choose it as part of configuring the algorithm.
Suppose we choose:
Learning Rate = 0.01
The learning rate controls how large a step the optimization algorithm takes while updating model parameters.
11. Parameters vs Hyperparameters #
| Parameters | Hyperparameters |
|---|---|
| Learned from training data | Configured externally |
| Updated during training | Control how training/model behaves |
| 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.
12. Complete Example: Student Placement Prediction #
Now let’s connect all the Machine Learning terminology using one complete 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 |
13. Quick Revision for Exams #
Dataset: Collection of data.
Sample: One observation or row.
Feature: Input variable.
Target / Label: Output to predict.
Training Data: Data used for learning.
Testing Data: Data used for evaluation.
Model: Learned representation of patterns.
Prediction: Output produced by the trained model.
Parameter: Value learned from training data.
Hyperparameter: Configuration value used to control the learning process.
14. One Diagram to Remember Everything #
Conclusion #
Understanding these basic terms makes it much easier to learn Machine Learning algorithms. When you see a Machine Learning problem, first 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 learning?
- What prediction does the model produce?
Machine Learning Basic Concepts MCQ #
1. What is a dataset in Machine Learning?
A collection of data used for learning, testing, or analysis
Only the target variable
Only the model parameters
A Machine Learning algorithm
Explanation
A dataset is a collection of data containing samples or observations used for training, testing, or analyzing a Machine Learning model.
2. What are features in Machine Learning?
The final predictions produced by a model
Input variables used by the model
Only the training samples
The model's accuracy
Explanation
Features are input variables or measurable characteristics used by a Machine Learning model to make predictions.
3. What is the target variable in a Machine Learning problem?
The input data
The number of samples
The output that the model learns to predict
The learning rate
Explanation
The target is the output variable that a Machine Learning model learns to predict.
4. In a student placement dataset, IQ, CGPA, and study hours are features. What is the target if the goal is to predict placement?
IQ
CGPA
Study Hours
Placement
Explanation
Placement is the target because the model uses IQ, CGPA, and study hours to predict whether the student will be placed.
5. What is a sample in a Machine Learning dataset?
The complete dataset
One individual observation or data point
The target variable only
The trained model
Explanation
A sample is one individual observation, example, or data point in a dataset. In a table, one row generally represents one sample.
6. What is the main purpose of training data?
To evaluate the final model only
To teach the model patterns from the data
To store hyperparameters
To generate random predictions
Explanation
Training data is the portion of a dataset used to train the Machine Learning model and learn patterns or relationships.
7. What is the main purpose of testing data?
To train the model again
To change the target variable
To evaluate the trained model on unseen data
To automatically select all features
Explanation
Testing data is used to evaluate how well a trained Machine Learning model performs on previously unseen examples.
8. What is a Machine Learning model?
A collection of raw data
A learned representation of patterns or relationships in data
A dataset containing only labels
A hyperparameter
Explanation
A Machine Learning model is a learned mathematical or computational representation of patterns in training data that can be used to make predictions.
9. What is a prediction in Machine Learning?
The input feature before training
The training dataset
The output produced by a trained model for given input
The model's hyperparameter
Explanation
A prediction is the output generated by a trained Machine Learning model for a given input.
10. Which statement correctly describes a Machine Learning parameter?
It is always manually selected before training
It is a value learned by the model from training data
It is always the target variable
It is the number of samples in the dataset
Explanation
A parameter is a value learned automatically by a Machine Learning model from training data, such as weights or regression coefficients.
11. Which of the following is a hyperparameter?
A neural network weight learned during training
A regression coefficient learned from data
Learning rate
A predicted class
Explanation
Learning rate is a hyperparameter because it is configured externally and controls how the optimization algorithm updates model parameters.
12. Which statement correctly compares parameters and hyperparameters?
Both are always learned automatically from training data
Parameters are learned from data, while hyperparameters are configured externally
Parameters are inputs and hyperparameters are targets
Hyperparameters are always predictions
Explanation
Parameters are learned from training data, whereas hyperparameters are configured externally to control the learning process or model structure.
13. A dataset contains 10,000 rows. Generally, what does each row represent in a tabular Machine Learning dataset?
One sample
One algorithm
One hyperparameter
One model
Explanation
Each row generally represents one sample or observation, so a dataset with 10,000 rows generally contains 10,000 samples.
15. In the statement 'Features = Input and Target = Output', what does this relationship describe?
How input variables are used to predict the desired output
How testing data is deleted
How hyperparameters become samples
How predictions become training data automatically
Explanation
Features are the input variables supplied to the model, while the target is the output that the model learns to predict.