menu

Python for Data Science and Machine Learning


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

PCA

K-means clustering

Gradient descent

None of the above


2.

Which library in Python is commonly used for numerical computing and data analysis?

NumPy

Matplotlib

Scikit-learn

TensorFlow


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

One-hot encoding

PCA

Standardization

Gradient descent


4. Which library in Python is used for visualization of data?

Pandas

NumPy

Matplotlib

Scikit-learn


5. Which of the following evaluation metrics is used for binary classification problems?

Mean squared error

R-squared

F1 score

None of the above


6. Which of the following is used to create arrays in NumPy?

list

tuple

ndarray

set


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

Regularization

Gradient descent

Lasso regression

None of the above


8. Which of the following is a Python library for natural language processing?

Matplotlib

NumPy

Pandas

NLTK


9. 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.


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

Standardization

PCA

K-means clustering

Gradient descent