Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 6 MCQs Spark ML Programming and PySpark

INT315 — Cluster Computing 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Introduction to machine learning and PySpark Easy

    What is machine learning primarily used for?

  2. Question 2 of 60 Introduction to machine learning and PySpark Easy

    What is PySpark?

  3. Question 3 of 60 Techniques of machine learning Easy

    Which machine learning technique uses labeled training data?

  4. Question 4 of 60 Techniques of machine learning Easy

    Which technique finds groups or patterns in data without known labels?

  5. Question 5 of 60 Introduction to Spark MLlib Easy

    What is the main purpose of Spark MLlib?

  6. Question 6 of 60 Key concepts of Spark ML Easy

    In Spark ML, what does an Estimator produce when its fit() method is called?

  7. Question 7 of 60 Key concepts of Spark ML Easy

    What is a Spark ML Pipeline used for?

  8. Question 8 of 60 Spark ML algorithms using PySpark Easy

    Which PySpark package commonly contains classification and regression algorithms?

  9. Question 9 of 60 Linear regression Easy

    What type of value does linear regression usually predict?

  10. Question 10 of 60 Logistic regression Easy

    Logistic regression is commonly used for which task?

  11. Question 11 of 60 Decision tree Easy

    How does a decision tree generally make a prediction?

  12. Question 12 of 60 K-means Easy

    What does the value represent in K-means clustering?

  13. Question 13 of 60 SVM Easy

    What is the main goal of a Support Vector Machine classifier?

  14. Question 14 of 60 Naive Bayes Easy

    Naive Bayes is based on which mathematical idea?

  15. Question 15 of 60 Evaluation and performance matrix Easy

    Why is a test dataset used when evaluating a machine learning model?

  16. Question 16 of 60 Confusion matrix Easy

    In a confusion matrix, what is a true positive?

  17. Question 17 of 60 R2 Easy

    What does the metric indicate in regression?

  18. Question 18 of 60 RMSE Easy

    What does RMSE stand for?

  19. Question 19 of 60 MAE Easy

    What does MAE measure?

  20. Question 20 of 60 Correlation heat map Easy

    What does a correlation heat map usually display?

  21. Question 21 of 60 Introduction to machine learning and PySpark Medium

    A PySpark pipeline must train a model on a dataset that is too large for a single machine. Which capability of Spark is most relevant to this task?

  22. Question 22 of 60 Techniques of machine learning Medium

    A company has customer records without labels and wants to group customers according to purchasing behavior. Which machine learning technique is most appropriate?

  23. Question 23 of 60 Introduction to Spark MLlib Medium

    Which statement best describes the purpose of Spark MLlib?

  24. Question 24 of 60 Key concepts of Spark ML Medium

    In Spark ML, what is the main purpose of a Pipeline?

  25. Question 25 of 60 Key concepts of Spark ML Medium

    A Spark ML model expects all predictor values in one column of vector type. Which component is commonly used to create this column from several feature columns?

  26. Question 26 of 60 Spark ML algorithms using PySpark Medium

    A PySpark workflow uses StringIndexer on a categorical column before training a classifier. What problem does this step primarily address?

  27. Question 27 of 60 Linear regression Medium

    A linear regression model predicts house prices using area and number of rooms. If the coefficient for area is positive, what does it indicate when other features remain fixed?

  28. Question 28 of 60 Linear regression Medium

    A regression model has an RMSE of when predicting monthly sales. What is the most appropriate interpretation?

  29. Question 29 of 60 Logistic regression Medium

    A logistic regression model returns a probability of for the positive class. Using a threshold of , what class will normally be predicted?

  30. Question 30 of 60 Logistic regression Medium

    A binary classifier produces many false negatives in a medical screening task. Which change may improve detection of positive cases?

  31. Question 31 of 60 Decision tree Medium

    A decision tree classifies loan applications by repeatedly splitting records according to feature values. What is the main benefit of selecting a split with high information gain?

  32. Question 32 of 60 K-means Medium

    In K-means clustering, a data point is reassigned during an iteration when:

  33. Question 33 of 60 K-means Medium

    A K-means model is trained with . What does the value represent?

  34. Question 34 of 60 SVM Medium

    What objective is central to a linear Support Vector Machine classifier?

  35. Question 35 of 60 Naive Bayes Medium

    The Naive Bayes classifier is called naive because it assumes that features are:

  36. Question 36 of 60 Evaluation and performance matrix Medium

    A model achieves accuracy on a dataset where of records belong to one class. Why might accuracy be misleading?

  37. Question 37 of 60 Confusion matrix Medium

    A fraud detection model labels a legitimate transaction as fraudulent. Which confusion matrix category describes this result?

  38. Question 38 of 60 R2 Medium

    A regression model has . Which interpretation is most appropriate?

  39. Question 39 of 60 MAE Medium

    Two regression models have MAE values of and on the same test set. Which model has better average absolute performance?

  40. Question 40 of 60 Correlation heat map Medium

    A correlation heat map shows a correlation of between two predictor variables. What concern should be investigated before fitting a linear model?

  41. Question 41 of 60 Introduction to machine learning and PySpark Hard

    A PySpark classification workflow imputes missing values, standardizes features, and tunes a logistic regression model with CrossValidator. Which design best prevents information leakage while estimating generalization performance?

  42. Question 42 of 60 Techniques of machine learning Hard

    A binary dataset contains 0.2% positive examples. A classifier that always predicts the negative class obtains 99.8% accuracy. Which evaluation strategy is most appropriate when missing a positive is costly?

  43. Question 43 of 60 Introduction to Spark MLlib Hard

    A legacy application uses pyspark.mllib models on RDDs, while a new workflow requires pipelines, parameter grids, and DataFrame-based feature transformers. Which migration decision is technically sound?

  44. Question 44 of 60 Key concepts of Spark ML Hard

    Consider pipeline = Pipeline(stages=[assembler, scaler, lr]), where scaler and lr are estimators. After calling model = pipeline.fit(train), which statement is correct?

  45. Question 45 of 60 Spark ML algorithms using PySpark Hard

    A parameter grid compares logistic regression models using CrossValidator, and the final model must be refitted on all training data using the best parameters. What does Spark's CrossValidator.fit(train) return?

  46. Question 46 of 60 Linear regression Hard

    Two predictors are nearly perfectly collinear, and an unregularized Spark linear regression model produces unstable coefficients across samples. Which parameter change most directly stabilizes the solution while generally retaining both predictors?

  47. Question 47 of 60 Linear regression Hard

    For labels and predictions , what are the RMSE and values, respectively?

  48. Question 48 of 60 Logistic regression Hard

    A fitted binary logistic regression model outputs calibrated positive-class probabilities. The false-negative cost is four times the false-positive cost, and both classes have equal prior importance. Under minimum expected cost, at what probability should the model predict the positive class?

  49. Question 49 of 60 Logistic regression Hard

    A multinomial logistic regression model uses three classes and a feature vector of size five, with intercepts enabled. Ignoring Spark's internal reference-category representation choices, how many class-specific coefficient and intercept values conceptually define the softmax scores before accounting for non-identifiability?

  50. Question 50 of 60 Decision tree Hard

    A categorical feature has 40 distinct categories, but a Spark decision tree is configured with maxBins=32. What is the most appropriate correction?

  51. Question 51 of 60 Decision tree Hard

    A decision tree has nearly zero training error but poor validation performance. Increasing maxDepth worsens the gap. Which change most directly regularizes the tree structure?

  52. Question 52 of 60 K-means Hard

    A K-means dataset contains annual income measured in dollars and age measured in years. Income has variance several orders of magnitude larger than age. What is the likely effect of fitting without scaling?

  53. Question 53 of 60 K-means Hard

    A K-means run reports a lower training cost for than for , but a substantially lower validation silhouette score for . Which conclusion is best supported?

  54. Question 54 of 60 SVM Hard

    A team attempts to train Spark LinearSVC directly on labels . Which modification is required?

  55. Question 55 of 60 SVM Hard

    For a linear SVM, a training point satisfies . What is its hinge loss , and where is the point relative to the margin?

  56. Question 56 of 60 Naive Bayes Hard

    A Bernoulli Naive Bayes model is trained on document features that contain term frequencies such as , , and . Which preprocessing best matches the model's likelihood assumptions?

  57. Question 57 of 60 Evaluation and performance matrix Hard

    A three-class classifier performs well on a dominant class but poorly on two rare classes. Which metric is most sensitive to the rare-class failures while assigning each class equal importance?

  58. Question 58 of 60 Confusion matrix Hard

    A classifier produces , , , and . If the threshold is changed so that 20 false positives become true negatives while 10 true positives become false negatives, what are the new precision and recall?

  59. Question 59 of 60 R2 Hard

    A regression model evaluated on unseen data has . Which interpretation is correct?

  60. Question 60 of 60 RMSE Hard

    Two regression models are evaluated on the same four cases. Model A has absolute errors , while Model B has absolute errors . Which comparison is correct?

That's unit 6

Answer a few questions and your score shows up here.