Scikit Learn, Pandas, and NumPy Usage Questions
Practical proficiency with these core libraries. Pandas: DataFrames, data manipulation, handling missing values. NumPy: arrays, vectorized operations, mathematical functions. Scikit-learn: preprocessing, model fitting, evaluation metrics, pipelines. Knowing standard patterns and APIs. Writing efficient, readable code using these libraries.
MediumTechnical
72 practiced
Using RandomizedSearchCV, show how to tune hyperparameters of a pipeline consisting of TfidfVectorizer (for text) and LogisticRegression. Provide code that sets up param_distributions for vectorizer parameters like max_df and ngram_range, for logistic C, and explain how n_iter and scoring choices influence the search.
HardTechnical
68 practiced
Given irregular timestamps per entity, compute for each timestamp the exponentially weighted mean (EWMA) for that entity with half-life of 7 days. Implement this in pandas using groupby and ewm or a manual approach that handles irregular sampling and preserves alignment to original timestamps. Explain numerical stability considerations.
EasyTechnical
118 practiced
Describe the difference between the legacy numpy.random.seed approach and the new numpy.random.Generator API. Show code to create a reproducible Generator, sample normal variates, and explain why the new API is preferred for modern code and parallel workflows.
EasyTechnical
55 practiced
Explain the difference between a NumPy view and a copy. Give short Python examples showing slicing that returns a view and when operations produce a copy. Explain memory implications and how to detect whether an array owns its data.
HardTechnical
59 practiced
Explain how to convert a scikit-learn pipeline containing a TfidfVectorizer and LogisticRegression to ONNX using skl2onnx. Provide the conversion commands, initial type declarations, and describe common pitfalls such as unsupported transformers, sparse inputs, and handling unknown categories. Show how to validate ONNX outputs with onnxruntime against sklearn predictions.
Unlock Full Question Bank
Get access to hundreds of Scikit Learn, Pandas, and NumPy Usage interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.