{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "440cee95",
   "metadata": {},
   "source": [
    "# Chapter Exercise\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1ca0631a",
   "metadata": {},
   "source": [
    "Apply the key ideas from this chapter in the connected task below. Work in your own notebook or local project. Keep your implementation, reasoning, and verification results together.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "aa901d2e",
   "metadata": {},
   "source": [
    "## Evaluate a classifier for a decision\n",
    "\n",
    "1. Reuse the chapter's real shopping-session data and define the target, features, baseline, and training/evaluation separation.\n",
    "\n",
    "2. Compare scaled nearest neighbors with logistic regression using preprocessing fitted only on training data. Choose k or a decision threshold using the chapter's validation approach.\n",
    "\n",
    "3. Report a confusion matrix, accuracy, precision, recall, and an explicit error-cost comparison on held-out data. Explain which classifier you would use and why the highest accuracy need not give the best decision.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fbaf101f",
   "metadata": {},
   "source": [
    "Return to the chapter lessons as needed: [Classification](1401-classification.ipynb), [Nearest Neighbors](1402-nearest-neighbors.ipynb), [Training, Testing, and Accuracy](1403-training-testing-accuracy.ipynb), [Nearest Neighbors with scikit-learn](1404-knn-scikit-learn.ipynb), [Evaluating Classifiers](1405-evaluating-classifiers.ipynb), [Logistic Regression](1406-logistic-regression.ipynb).\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
