In machine learning, data cleaning is a major part of data preparation. Why does it usually take the most time?
Think about the quality of data collected from real-world sources.
Raw data is often messy with errors and missing parts. Fixing these issues manually or with scripts takes time, which is why data cleaning dominates the preparation phase.
Feature engineering is a key step in data preparation. Why does it often consume a lot of time?
Think about how features relate to the problem you want to solve.
Feature engineering needs understanding of the data and problem to create useful inputs for models. This manual process takes time and effort.
You have two datasets: Dataset A is clean and Dataset B has 20% missing values. You train the same model on both. Which metric difference best shows the impact of data quality?
Look for a metric that directly reflects model performance difference.
Accuracy difference shows how missing data reduces model performance. Same loss or precision values do not reflect this clearly.
Consider this Python snippet for scaling features before training:
from sklearn.preprocessing import StandardScaler scaler = StandardScaler() X_train_scaled = scaler.fit_transform(X_train) X_test_scaled = scaler.fit_transform(X_test)
Why might this cause poor model performance?
Think about how scaling should be applied to training and test sets.
The scaler must be fit only on training data to learn scaling parameters. Fitting again on test data causes different scaling and leaks information.
You have a large dataset with 30% missing values scattered randomly. Which approach is best to prepare data for a machine learning model?
Consider balancing data loss and preserving information.
Removing 30% of data loses too much information. Filling missing values with mean/median preserves data and is simple. Some models handle missing data but are less common. Zero filling can distort features.
