โ† All Machine Learning Flashcard Decks

Machine Learning Flashcards

25 cards from real Machine Learning practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 20 Machine Learning flashcards as text
  1. We set the gradient to zero to obtain the minimum or maximum of a function because:

    Answer: The value of the gradient at extrema of a function is always zero

    Explanation: The gradient of a multivariable function at a maximum point will be the zero vector of the function, which is the single greatest value that the function can achieve.

  2. Which of the following machine learning algorithms is based on the principle of bagging and is extensively used and effective?

    Answer: Random Forest

    Explanation: The Radom Forest algorithm builds an ensemble of Decision Trees, mostly trained with the bagging method.

  3. Which of the following is a good characteristic of a test dataset?

    Answer: A and B

    Explanations: A good test dataset has a good amount of sample population and equal ratios of class representation.

  4. The following are the most regularly used metrics and tools for evaluating a classification model:

    Answer: All of the above

    Explanations: The model performance assessment for classification algorithms encorporates all of the above techniques.

  5. What is the purpose of cross-validation?

    Answer: Both A and B

    Explanations: Cross-validation is a model validation technique for assessing how the results of a statistical analysis will generalize to an independent data set.

  6. How do you deal with data in a dataset that is missing or corrupted?

    Answer: All of the above

    Explanations: All of the above techniques are different ways of imputing the missing values.

  7. A disadvantage of decision trees is which of the following?

    Answer: Decision trees are prone to be overfit

    Explanations: Allowing a decision tree to split to a granular degree makes decision trees prone to learning every point extremely well to the point of perfect classification that is overfitting.

  8. Which of the following is the correct technique to preprocess data before performing regression or classification?

    Answer: Normalize the data -> PCA -> training

    Explanations: You need to always normalize the data first. If not, PCA or other techniques that are used to reduce dimensions will give different results.

  9. Why is it necessary to use second-order differencing in a time series?

    Answer: Both A and B

    Explanations: If the second-order difference is positive, the time series will curve upward and if it is negative, the time series will curve downward at that time.

  10. In Sklearn, what is pca.components_?

    Answer: Set of all eigen vectors for the projection space

    Explanations: pca.components_ is the set of all eigen vectors for the projection space.

  11. Which of the following is a feature extraction example?

    Answer: All of the above

    Explanations: All of the above techniques transform raw data into features which can be used as inputs to machine learning algorithms.

  12. Which of the following regularization statements is incorrect?

    Answer: None of the above

    Explanations: A large value results in a large regularization penalty and therefore, a strong preference for simpler models, which can underfit the data.

  13. Which of the following statements about Naive Bayes is correct?

    Answer: A and B

    Explanations: Naive Bayes assumes that all the features in a data set are equally important and independent.

  14. Which of the following scenarios will K-means clustering fail to produce satisfactory results? 1) Outliers in the data 2) Data points of various densities 3) Nonconvex data points

    Answer: 1, 2, and 3

    Explanations: K-means clustering algorithm fails to give good results when the data contains outliers, the density spread of data points across the data space is different, and the data points follow nonconvex shapes.

  15. In-text mining, which of the following approaches can be used for normalization?

    Answer: Both B and C

    Explanations: Lemmatization and stemming are the techniques of keyword normalization.

  16. How can a clustering algorithm avoid becoming caught in a bad local optima?

    Answer: Use multiple radom initializations

    Clustering algorithms like K-means are iterative and sensitive to their initial centroid placement. A poor initialization can lead to convergence on a suboptimal local optimum. By running the algorithm multiple times with different random initializations and selecting the best result (e.g., lowest inertia), the chances of finding a better, more global optimum are significantly increased.

  17. After 15 iterations of gradient descent with a=0.3, you compute J(theta). You notice that J(Theta) rapidly falls before leveling out. Which of the following conclusions do you think is most likely based on this information?

    Answer: a=0.3 is an effective choice of learning rate

    When the cost function J(Theta) rapidly decreases and then levels out, it indicates that the gradient descent algorithm is converging efficiently. This behavior suggests that the chosen learning rate (alpha = 0.3) is appropriate, allowing the model to quickly approach the minimum without overshooting or getting stuck. If the learning rate were too large, J(Theta) might diverge or oscillate; if too small, it would decrease very slowly.

  18. Which of the following is an appropriate method for determining "k" main components?

    Answer: Choose k to be the smallest value so that at least 99% of the varinace is retained.

    In Principal Component Analysis (PCA), the goal is to reduce dimensionality while retaining as much information (variance) as possible. A common heuristic is to select the smallest number of principal components (k) that collectively explain a high percentage (e.g., 95% or 99%) of the total variance in the original data. This ensures that most of the data's variability is preserved, minimizing information loss while achieving significant dimensionality reduction.

  19. What is the purpose of a sentence parser?

    Answer: It is used to parse sentences to derive their most likely syntax tree structures.

    A sentence parser in Natural Language Processing (NLP) analyzes the grammatical structure of a sentence. Its primary purpose is to determine the syntactic relationships between words and phrases, typically by generating a parse tree or dependency graph. This structural representation helps in understanding the meaning and relationships within the sentence, which is crucial for many downstream NLP tasks.

  20. Using the automated machine learning user interface, you create a machine learning model (UI). You must guarantee that the model complies with Microsoft's transparent AI philosophy. What are your options?

    Answer: Enable Explain best model.

    Microsoft's transparent AI philosophy emphasizes interpretability and understanding how models make decisions. Enabling 'Explain best model' in an automated ML UI provides insights into the model's predictions, such as feature importance and how different features influence the output. This functionality directly supports transparency by making the model's internal workings more understandable to users.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy