A list of subjects sorted by their average scores.
The average score of each student across all subjects.
A DataFrame with the scores of all students for each subject.
Q2MCQ2 marks
Q3MCQ2 marks
You’re working with a dataset that consists of training data (‘train_data’) and test data (‘test_data’). The dataset contains both numerical and categorical features. You decide to employ a combination of ‘StandardScaler’ (for numerical columns) and ‘OneHotEncoder’ (for categorical columns) from ‘scikit-learn’ using the ‘ColumnTransformer’ utility. Which of the following actions is MOST likely to introduce data leakage or potential modeling issues?
You utilize ‘fit_transform’ on ‘train_data’ and then ‘transform’ on ‘test_data’using the ‘ColumnTransformer’.
After observing a new category in the test data that was not present in thetraining data, you set the ‘handle_unknown’ parameter to ’ignore’ in ‘OneHotEncoder’.
You first apply ‘fit’ on the ‘test_data’ and then ‘transform’ on ‘train_data’ usingthe ‘ColumnTransformer’.
Before using ‘ColumnTransformer’, you independently apply ‘fit_transform’ to‘train_data’ for both ‘StandardScaler’ and ‘OneHotEncoder’.
Q4MCQ2 marks
You are working on a machine learning project that aims to predict housing prices based on various features of the houses. As the first step, you decide to perform exploratory data analysis and visualize the data to understand its structure and relationships. Which of the following visualization techniques or principles is LEAST likely to provide meaningful insights for this kind of regression problem?
Plotting a heatmap of the correlation matrix to understand the linearrelationship between the numeric features.
Using a scatter plot to visualize the relationship between the square footage ofa house and its price.
Visualizing the distribution of housing prices using a pie chart.
Creating box plots for housing prices, grouped by the number of bedrooms, todetect outliers and understand the distribution across different categories.
Q5MCQ2 marks
Important parameter in MinMaxScaler was missing while transforming thedata.
train_test_split shouldn’t be done while setting random_state parameter.
X_test was transformed incorrectly.
All the steps are correct
Q6MCQ2 marks
Imagine you’ve loaded a dataset with 1000 samples into a Pandas DataFrame, and each sample has 30 features. Unfortunately, some samples have missing values for a few features, and you want to remove samples with more than 3 null values present. Please select the method to accomplish this task.?
drop(how= 27)
drop(columns=[‘all’])
dropna(thresh = 27)
dropna(how=‘any’)
dropna(thresh=3)
Q7MCQ2 marks
Choose the options with respect to the given statements: Statement1 : To apply various sklearn methods from in series on a column we should use Pipeline. Statement2 : To apply various sklearn methods on various columns in parallel we should use ColumnTransformer.
Statement 1 False, Statement 2 False
Statement 1 True, Statement 2 False
Statement 1 False, Statement 2 True
Both statements are True
Q8MCQ2 marks
Q9MCQ2 marks
5
99
0.999
No evaluation metrics is mentioned, hence it will produce error.
Q10MCQ2 marks
The pipeline will generate polynomial features (including squared terms) andthen scale these features to a range between 0 and 1.
The transformed data will consist of the original features, their squares, andinteraction terms, all scaled between 0 and 1.
The pipeline scales the original features between 0 and 1, then subsequentlygenerates polynomial combinations including both square terms and interaction terms.
Only interaction terms between features are generated by the pipeline, whichare then scaled between 0 and 1, without including the squared terms of individual features.
Q11MCQ2 marks
Optimize the model’s complexity by automatically determining the best αthrough cross-validation.
Reduce overfitting by incorporating 10-fold cross-validation during modelselection.
Make predictions using an ensemble of 10 different Lasso models trained ondifferent subsets of the data.
Maximize the number of features retained in the model, ensuring a complexmodel representation.
Q12MCQ3 marks
sgd1
sgd2
Q13MSQ2 marksselect all that apply
Column indexed at 0
Column indexed at 1
Column indexed at 2
Column indexed at 3
Column indexed at 4
No columns
Q14MSQ2 marksselect all that apply
Which of the following code blocks will correctly take the learning rate as ‘optimal’ ?
Q15MSQ3 marksselect all that apply
While performing exploratory data analysis (EDA) on a dataset, you come across some columns with a high percentage of missing values. Along with that, a few categorical columns have a large number of unique categories. Which of the following actions would typically be a recommended initial approach during EDA? (Choose multiple correct options.)
Visualizing the data distribution of columns to understand their characteristics.
Using dimensionality reduction techniques, like PCA, to handle columns withmany unique categories.
Visualizing the distribution of missing values across the dataset to ascertainany patterns or systematic missingness.
Removing columns that have more than 90% missing values without anycontext.
Q16MSQ3 marksselect all that apply
Q17SA2 marks
Q18SA2 marks
Q19SA2 marks
Q20SA2 marks
Q21SA3 marks
Comprehension passage - the questions below it refer to this
Go through the code snippet given below and answer the given subquestions.
Go through the code snippet given below and answer the given subquestions.
Q22MCQ2 marks
Which of the following options will be the output of the given code?
Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.
Summary of Core Topics, Concepts, Principles, and Equations
Data Science and Machine Learning Concepts
Data Preprocessing and Cleaning
Handling Missing Values: Techniques include imputation (mean, median, mode), dropping rows/columns, and using algorithms that support missing values.
Outlier Detection: Methods like the Interquartile Range (IQR) method.
Data Leakage: Ensuring that information from the test set does not leak into the training set. For example, using transform instead of fit_transform on the test set.