Cross Validation

Model Evaluation and Improvement

Learning Components

  • Learning consists of representation, evaluation, and optimization.

Model Evaluation

  • Using sklearn.datasets to create synthetic datasets.
  • Splitting data into training and test sets using train_test_split.
  • Instantiating a model (e.g., Logistic Regression) and fitting it to the training set.
  • Evaluating the model on the test set using logreg.score(X_test, y_test).

Cross-Validation

  • Definition: A statistical method for evaluating generalization performance.
  • K-Fold Cross-Validation:
    • Data is divided into K