MCQs / Computer Science / NSCT: AI, Machine Learning & Data Analytics
NSCT: AI, Machine Learning & Data Analytics MCQs — Computer Science (page 2) 127 multiple-choice questions on NSCT: AI, Machine Learning & Data Analytics from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.
26. The F1-score is the: Ratio of FP to FN Product of TP and TN Harmonic mean of precision and recall Average of accuracy and recall Answer: C) Harmonic mean of precision and recall
Explanation: Useful for imbalanced data. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
27. Randomly switching off neurons during training to reduce overfitting is: Padding Stemming Pooling Dropout Answer: D) Dropout
Explanation: It forces the network to be robust. Lesson 8.5 · AI, Machine Learning & Data Analytics
Discuss this question
28. A dataset of 1200 samples is used in 4-fold cross-validation. How many samples are in each test fold? 900 4 240 300 Answer: D) 300
Explanation: 1200 ÷ 4 = 300; the other 900 are used for training in that round. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
29. Converting a "City" column (Lahore, Karachi, Quetta) into separate 0/1 columns is: Standardization One-hot encoding Tokenization Label smoothing Answer: B) One-hot encoding
Explanation: Suitable for nominal categories. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
30. Which Python library is most used for classic ML algorithms like random forest and k-means? Tkinter BeautifulSoup scikit-learn Django Answer: C) scikit-learn
Explanation: It offers a consistent fit/predict API. Lesson 8.1 · AI, Machine Learning & Data Analytics
Discuss this question
31. Classifying emails as spam or not spam is: Unsupervised clustering Supervised classification Regression Dimensionality reduction Answer: B) Supervised classification
Explanation: Labels (spam / not spam) are known. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
32. PCA reduces 50 features to 2 principal components. How many features does each sample have after PCA? 48 2 25 50 Answer: B) 2
Explanation: Each sample is projected onto the chosen components. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
33. The activation function commonly used in hidden layers of deep networks is: Linear only Softmax Step only ReLU Answer: D) ReLU
Explanation: ReLU(x) = max(0, x). Lesson 8.5 · AI, Machine Learning & Data Analytics
Discuss this question
34. The elbow method is used to: Remove outliers Split train and test data Encode text Choose the number of clusters in k-means Answer: D) Choose the number of clusters in k-means
Explanation: Look for the bend in the within-cluster error curve. Lesson 8.4 · AI, Machine Learning & Data Analytics
Discuss this question
35. Rescaling a feature to the range 0 to 1 is called: One-hot encoding Min-max normalization Imputation Standardization Answer: B) Min-max normalization
Explanation: x' = (x − min) ÷ (max − min). Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
36. A classifier's confusion matrix is: TP = 8, FP = 2, FN = 12, TN = 978. What is its F1-score (to 2 decimal places)? 0.60 0.53 0.32 0.99 Answer: B) 0.53
Explanation: F1 = 2PR ÷ (P + R) = 2 × 0.80 × 0.40 ÷ (0.80 + 0.40) = 0.53. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
37. Predicting the price of a house from its features is a: Classification problem Clustering problem Reinforcement problem Regression problem Answer: D) Regression problem
Explanation: The output is a continuous number. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
38. PCA is mainly used for: Data encryption Classification Imputing labels Dimensionality reduction Answer: D) Dimensionality reduction
Explanation: It finds new axes that capture most variance. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
39. Grouping customers by purchasing behaviour without predefined labels is: Reinforcement learning Regression Clustering Classification Answer: C) Clustering
Explanation: An unsupervised task. Lesson 8.4 · AI, Machine Learning & Data Analytics
Discuss this question
40. Actual values [10, 12, 8] and predictions [11, 10, 8]. What is the Mean Squared Error (MSE)? 5 1.29 1 1.67 Answer: D) 1.67
Explanation: Mean of squared errors = 1.67. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
41. Settings chosen before training, like k in k-NN or maximum tree depth, are: Features Hyperparameters Labels Weights Answer: B) Hyperparameters
Explanation: Model parameters are learned; hyperparameters are set. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
42. Despite its name, logistic regression is used for: Dimensionality reduction Regression only Clustering Classification Answer: D) Classification
Explanation: It outputs a probability via the sigmoid function. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
43. Which clustering algorithm can find arbitrarily shaped clusters and label outliers as noise? Linear regression k-means DBSCAN Naive Bayes Answer: C) DBSCAN
Explanation: It is density-based. Lesson 8.4 · AI, Machine Learning & Data Analytics
Discuss this question
44. In the PEAS description of an intelligent agent, "S" stands for: Software Search Sensors Speed Answer: C) Sensors
Explanation: Performance, Environment, Actuators, Sensors. Lesson 8.1 · AI, Machine Learning & Data Analytics
Discuss this question
45. A classifier's confusion matrix is: TP = 8, FP = 2, FN = 12, TN = 978. What is its recall? 98.6% 40% 60% 80% Answer: B) 40%
Explanation: Recall = TP ÷ (TP + FN) = 8 ÷ 20 = 40%. Lesson 8.3 · AI, Machine Learning & Data Analytics
Discuss this question
46. Splitting text into words or sub-words is called: Tokenization Normalization Stop-word removal Lemmatization Answer: A) Tokenization
Explanation: The first step of most NLP pipelines. Lesson 8.5 · AI, Machine Learning & Data Analytics
Discuss this question
47. Which of the 5 Vs of big data refers to the speed at which data is generated? Volume Variety Velocity Veracity Answer: C) Velocity
Explanation: e.g. streaming sensor data. Lesson 8.5 · AI, Machine Learning & Data Analytics
Discuss this question
48. A feature ranges from 10 to 60. What is the min-max normalized value of 30? 0.5 0.65 0.6 0.4 Answer: D) 0.4
Explanation: (x − min) ÷ (max − min) = (30 − 10) ÷ (60 − 10) = 0.4. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
49. Exploratory Data Analysis (EDA) is done mainly to: Deploy the model Write the final report only Encrypt the data Understand the data's patterns, distributions and problems before modelling Answer: D) Understand the data's patterns, distributions and problems before modelling
Explanation: EDA guides cleaning and model choice. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
50. "Satisfaction: low, medium, high" is which type of data? Nominal categorical Continuous numeric Ordinal categorical Unstructured Answer: C) Ordinal categorical
Explanation: The categories have a natural order. Lesson 8.2 · AI, Machine Learning & Data Analytics
Discuss this question
Previous Page 2 of 6 Next
Practise NSCT: AI, Machine Learning & Data Analytics MCQs
More Computer Science chapters