Data Science FREE Data Science MCQ Question and Answers 2 — Questions and Answers
Question 1: Which technique is used to reduce the number of features in a dataset while preserving most of the variance?
- Principal Component Analysis (Correct answer)
- Linear Regression
- K-Means Clustering
- Decision Tree
Correct answer: Principal Component Analysis
PCA reduces dimensionality by transforming features into principal components that capture the maximum variance in the data.
Question 2: What does the term 'overfitting' refer to in a machine learning model?
- The model performs well on training data but poorly on unseen data (Correct answer)
- The model performs poorly on both training and test data
- The model has too few parameters
- The model uses too little training data
Correct answer: The model performs well on training data but poorly on unseen data
Overfitting occurs when a model learns noise in the training data, resulting in poor generalization to new data.
Question 3: In a confusion matrix, what does the 'recall' metric measure?
- The proportion of actual positives correctly identified (Correct answer)
- The proportion of predicted positives that are correct
- The overall accuracy of the model
- The harmonic mean of precision and recall
Correct answer: The proportion of actual positives correctly identified
Recall measures the ability of a model to find all relevant positive instances out of the total actual positives.
Question 4: Which of the following is a supervised learning algorithm?
- Random Forest (Correct answer)
- K-Means Clustering
- DBSCAN
- Apriori
Correct answer: Random Forest
Random Forest is a supervised ensemble method that uses labeled data to build multiple decision trees for classification or regression.
Question 5: What is the purpose of cross-validation in model evaluation?
- To estimate how well a model generalizes to independent datasets (Correct answer)
- To increase the size of the training set
- To remove outliers from the data
- To select the best features for the model
Correct answer: To estimate how well a model generalizes to independent datasets
Cross-validation splits data into multiple folds to test model performance across different subsets, providing a robust estimate of generalization.
Question 6: Which Python library is primarily used for creating dataframes and performing data manipulation?
- Pandas (Correct answer)
- Matplotlib
- Scikit-learn
- TensorFlow
Correct answer: Pandas
Pandas provides the DataFrame structure and a rich set of functions for data cleaning, transformation, and analysis.
Which technique is used to reduce the number of features in a dataset while preserving most of the variance?