NEW
Font size
WorksheetsAIFB Midterm Oct 2025 — Variant A (Grade 13)
Total questions: 65
Worksheet time: 33mins
2.50 p. | single choice. Which of the following best describes what happens during the training phase of a supervised learning model?
The model finds output data when input data and model parameters are given to make predictions.
The model finds model parameters when input and output data are provided in the dataset.
The model randomly assigns weights to features and evaluates their performance on new data.
The model creates new input features from existing data without using output labels.
The model splits the available data into training, validation, and test sets for evaluation.
2.50 p. | single choice. What is the primary difference between regression and classification tasks in supervised learning?
Regression uses categorical data while classification uses numerical data as input features.
Regression predicts infinite ordered values while classification predicts a small number of possible outputs.
Regression requires more training data while classification works with smaller datasets efficiently.
Regression models are always more accurate while classification models are faster to train.
Regression uses gradient descent while classification uses different optimization algorithms exclusively.
2.50 p. | single choice. In the context of data splitting, what is the primary purpose of the test set?
The test set is used to train the model and find optimal model parameters.
The test set is used to validate model performance during the training process iteratively.
The test set is used to test the model after completing training for final evaluation.
The test set is used to perform feature engineering and data preprocessing transformations.
The test set is used to select which features should be included in the model.
2.50 p. | single choice. What is the purpose of the validation set in the machine learning pipeline?
The validation set is used to train the model and optimize its parameters.
The validation set is used to evaluate model performance during training and tune hyperparameters.
The validation set is used to make final predictions on completely new data.
The validation set is used to collect additional data for the training process.
The validation set is used to replace the test set when data is limited.
2.50 p. | single choice. In logistic regression, what transformation is applied to the output of linear regression to produce predictions?
The exponential function is applied to convert linear outputs into probability estimates.
The sigmoid function is applied to convert linear outputs into probability estimates.
The softmax function is applied to convert linear outputs into probability estimates.
The tangent hyperbolic function is applied to convert linear outputs into probability estimates.
The rectified linear unit function is applied to convert linear outputs into probability estimates.
2.50 p. | single choice. What is the key difference between label encoding and one-hot encoding for categorical variables?
Label encoding assigns integers to categories while one-hot encoding creates binary columns for each category.
Label encoding creates binary columns while one-hot encoding assigns continuous numerical values.
Label encoding is used for numerical data while one-hot encoding is used for text data exclusively.
Label encoding works only for ordinal data while one-hot encoding works only for binary data.
Label encoding requires more memory while one-hot encoding is always more computationally efficient.
2.50 p. | single choice. What is the primary purpose of regularization techniques like L1 and L2 in machine learning models?
Regularization increases model complexity to capture more intricate patterns in training data effectively.
Regularization prevents overfitting by adding penalties that discourage excessively large weight values.
Regularization speeds up the training process by reducing the number of features automatically.
Regularization improves accuracy by increasing the learning rate during gradient descent optimization.
Regularization eliminates the need for validation sets by preventing all types of errors.
2.50 p. | single choice. Which evaluation metric is most appropriate for assessing model performance on highly imbalanced classification datasets?
Accuracy is most appropriate because it considers all predictions equally regardless of class distribution.
Mean squared error is most appropriate because it penalizes large errors more heavily than small ones.
F1 score is most appropriate because it balances precision and recall for imbalanced classes.
Root mean squared error is most appropriate because it measures prediction error in original units.
Mean absolute error is most appropriate because it treats all classes with equal importance.
2.50 p. | single choice. Why is feature scaling (normalization or standardization) important for machine learning algorithms?
Feature scaling increases the number of features available for the model to learn from.
Feature scaling ensures features are on a common scale without distorting value ranges or losing information.
Feature scaling automatically removes outliers and missing values from the dataset.
Feature scaling converts categorical variables into numerical representations effectively.
Feature scaling guarantees that the model will achieve perfect accuracy on test data.
2.50 p. | single choice. What does precision measure in a classification model's performance evaluation?
Precision measures the ratio of correct predictions to all actual positive class instances.
Precision measures the ratio of correct positive predictions to all positive class predictions made.
Precision measures the ratio of all correct predictions to the total number of predictions.
Precision measures the ratio of false positives to all negative class instances predicted.
(2.50 p.) | single choice — What is the key difference between MinMax normalization and z-score standardization?
MinMax scales features to a range between 0 and 1 while z-score transforms data to have mean 0 and standard deviation 1.
MinMax uses mean and variance while z-score uses minimum and maximum values for transformation.
MinMax is used for classification while z-score is used exclusively for regression tasks.
MinMax removes outliers automatically while z-score preserves all data points without changes.
MinMax works only with categorical data while z-score works only with numerical data.
(2.50 p.) | single choice — What does recall measure in the evaluation of a classification model?
Recall measures the ratio of correct predictions to all predictions made by the model.
Recall measures the ratio of correct positive predictions to all actual positive class instances.
Recall measures the ratio of false positives to all positive predictions made by the model.
Recall measures the ratio of true negatives to all actual negative class instances overall.
Recall measures the ratio of correct predictions to the number of features used in training.
(2.50 p.) | single choice — Why should one-hot encoding be used for nominal categorical variables rather than label encoding?
One-hot encoding is faster to compute and requires less memory than label encoding methods.
One-hot encoding avoids imposing artificial ordering relationships between unordered categories unlike label encoding.
One-hot encoding automatically normalizes the data while label encoding does not perform normalization.
One-hot encoding reduces the dimensionality of the dataset while label encoding increases dimensions.
One-hot encoding works only with binary classification while label encoding works with multi-class problems.
(2.50 p.) | single choice — What is the fundamental reason why logistic regression uses the sigmoid function rather than outputting linear regression values directly?
The sigmoid function increases computational efficiency by simplifying gradient calculations during optimization procedures.
The sigmoid function transforms unbounded linear outputs into probability values bounded between 0 and 1.
The sigmoid function automatically performs feature selection by zeroing out less important features.
The sigmoid function reduces overfitting by adding implicit regularization to the model architecture.
The sigmoid function allows the model to handle multi-class classification problems more effectively.
(2.50 p.) | single choice — Given three house price predictions with the following values: Predicted = 350,000 , Actual = 400,000 ; Predicted = 450,000 , Actual = 420,000 ; Predicted = 500,000 , Actual = 480,000 . What is the Mean Absolute Error (MAE)?
The Mean Absolute Error is 30,000 for these three predictions.
The Mean Absolute Error is 33,333 for these three predictions.
The Mean Absolute Error is 35,590 for these three predictions.
The Mean Absolute Error is 40,000 for these three predictions.
The Mean Absolute Error is 50,000 for these three predictions.
(2.50 p.) | single choice — A binary classification model makes predictions on 100 samples with the following results: 40 True Positives, 10 False Positives, 45 True Negatives, and 5 False Negatives. What is the accuracy of this model?
The accuracy is 75% for this binary classification model overall.
The accuracy is 80% for this binary classification model overall.
The accuracy is 85% for this binary classification model overall.
The accuracy is 89% for this binary classification model overall.
The accuracy is 90% for this binary classification model overall.
(2.50 p.) | single choice — Given the following actual and predicted values: (Actual= 10 , Predicted= 12 ), (Actual= 15 , Predicted= 13 ), (Actual= 20 , Predicted= 23 ). Calculate the Mean Squared Error (MSE).
The Mean Squared Error is 4.00 for these three predictions.
The Mean Squared Error is 4.33 for these three predictions.
The Mean Squared Error is 5.00 for these three predictions.
The Mean Squared Error is 6.00 for these three predictions.
The Mean Squared Error is 7.33 for these three predictions.
(2.50 p.) | single choice — A dataset is normalized using MinMax scaling where the original values are: 10 , 20 , 30 , 40 , 50 . After normalization, what will be the scaled value of 35 ?
The normalized value of 35 is 0.50 after MinMax scaling.
The normalized value of 35 is 0.55 after MinMax scaling.
The normalized value of 35 is 0.60 after MinMax scaling.
The normalized value of 35 is 0.625 after MinMax scaling.
The normalized value of 35 is 0.70 after MinMax scaling.
(2.50 p.) | single choice — A dataset is normalized using MinMax scaling where the original values are: 10 , 20 , 30 , 40 , 50 . After normalization, what will be the scaled value of 35 ?
The normalized value of 35 is 0.50 after MinMax scaling.
The normalized value of 35 is 0.55 after MinMax scaling.
The normalized value of 35 is 0.60 after MinMax scaling.
The normalized value of 35 is 0.625 after MinMax scaling.
The normalized value of 35 is 0.70 after MinMax scaling.
(2.50 p.) | single choice — A classification model achieves 99.5% training accuracy, 85% validation accuracy, and 84% test accuracy. What is the BEST first step to try to further improve the model performance?
Increase the model complexity by adding more layers or parameters to capture patterns better.
Collect more training data and train more to improve performance further.
Apply regularization techniques like L1, L2 penalties to reduce overfitting significantly.
Remove features from the model to simplify it and improve validation accuracy dramatically.
Change the learning rate to a higher value to speed up convergence to optimal solution.
(2.50 p.) | single choice — A classification model achieves 99.5% training accuracy, 85% validation accuracy, and 84% test accuracy. What is the BEST first step to try to further improve the model performance?
Increase the model complexity by adding more layers or parameters to capture patterns better.
Collect more training data and train more to improve performance further.
Apply regularization techniques like L1, L2 penalties to reduce overfitting significantly.
Remove features from the model to simplify it and improve validation accuracy dramatically.
Change the learning rate to a higher value to speed up convergence to optimal solution.
(2.50 p.) | single choice — Model Alpha: train accuracy= 0.94 , train loss= 0.12 , val accuracy= 0.93 , val loss= 0.13 , test accuracy= 0.92 . Model Beta: train accuracy= 0.88 , train loss= 0.22 , val accuracy= 0.87 , val loss= 0.23 , test accuracy= 0.86 . What is the best interpretation?
Model Alpha is overfitting because it has higher accuracies across all datasets than Model Beta
Model Beta is underfitting and needs increased complexity to match Model Alpha's performance levels.
Model Alpha shows good generalization with consistent performance across train, validation, and test sets.
Model Beta should be selected because lower accuracy indicates more conservative and reliable predictions.
Both models are overfitting because validation accuracy is lower than training accuracy in both cases.
Two models for credit risk: Model 1 has train F1=0.92, val F1=0.68, test F1=0.66; Model 2 has train F1=0.78, val F1=0.76, test F1=0.75. Considering both performance and generalization, which is preferable?
Model 1 is preferable because higher training F1 score indicates superior pattern learning capability.
Model 2 is preferable because it shows better generalization with higher validation F1 scores.
Model 1 is preferable because the absolute value of test F1 determines model quality.
Model 2 is preferable because lower training F1 means less risk of regulatory issues.
Both models are equally good because they both show decreasing F1 from train to test.
Model G: train accuracy=0.75, val accuracy=0.74, test accuracy=0.73; Model H: train accuracy=0.82, val accuracy=0.81, test accuracy=0.80. Both show consistent generalization. Which should you choose?
Model G because lower accuracy indicates less overfitting and better long-term stability.
Model H because it achieves higher absolute performance while maintaining good generalization across datasets.
Model G because the gap between train and test is smaller in absolute terms.
Model H because higher training accuracy always translates to better production performance.
Neither model should be chosen because both show decreasing accuracy from train to test.
For imbalanced fraud detection (1% fraud rate), Model J achieves train accuracy=0.99, val accuracy=0.99, test accuracy=0.99, but val recall=0.15, test recall=0.12. What is the problem?
The model is overfitting because training accuracy is too high compared to industry standards.
The model is likely predicting mostly the negative class, achieving high accuracy but missing most frauds.
The model is performing excellently because accuracy is consistent across all three datasets.
The model needs more regularization because recall is too low compared to accuracy.
The model is underfitting because it cannot achieve higher recall on the training set.
Comparing two models on validation set: Model K has accuracy=0.88, recall=0.92, precision=0.72; Model L has accuracy=0.86, recall=0.78, precision=0.88. For a medical diagnosis where missing positive cases is critical, which is better?
Model K is better because higher recall means fewer false negatives and fewer missed diagnoses.
Model L is better because higher precision means more reliable positive predictions overall.
Model K is better because it has higher accuracy indicating overall superior performance.
Model L is better because balanced metrics are more important than any single metric.
Neither model is acceptable because recall below 0.95 is unacceptable for medical applications.
In a fraud detection system processing millions of transactions daily, two models are being evaluated. Model A: precision=0.45, recall=0.92, F1=0.60; Model B: precision=0.82, recall=0.58, F1=0.68. The cost of investigating a false positive is 50,whiletheaveragelossfromamissedfraud(falsenegative)is 2,500. Which model should be selected and why?
Model B should be selected because higher F1 score always indicates superior overall performance for deployment.
Model A should be selected because high recall minimizes costly false negatives despite lower precision.
Model B should be selected because higher precision reduces investigation costs more than recall benefits.
Model A should be selected because lower precision is acceptable when accuracy is the primary concern.
Model B should be selected because the precision-recall balance indicated by F1 outweighs cost considerations.
In a portfolio credit risk model, you observe that for high-risk borrowers (5% of portfolio), the model achieves recall=0.55 and precision=0.28. For medium-risk borrowers (25% of portfolio), recall=0.78 and precision=0.65. For low-risk borrowers (70% of portfolio), recall=0.95 and precision=0.92. What is the most significant concern for risk management?
The model performs poorly on the high-risk segment with low recall missing 45% of actual high-risk borrowers.
The model's precision for high-risk borrowers is too low resulting in excessive false positive classifications.
The model is biased toward the majority class and needs rebalancing techniques applied.
The model's overall weighted accuracy will be poor due to performance on the high-risk segment.
The model shows acceptable performance because low-risk borrowers have excellent recall and precision metrics.
A trading algorithm classifier predicts buy/sell signals where "buy" is the positive class. Historical data shows 8% of signals should be "buy". After deployment, you observe: actual buys that were predicted=750, actual buys that were missed=250, false buy signals=3,000, correct sell signals=16,000. Calculate precision and determine if precision below 0.25 is acceptable given that false buy signals cost 100eachintransactioncostswhilemissingtruebuysignalscosts 500 in opportunity loss.
Precision is 0.20 which is unacceptable because false buy signals generate $300,000 in unnecessary costs.
Precision is 0.25 which is borderline but recall of 0.75 means $125,000 in opportunity losses.
Precision is 0.20 and recall is 0.75 but the $125,000 opportunity loss exceeds the $300,000 transaction cost.
Precision is 0.20 and recall is 0.75 meaning opportunity loss of $125,000 is less than $300,000 transaction cost justifying rejection.
Precision is 0.80 indicating excellent performance and the model should continue operating as configured.
An insurance claim fraud model shows different performance across claim amounts. For claims under 5,000(85 5,000 (15% of claims, 12% fraud rate): recall=0.45, precision=0.62. If average fraud amount is 3,500forsmallclaimsand 18,000 for large claims, what is the primary business risk?
Low precision on small claims generates excessive investigation costs outweighing the fraud prevention benefits significantly.
Low recall on large claims means missing 55% of high-value frauds resulting in substantial financial losses.
The model should be rejected because overall weighted precision is below acceptable thresholds for deployment.
High recall on small claims is problematic because it flags too many legitimate low-value claims.
single choice (2 p.) What does fine-tuning a pre-trained language model involve?
Training a model from scratch for better performance
Combining embeddings from multiple models
Adjusting model weights on a specific task or dataset
Using unsupervised data for supervised tasks
Creating clusters for labeled datasets
single choice (2 p.) What is the primary role of prompt engineering?
Designing effective input queries to guide outputs
Improving tokenization processes
Optimizing hyperparameters in generative models
Training the model with additional datasets
Fine-tuning pre-trained models for specific tasks
single choice (2 p.) What is the key difference between top-k and top-p sampling?
Top-p applies to numeric outputs, while top-k applies to text
Top-k is faster but less accurate than top-p sampling
Top-p considers probabilities cumulatively; top-k selects the top-k predictions
Top-k and top-p are identical sampling methods
Top-k considers probabilities cumulatively; top-p selects only the top-k predictions
single choice (2 p.) A language model generates the probability distribution for the next token shown in the table. When applying top-p sampling with p=0.90 , which tokens are included in the sampling pool?
Token 1 only
Tokens 1, 2, 3, and 4
Tokens 1, 2, and 3
All five tokens
Tokens 1 and 2
single choice (2 p.) What is tokenization in NLP?
Assigning probabilities to class labels
Splitting text into units such as words or subwords
Aggregating all text data into a single representation
Removing irrelevant information from text
Reducing text to its base form
single choice (2 p.) What is the purpose of identifying stop words in NLP tasks?
To emphasize the most frequent words in text
To improve efficiency by removing commonly used words that might add little meaning
To replace rare words with similar high-frequency words
To reduce overfitting during model training
To identify important topic-specific terms
single choice (2 p.) Why are word embeddings significant in modern NLP models?
They simplify tokenization processes
They represent words as vectors that capture semantic meaning
They are exclusively used for supervised learning tasks
They remove the need for pretraining in LLMs
They ensure that each token has a unique representation
single choice (2 p.) What is the role of the attention mechanism in NLP?
To eliminate stop words dynamically
To assign importance to different parts of input data for context understanding
To tokenize input data into smaller units
To generate embeddings for sequences
To reduce the dimensionality of input data
single choice (2 p.) What does zero-shot learning enable in language models?
Learning tasks with no specific training data for those tasks
Adapting to unseen data using a small labeled dataset
Using reinforcement learning for improved accuracy
Generating text using unsupervised methods exclusively
Predicting sequences without embeddings
single choice (2.50 p.) What is the key difference between label encoding and one-hot encoding for categorical variables?
Label encoding assigns integers to categories while one-hot encoding creates binary columns for each category.
Label encoding creates binary columns while one-hot encoding assigns continuous numerical values.
Label encoding is used for numerical data while one-hot encoding is used for text data exclusively.
Label encoding works only for ordinal data while one-hot encoding works only for binary data.
Label encoding requires more memory while one-hot encoding is always more computationally efficient.
What is the primary purpose of regularization techniques like L1 and L2 in machine learning models?
Regularization increases model complexity to capture more intricate patterns in training data effectively.
Regularization prevents overfitting by adding penalties that discourage excessively large weight values.
Regularization speeds up the training process by reducing the number of features automatically.
Regularization improves accuracy by increasing the learning rate during gradient descent optimization.
Regularization eliminates the need for validation sets by preventing all types of errors.
Which evaluation metric is most appropriate for assessing model performance on highly imbalanced classification datasets?
Accuracy is most appropriate because it considers all predictions equally regardless of class distribution.
Mean squared error is most appropriate because it penalizes large errors more heavily than small ones.
F1 score is most appropriate because it balances precision and recall for imbalanced classes.
Root mean squared error is most appropriate because it measures prediction error in original units.
Mean absolute error is most appropriate because it treats all classes with equal importance.
Why is feature scaling (normalization or standardization) important for machine learning algorithms?
Feature scaling increases the number of features available for the model to learn from.
Feature scaling ensures features are on a common scale without distorting value ranges or losing information.
Feature scaling automatically removes outliers and missing values from the dataset.
Feature scaling converts categorical variables into numerical representations effectively.
Feature scaling guarantees that the model will achieve perfect accuracy on test data.
What does precision measure in a classification model's performance evaluation?
Precision measures the ratio of correct predictions to all actual positive class instances.
Precision measures the ratio of correct positive predictions to all positive class predictions made.
Precision measures the ratio of all correct predictions to the total number of predictions.
Precision measures the ratio of false positives to all negative class instances predicted.
Precision measures the ratio of true negatives to all actual negative class instances.
Which of these is a key advantage of random forests over individual decision trees?
Lower computational complexity
Faster training time compared to single decision trees
Better interpretability for end-users
More accurate predictions most of the time due to ensemble averaging
Simpler implementation in most software tools
What does zero-shot learning enable in language models?
Learning tasks with no specific training data for those tasks
Adapting to unseen data using a small labeled dataset
Using reinforcement learning for improved accuracy
Predicting sequences without embeddings
Generating text using unsupervised methods exclusively
What is the role of Reinforcement Learning from Human Feedback (RLHF)?
Reducing the training time for discriminative models
Improving model interpretability based on human evaluation
Enhancing generative models to be used for reinforcement learning
Fine-tuning language models to align with human preferences
Standardizing model outputs for generative models for text generation
How does temperature affect the outputs of a large language model?
It controls randomness in the generated text
It changes the structure of the training data
It adjusts the model's learning rate and loss function
It sets the maximum token limit
It modifies the input tokenization process
What type of scenario is best handled by discriminative models?
Predicting whether an email is spam
Creating human-like conversations
Producing synthetic datasets
Generating realistic images
Translating text between languages
When modifying the output layer of a classification neural network to support a new set of target classes, which factor most directly determines how the output layer must be redesigned?
The number of unique labels that the model must predict at inference
The dropout probability applied in the preceding hidden layers
The dimensionality of the internal feature embeddings produced by the model
The batch size used during the final epoch of model fine-tuning
The type of optimizer used during the training procedure
What is the role of the attention mechanism in NLP?
To tokenize input data into smaller units
To assign importance to different parts of input data for context understanding
To eliminate stop words dynamically
To reduce the dimensionality of input data
To generate embeddings for sequences
What is hallucination in large language models?
A failure or hallucination of the input training data to generate features
An issue caused by low training data diversity
A scenario where the model outputs random sequences
A state where the model produces plausible but false information
An increase in overfitting during fine-tuning
Single choice (2 p.) — What is the primary purpose of word embeddings in NLP?
To translate words between languages
To represent words as vectors
To count word frequency in documents
To remove stop words from the text
To tokenize sentences into words
Single choice (2 p.) — What is the main advantage of using vector embeddings in business AI?
They shrink model size using random transformations
They extract only categorical features from the training set
They make spreadsheets easier to edit and update
They convert text into numbers that preserve meaning
They erase irrelevant attributes to save memory
Single choice (2 p.) — Why are word embeddings significant in modern NLP models?
They remove the need for pretraining in LLMs
They represent words as vectors that capture semantic meaning
They simplify tokenization processes
They are exclusively used for supervised learning tasks
They ensure that each token has a unique representation
Single choice (2 p.) — What is the purpose of identifying stop words in NLP tasks?
To emphasize the most frequent words in text
To identify important topic-specific terms
To reduce overfitting during model training
To replace rare words with similar frequency words
To improve efficiency by removing commonly used words
Single choice (5 p.) — A classifier’s output layer changes from 10 classes to 8 classes. Each neuron receives 512 inputs plus bias. How many fewer parameters does the new layer contain?
4,096 fewer parameters overall
4,800 fewer parameters overall
3,078 fewer parameters overall
3,520 fewer parameters overall
2,560 fewer parameters overall
Single choice (2 p.) — What is tokenization in NLP?
Removing irrelevant information from text
Reducing text to its base form
Aggregating all text data into a single representation
Assigning probabilities to class labels
Splitting text into units such as words or subwords
Single choice (2 p.) — In regression tasks, discriminative models aim to:
Generate new features from the input
Map input features to continuous outputs
Handle missing values in the dataset
Reduce overfitting on the training data
Learn the probability distribution of inputs
Single choice (2 p.) — What is transfer learning in NLP?
Applying clustering algorithms to a large dataset of text to apply clusters to a smaller dataset
Training all word embeddings from a randomly initialized state exclusively on the target task
Using pre-trained knowledge from one task to enhance model performance for another task
Transferring generative models from unsupervised text generation and iterative quality refinement
Integrating a reinforcement learning policy with a language model guided by human feedback
Single choice (2 p.) — Why is retrieval-augmented generation (RAG) beneficial?
It reduces computational resource usage during LLM training
It increases the model's ability to classify text generated by another model
It simplifies prompt engineering by retrieving and generating useful features
It eliminates the need for pretraining retrieval-augmented models
It enhances LLMs by incorporating real-time, external knowledge
Single choice (2 p.) — What trade-off does a low-temperature setting provide in LLM outputs?
Faster response times but less accuracy
Higher randomness but reduced coherence
Better interpretability but fewer details
Reduced randomness but lower creativity
Enhanced creativity but increased errors
Single choice (2 p.) — Which task is generative AI better suited for compared to discriminative AI?
Fraud detection
Spam detection
Regression analysis
Text translation
Image classification
Single choice (2 p.) — Which strategy helps mitigate the knowledge cutoff limitations of LLMs?
Diversifying the knowledge base to new fields
Reducing the model size and increasing the cutoff threshold
Implementing zero-shot learning instead of few-shot learning
Employing retrieval-augmented generation
Adding more hyperparameters and tuning them on the validation set
Single choice (2 p.) — How does maximum length impact an LLM's functionality?
It alters the model's sampling techniques
It limits the maximum number of neurons in hidden layers
It defines the required training data size
It sets the model's computational complexity
It limits the number of input and output tokens
