menu

Python for Data Science and Machine Learning

Python for Data Science and Machine Learning - Important Points


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

A. Decision tree

B. Random forest

C. K-means

D. Logistic regression

Discuss Work Space

Answer: option c

Explanation:

K-means is an algorithm used for clustering in machine learning, which groups similar data points together into clusters.

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

A. Removing rows with missing data

B. Filling missing data with a fixed value

C. Interpolating missing data based on neighboring values

D. All of the above

Discuss Work Space

Answer: option d

Explanation:

All of the above methods can be used for handling missing data in Pandas.

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

A. Increasing model complexity

B. Decreasing the amount of training data

C. Adding more features to the model

D. Regularization

Discuss Work Space

Answer: option d

Explanation:

Regularization is a technique used in machine learning to prevent overfitting, by adding a penalty term to the loss function.

19. Which of the following is a Python library for working with SQL databases?

A. Pandas

B. NumPy

C. SQLAlchemy

D. Scikit-learn

Discuss Work Space

Answer: option c

Explanation:

SQLAlchemy is a Python library for working with SQL databases, providing a set of high-level API and low-level engine for connecting to a variety of SQL databases.

20. What is the purpose of the train-test split function in machine learning?

A. To split the data into training and test sets

B. To perform cross-validation on the data

C. To perform hyperparameter tuning on the model

D. None of the above

Discuss Work Space

Answer: option a

Explanation:

The train-test split function is used in machine learning to split the data into training and test sets, which are used to train and evaluate the model, respectively.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now