Related: Scikit-learn, TensorFlow, PyTorch


Q1. Why split data into training and test sets?

  • A) To reduce dataset size
  • B) To evaluate model performance on unseen data ✓
  • C) To speed up training
  • D) Required by law

Q2. What is overfitting?

  • A) Model is too simple
  • B) Model memorizes training data, performs poorly on new data ✓
  • C) Training takes too long
  • D) Dataset is too large

Q3. Which Scikit-learn function performs cross-validation?

  • A) train_test_split
  • B) cross_val_score
  • C) fit_predict
  • D) GridSearchCV only

GridSearchCV uses cross-validation internally, but cross_val_score is the direct CV function.


Q4. What does model.fit(X, y) do?

  • A) Makes predictions
  • B) Trains the model on data ✓
  • C) Saves the model
  • D) Evaluates accuracy

Q5. What is a feature in ML?

  • A) A software feature
  • B) An input variable used for prediction ✓
  • C) The output label
  • D) A type of neural network

Q6. What loss function is typically used for binary classification?

  • A) Mean Squared Error
  • B) Binary Cross-Entropy ✓
  • C) Hinge Loss only
  • D) No loss function needed

Q7. What does accuracy_score(y_true, y_pred) measure?

  • A) Training speed
  • B) Fraction of correct predictions ✓
  • C) Memory usage
  • D) Number of features

Q8. What is transfer learning?

  • A) Moving data between servers
  • B) Using a pre-trained model as starting point for a new task ✓
  • C) Converting code to another language
  • D) A type of database migration

Q9. In PyTorch, what does tensor.requires_grad = True enable?

  • A) GPU acceleration
  • B) Automatic gradient computation for backpropagation ✓
  • C) Data loading
  • D) Model saving

Q10. What is the purpose of StandardScaler in a pipeline?

  • A) Remove outliers
  • B) Normalize features to zero mean and unit variance ✓
  • C) Encode categorical variables
  • D) Split the dataset

Practice: ML Classifier Project | Full-Stack ML Capstone