A Python data pipeline has two steps. The first performs fast, vectorized mathematical operations on large multidimensional numeric arrays. The second trains a classification model on the prepared data and evaluates it with cross-validation. Which libraries best match these two steps?
Select an answer to reveal the explanation.
Short Explanation
NumPy is your number cruncher: fast math on big arrays. scikit-learn is your model shop: train, cross-validate, predict. Flip them around and you've got the trap, and anything with Tidyverse is out because that's R, not Python.
Full Explanation
NumPy is the foundational Python library for numerical computing. It provides the n-dimensional array type and vectorized operations, linear algebra and mathematical functions that run in compiled code, making it the right tool for fast math on large multidimensional numeric arrays. scikit-learn is the standard Python machine learning library; it supplies classification, regression and clustering algorithms behind a consistent fit and predict interface, along with model selection tools such as cross-validation, so it fits the training and evaluation step. scikit-learn itself uses NumPy arrays as input. Swapping the two misassigns their roles: scikit-learn is not a general array math library, and NumPy has no model training or cross-validation features. pandas could handle tabular preparation, but the first step is about multidimensional numeric arrays, which is NumPy's purpose, and Tidyverse is a set of R packages for data wrangling, not a Python model training library. Tidyverse cannot be used for array math in a Python pipeline, and MATLAB is a separate commercial computing environment with its own language rather than a Python library. Exam caveat: the DataSys+ objectives list NumPy, pandas, scikit-learn, Tidyverse and MATLAB as data manipulation tools, so expect questions that map each to its language and role. Operational check: confirm both libraries are pinned in the pipeline's dependency file and that the training step logs its cross-validation scores.