Data Science · Python What happens when a Python function contains the yield keyword? A It returns a generator that yields lazily Correct answer B It returns all of its values at once in a list C It can only be called once in the whole program D It pauses the entire program until input arrives MCQSEXAM Show answer Read explanation
Data Science · Python In Python, a decorator is: A A tool that formats code according to PEP 8 B A comment that documents what a function does C A function that wraps another function Correct answer D A special variable that stores class constants MCQSEXAM Show answer Read explanation
Data Science · Python Inside a function, what types do *args and **kwargs collect? A A tuple and a dictionary Correct answer B A dictionary and a tuple C Two separate lists D A list and a set MCQSEXAM Show answer Read explanation
Data Science · Python def add(item, box=[]): box.append(item); return box. What does calling add(1) and then add(2) return the second time? A An error B [1, 2] Correct answer C [2] D [1] MCQSEXAM Show answer Read explanation
Data Science · Python What does [x * x for x in range(4)] produce? A [0, 1, 4, 9] Correct answer B [0, 2, 4, 6] C [0, 1, 2, 3] D [1, 4, 9, 16] MCQSEXAM Show answer Read explanation
Data Science · Naive Bayes Bernoulli Naive Bayes models each feature as: A Present or absent (a binary value) Correct answer B A ranked category with fixed order C A count of how often it appears D A continuous normally distributed value MCQSEXAM Show answer Read explanation
Data Science · Naive Bayes P(spam) = 0.4 and P(word | spam) = 0.5, while P(ham) = 0.6 and P(word | ham) = 0.1. Given the word appears, what is P(spam | word)? A About 0.77 Correct answer B About 0.20 C About 0.40 D About 0.50 MCQSEXAM Show answer Read explanation
Data Science · K-Nearest Neighbors (KNN) When k-nearest neighbours is used for regression, the prediction is usually: A The median of the entire training dataset B The most common class among all training points C The average target of the k nearest neighbours Correct answer D The value of the single farthest neighbour MCQSEXAM Show answer Read explanation
Data Science · K-Nearest Neighbors (KNN) In k-nearest neighbours, choosing a very small k (such as k = 1) tends to: A Make predictions identical everywhere B Underfit and ignore local patterns C Remove the need for distance metrics D Overfit and be sensitive to noise Correct answer MCQSEXAM Show answer Read explanation
Data Science · Support Vector Machines (SVM) A trained linear SVM classifies a new point x using: A A sigmoid of w · x without the bias B Distance to the nearest training point C Average label of the support vectors D The sign of the value w · x + b Correct answer MCQSEXAM Show answer Read explanation
Data Science · Support Vector Machines (SVM) How is a standard SVM usually extended to problems with more than two classes? A By combining binary SVMs, such as one-vs-rest Correct answer B By adding extra support vectors to one model C By training on only the two largest classes D By replacing the kernel with a softmax layer MCQSEXAM Show answer Read explanation
Data Science · Support Vector Machines (SVM) Why should numeric features usually be standardised before training an SVM with an RBF kernel? A Standardising removes the need for a C parameter B Unscaled data makes SVM training fully linear C The RBF kernel accepts only values between 0 and 1 D Distances would be dominated by large-scale features Correct answer MCQSEXAM Show answer Read explanation
Data Science · Bayesian Statistics With a Beta(2, 2) prior on a success probability, you observe 3 successes in 3 trials. What is the posterior? A Beta(5, 2) Correct answer B Beta(2, 5) C Beta(3, 3) D Beta(5, 5) MCQSEXAM Show answer Read explanation
Data Science · Bayesian Statistics The Beta(1, 1) distribution, often used as a prior for a probability, is equivalent to: A A normal distribution with mean 1 B A point mass at exactly 0.5 C An exponential distribution D A uniform distribution on [0, 1] Correct answer MCQSEXAM Show answer Read explanation
Data Science · Bayesian Statistics A 95% Bayesian credible interval for a parameter means that: A 95% of repeated samples would produce this interval B Given the data, there is a 95% probability it lies within Correct answer C The parameter is fixed and the interval is random D The prior had 95% of its weight in this range MCQSEXAM Show answer Read explanation
Data Science · Big Data Analytics In the 'Vs' of big data, 'veracity' refers to: A The speed at which data is generated B The total amount of data being stored C The trustworthiness and quality of data Correct answer D The range of different data formats MCQSEXAM Show answer Read explanation
Data Science · Big Data Analytics A data lake typically follows which approach to structuring data? A Schema-on-read Correct answer B Schema-free indexing C Schema-on-write D Schema-on-delete MCQSEXAM Show answer Read explanation
Data Science · Big Data Analytics What is the default HDFS block size in Hadoop 2.x and 3.x? A 128 MB Correct answer B 1 GB C 4 KB D 64 MB MCQSEXAM Show answer Read explanation
Data Science · Natural Language Processing (NLP) Word sense disambiguation (WSD) aims to: A Remove common words like 'the' and 'is' B Pick the meaning that fits the context Correct answer C Correct spelling mistakes in a sentence D Translate words into another language MCQSEXAM Show answer Read explanation
Data Science · Natural Language Processing (NLP) When evaluating a language model, a lower perplexity indicates that the model: A Generates longer sentences B Uses a larger vocabulary C Trains for fewer epochs D Predicts the test text better Correct answer MCQSEXAM Show answer Read explanation
Data Science · Natural Language Processing (NLP) In NLP, a bigram is: A A sequence of two consecutive tokens Correct answer B A sentence containing two clauses C A word with exactly two syllables D A pair of synonyms in a thesaurus MCQSEXAM Show answer Read explanation
Data Science · Logistic Regression Applying L1 (lasso) regularisation to logistic regression tends to: A Make all coefficients exactly equal B Set some coefficients exactly to zero Correct answer C Increase every coefficient's size D Remove the intercept from the model MCQSEXAM Show answer Read explanation
Data Science · Logistic Regression Multinomial logistic regression is used when the target variable has: A Three or more unordered classes Correct answer B Continuous numeric values only C Exactly two possible categories D Categories in a fixed rank order MCQSEXAM Show answer Read explanation
Data Science · Logistic Regression A logistic regression model predicts a probability of 0.8. What are the corresponding odds? A 0.8 B 0.25 C 4 Correct answer D 1.25 MCQSEXAM Show answer Read explanation
Data Science · Logistic Regression In a logistic regression model, a feature has a coefficient of 0.7. A one-unit increase in that feature multiplies the odds of the outcome by about: A 0.7 B 0.5 C 2.0 Correct answer D 1.7 MCQSEXAM Show answer Read explanation