menu

Python for Data Science and Machine Learning


1. Which of the following is a method for handling categorical data in machine learning?

One-hot encoding

PCA

Standardization

Gradient descent


2. What is the difference between a list and an array in Python?

Lists can only contain one data type, while arrays can contain multiple data types.

Arrays can be resized after creation, while lists cannot.

Lists can be indexed using negative numbers, while arrays cannot.

Arrays are optimized for numerical operations, while lists are not.


3. Which of the following is a data preprocessing technique in machine learning?

Standardization

PCA

K-means clustering

Gradient descent


4. Which of the following is a Python library for deep learning?

Keras

Scikit-learn

Matplotlib

Seaborn


5. Which of the following is a method for selecting the optimal hyperparameters in machine learning?

Grid search

Gradient descent

Lasso regularization

None of the above


6. Which of the following is a classification algorithm in machine learning?

Linear regression

K-nearest neighbors

Gradient descent

None of the above


7. Which of the following is a method for reducing dimensionality in machine learning?

PCA

K-means clustering

Gradient descent

None of the above


8. Which of the following is a hyperparameter in machine learning?

Number of features

Learning rate

Number of samples

Target variable


9. What is the purpose of cross-validation in machine learning?

To test the performance of the model on unseen data

To create a validation set for hyperparameter tuning

To reduce overfitting of the model

All of the above


10. Which of the following is a method for handling missing data in Pandas?

Removing rows with missing data

Filling missing data with a fixed value

Interpolating missing data based on neighboring values

All of the above