Blog

MCQs

Disclaimer:

Educational Use Only:

The website links provided are to be used strictly for educational and knowledge-gaining purposes only.

No Misuse:

Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.

Respect for Websites and Businesses:

Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.

Acknowledge Value of Knowledge:

Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.

No Endorsement:

The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.

User Responsibility:

By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.


Overall MCQs for Reference

  1. Which library is most used for implementing machine learning functions in Python?
    a. TensorFlow
    b. ReactJS
    c. Bootstrap
    d. Laravel
    Answer: a. TensorFlowgyansetu​
  2. What is the main function used to train a model in scikit-learn?
    a. model.run()
    b. model.train()
    c. model.fit()
    d. model.predict()
    Answer: c. model.fit()gyansetu​
  3. Which function from pandas is used for data manipulation before machine learning?
    a. concat()
    b. groupby()
    c. merge()
    d. All of the above
    Answer: d. All of the abovescribd​
  4. What Python function can split a dataset into train and test sets in scikit-learn?
    a. split_test()
    b. train_test_split()
    c. split_set()
    d. divide_data()
    Answer: b. train_test_split()placementpreparation​
  5. Which function is used to classify data using K-Nearest Neighbors in scikit-learn?
    a. classifier_knn()
    b. classify_knn()
    c. KNeighborsClassifier()
    d. knn_predict()
    Answer: c. KNeighborsClassifier()placementpreparation​
  6. Which function in TensorFlow is used to minimize loss?
    a. tf.losses()
    b. tf.reduce_mean()
    c. tf.train.Optimizer.minimize()
    d. tf.gradients()
    Answer: c. tf.train.Optimizer.minimize()sanfoundry​
  7. What is the function used to load datasets in scikit-learn?
    a. datasets.load_data()
    b. sklearn.load()
    c. load_dataset()
    d. sklearn.datasets.load_iris()
    Answer: d. sklearn.datasets.load_iris()gyansetu​
  8. Which function is commonly used to visualize data in Python machine learning?
    a. plt.plot()
    b. np.array()
    c. pd.DataFrame()
    d. tf.visualize()
    Answer: a. plt.plot()scribd​
  9. Which machine learning task uses the fit_transform() function in scikit-learn?
    a. Data encoding
    b. Feature scaling
    c. Both a and b
    d. None of the above
    Answer: c. Both a and bscribd​
  10. What Python function is used for model evaluation in scikit-learn?
    a. metrics.accuracy_score()
    b. validation.test_score()
    c. model.success()
    d. sklearn.score_test()
    Answer: a. metrics.accuracy_score()gyansetu​
  11. Which function checks the shape of a NumPy array in Python?
    a. np.shape()
    b. array.shape
    c. len(array)
    d. arr.size()
    Answer: b. array.shapescribd​
  12. What function is used to compute the mean squared error in scikit-learn?
    a. mean_square_error()
    b. np.mse()
    c. metrics.mean_squared_error()
    d. tf.reduce_mean()
    Answer: c. metrics.mean_squared_error()gyansetu​
  13. Which function is used to resample data for model validation?
    a. resample()
    b. cross_val_score()
    c. validate_sample()
    d. sample_test()
    Answer: b. cross_val_score()gyansetu​
  14. What function is used to drop missing values in pandas DataFrame?
    a. DataFrame.clean()
    b. df.dropna()
    c. pandas.dropna()
    d. df.clean_nan()
    Answer: b. df.dropna()scribd​
  15. What function combines multiple classifiers in ensemble learning in scikit-learn?
    a. ensemble.classifier()
    b. VotingClassifier()
    c. Boosting()
    d. combine_models()
    Answer: b. VotingClassifier()interviewkickstart​
  16. Which function transforms categorical labels into integers?
    a. LabelEncoder().fit_transform()
    b. encode.values()
    c. pd.LabelEncode()
    d. sklearn.transform_labels()
    Answer: a. LabelEncoder().fit_transform()gyansetu​
  17. Which function computes the confusion matrix in scikit-learn?
    a. confusion_matrix()
    b. metrics.conf_matrix()
    c. sklearn.matrix_confuse()
    d. model.evaluate_matrix()
    Answer: a. confusion_matrix()gyansetu​
  18. What is the function to shuffle data in scikit-learn?
    a. shuffle_data()
    b. sklearn.utils.shuffle()
    c. randomize_data()
    d. shuffle_set()
    Answer: b. sklearn.utils.shuffle()gyansetu​
  19. Which function reduces the number of dimensions in data in scikit-learn?
    a. reduce_dim()
    b. PCA()
    c. dimensionality_reduction()
    d. compress_features()
    Answer: b. PCA()gyansetu​
  20. Which function applies a decision tree classifier in scikit-learn?
    a. DecisionTreeClassifier()
    b. tree_fit()
    c. sklearn.tree_classifier()
    d. train_decision_tree()
    Answer: a. DecisionTreeClassifier()igmguru​
  21. Which function is used to save trained models in Python?
    a. pickle.dump()
    b. np.save()
    c. sklearn.save_model()
    d. tf.saveModel()
    Answer: a. pickle.dump()scribd​
  22. Which function is used to scale features in scikit-learn?
    a. MinMaxScaler()
    b. scale_data()
    c. StandardScaler()
    d. Both a and c
    Answer: d. Both a and cgyansetu​
  23. Which function finds frequent itemsets in transactional databases in ML?
    a. Apriori()
    b. FrequentPattern()
    c. itemsetFinder()
    d. clustering()
    Answer: a. Apriori()interviewkickstart​
  24. What function is used to calculate precision in scikit-learn?
    a. metrics.precision()
    b. metrics.precision_score()
    c. score_precision()
    d. sklearn.precision()
    Answer: b. metrics.precision_score()gyansetu​
  25. Which function is used for clustering in scikit-learn?
    a. cluster_data()
    b. KMeans()
    c. Clusterer()
    d. sklearn.cluster()
    Answer: b. KMeans()gyansetu​
  26. What function finds the sum of a NumPy array?
    a. np.sum()
    b. array.sum()
    c. sum(array)
    d. All of the above
    Answer: d. All of the abovescribd​
  27. Which function checks for null values in pandas DataFrame?
    a. df.isNa()
    b. pd.isnull()
    c. df.isnull()
    d. DataFrame.isNull()
    Answer: c. df.isnull()scribd​
  28. What function gives a correlation matrix in pandas?
    a. DataFrame.corr()
    b. df.correlate()
    c. pandas.corr_matrix()
    d. df.matrix_corr()
    Answer: a. DataFrame.corr()scribd​
  29. Which function splits strings in Python?
    a. str.split()
    b. split_string()
    c. np.split()
    d. string.split()
    Answer: a. str.split()scribd​
  30. Which function is used for logistic regression in scikit-learn?
    a. LogisticRegression()
    b. regression_log()
    c. sklearn.logit()
    d. model.regression()
    Answer: a. LogisticRegression()gyansetu​
  31. Which function is used for text vectorization in scikit-learn?
    a. CountVectorizer()
    b. tfidf_vectorize()
    c. TextVectorizer()
    d. vectorize_text()
    Answer: a. CountVectorizer()gyansetu​
  32. What function is used to compute recall in scikit-learn?
    a. metrics.recall()
    b. metrics.recall_score()
    c. recall_metric()
    d. sklearn.recall()
    Answer: b. metrics.recall_score()gyansetu​
  33. Which function applies a Support Vector Machine in scikit-learn?
    a. SVC()
    b. SVMClassifier()
    c. svm_fit()
    d. SupportVec()
    Answer: a. SVC()gyansetu​
  34. Which function in scikit-learn provides summary statistics?
    a. describe()
    b. summary()
    c. stats()
    d. sklearn.describe()
    Answer: a. describe()scribd​
  35. Which function checks for duplicate entries in pandas?
    a. df.duplicates()
    b. pd.duplicated()
    c. DataFrame.duplicated()
    d. check_duplicates()
    Answer: c. DataFrame.duplicated()scribd​
  36. Which function calculates the F1 score in scikit-learn?
    a. metrics.f1_score()
    b. sklearn.f1()
    c. f1score()
    d. f1_calculate()
    Answer: a. metrics.f1_score()gyansetu​
  37. What function gives the maximum value in a NumPy array?
    a. np.max()
    b. array.max()
    c. max(array)
    d. All of the above
    Answer: d. All of the abovescribd​
  38. Which function applies decision tree regression in scikit-learn?
    a. DecisionTreeRegressor()
    b. treeRegress()
    c. regression_tree()
    d. sklearn.DecisionTree()
    Answer: a. DecisionTreeRegressor()igmguru​
  39. What function can be used to concatenate DataFrames in pandas?
    a. pd.concat()
    b. DataFrame.concat()
    c. pandas.concatenate()
    d. df.append()
    Answer: a. pd.concat()scribd​
  40. Which function computes ROC AUC in scikit-learn?
    a. metrics.roc_auc_score()
    b. metrics.auc_roc()
    c. sklearn.auc_score()
    d. roc_auc()
    Answer: a. metrics.roc_auc_score()gyansetu​
  41. What function in scikit-learn generates polynomial features?
    a. PolynomialFeatures()
    b. poly_features()
    c. sklearn.poly()
    d. features_poly()
    Answer: a. PolynomialFeatures()gyansetu​
  42. What function returns the count of elements in a DataFrame column?
    a. df.value_counts()
    b. count_values()
    c. pandas.count()
    d. DataFrame.count_values()
    Answer: a. df.value_counts()scribd​
  43. Which function drops duplicate rows in pandas DataFrame?
    a. DataFrame.drop_duplicates()
    b. drop_duplicate_rows()
    c. pandas.drop_duplicates()
    d. df.drop_dupes()
    Answer: a. DataFrame.drop_duplicates()scribd​
  44. Which function computes mean absolute error in scikit-learn?
    a. metrics.mean_absolute_error()
    b. mean_abs_err()
    c. sklearn.abs_error()
    d. abs_mean_error()
    Answer: a. metrics.mean_absolute_error()gyansetu​
  45. Which function generates random numbers in NumPy?
    a. np.random.rand()
    b. random_num()
    c. numpy.rand()
    d. randint()
    Answer: a. np.random.rand()scribd​
  46. What function is used to perform grid search for hyperparameter tuning in scikit-learn?
    a. GridSearchCV()
    b. grid_search()
    c. cvGridSearch()
    d. tune_parameters()
    Answer: a. GridSearchCV()gyansetu​
  47. Which function performs over-sampling in imbalanced datasets?
    a. SMOTE()
    b. RandomOverSampler()
    c. oversample_data()
    d. upSample()
    Answer: a. SMOTE()gyansetu​
  48. What function is used for data normalization in scikit-learn?
    a. Normalizer()
    b. normalize_data()
    c. sklearn.Normalize()
    d. data_norm()
    Answer: a. Normalizer()gyansetu​
  49. Which function in pipelines applies transformations and modeling in one go?
    a. Pipeline()
    b. model_pipeline()
    c. sklearn.Pipe()
    d. PipeTransform()
    Answer: a. Pipeline()gyansetu​
  50. Which function predicts target values using a trained model in scikit-learn?
    a. predict()
    b. estimate()
    c. target_predict()
    d. sklearn.target()
    Answer: a. predict()gyansetu​
  1. https://www.gyansetu.in/blog/machine-learning-mcq-interview-preparation/
  2. https://www.scribd.com/document/514195055/Python-and-ML-MCQ
  3. https://www.placementpreparation.io/mcq/machine-learning/
  4. https://www.sanfoundry.com/1000-machine-learning-questions-answers/
  5. https://interviewkickstart.com/blogs/articles/machine-learning-mcqs-answers
  6. https://www.igmguru.com/blog/machine-learning-mcqs
  7. https://www.interviewbit.com/machine-learning-mcq/
  8. https://www.geeksforgeeks.org/quizzes/machine-learning-quiz-questions-and-answers/
  9. https://www.scribd.com/document/495501008/MCQ-Unit-Wise-ML-ROE083-Que-Bank-with-Ans
  10. https://www.youtube.com/watch?v=FugpqOEPuBg
  11. https://futureskillsacademy.com/blog/top-machine-learning-mcqs-with-answers/
  12. https://analyticstraininghub.com/mcq-for-machine-learning/

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!