WorksheetsMachine Learning Preprocessing Essentials
Total questions: 10
Worksheet time: 5mins
What is the purpose of data preprocessing in machine learning?
To visualize data trends before modeling.
The purpose of data preprocessing in machine learning is to prepare and clean the data for better model performance.
To increase the size of the dataset for training.
To randomly shuffle the data for better accuracy.
Which technique is used to handle missing values in a dataset?
Imputation, deletion, or using algorithms that support missing values.
Feature scaling
Normalization
Data augmentation
What is normalization in the context of data preprocessing?
Normalization is the technique of converting categorical data into numerical format.
Normalization involves duplicating data to increase its size.
Normalization is the process of scaling data to a specific range, usually [0, 1], to ensure uniformity and improve algorithm performance.
Normalization is the process of removing all data from a dataset.
What does pd.get_dummies() in pandas do?
Replaces missing values
Normalizes numerical columns
Performs one-hot encoding
Converts datetime to string
Why is feature scaling important in machine learning?
Feature scaling is important because it ensures that all features contribute equally to the model, improving convergence and performance.
Feature scaling reduces the number of features in a dataset.
Feature scaling is only necessary for categorical data.
Feature scaling is used to increase the size of the dataset.
What is one-hot encoding and when is it used?
One-hot encoding is a method for normalizing numerical data.
One-hot encoding is used to reduce the dimensionality of continuous variables.
One-hot encoding is a technique for clustering data points.
One-hot encoding is used to convert categorical variables into a binary format for machine learning.
Which method is best to detect outliers in a numeric column?
Countplot
Boxplot
Label encoding
Histogram
What is the role of categorical encoding in preprocessing?
Categorical encoding is primarily for data storage optimization.
Categorical encoding helps in visualizing data more effectively.
Categorical encoding is crucial for converting categorical variables into numerical formats for machine learning algorithms.
Categorical encoding is used to increase the size of datasets.
How can outliers affect machine learning models?
Outliers improve model accuracy by providing more data points.
Outliers can distort model performance and lead to inaccurate predictions.
Outliers have no effect on model training or evaluation.
Outliers only affect the visual representation of data, not the model.
What does df.dropna() do?
Removes columns with missing values
Removes rows with missing values
Replaces missing values with NaN
None of these
