menu

Python for Data Science and Machine Learning


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

Number of features

Learning rate

Number of samples

Target variable


2. What is the purpose of regularization in machine learning?

To reduce model complexity and prevent overfitting

To increase model complexity and prevent underfitting

To improve model accuracy on training data

None of the above


3. Which library in Python is used for deep learning?

Keras

PyTorch

TensorFlow

All of the above


4. Which of the following algorithms is used for clustering in machine learning?

Decision tree

Random forest

K-means

Logistic regression


5. Which of the following is a type of unsupervised learning in machine learning?

Decision tree

Linear regression

K-means clustering

None of the above


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


7. Which of the following is a way to prevent overfitting in machine learning?

Increasing model complexity

Decreasing the amount of training data

Adding more features to the model

Regularization


8. Which of the following is a type of regularization technique in machine learning?

Lasso regularization

K-means clustering

Gradient descent

None of the above


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

One-hot encoding

PCA

Standardization

Gradient descent


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

Standardization

PCA

K-means clustering

Gradient descent