{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e79a0572",
   "metadata": {},
   "source": [
    "# 03 실전 반도체 공정 데이터 분석 · 10. 보강 실습\n",
    "\n",
    "- 강의 페이지: `Web/강좌/03_실전_반도체_공정_데이터분석/실전_반도체_공정_데이터분석_강의자료.html` → 목차 **보강 실습**\n",
    "- 기준 모델·혼동행렬·임계값·모델 비교·놓친 불량을 직접 계산합니다.\n",
    "- `fab.csv`가 이 노트북과 같은 폴더에 있어야 합니다.\n",
    "- 위에서 아래로 순서대로 실행하세요. 다른 노트북의 변수를 사용하지 않으므로 이 파일만 열어도 실행됩니다."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9063ed7c",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "## 초보자 필수 보강 실습\n",
    "\n",
    "모델을 만드는 것보다 중요한 것은 **무엇을 맞혀야 하는지**, **어떤 실수를 줄여야 하는지**를\n",
    "이해하는 일입니다. 반도체 불량 탐지에서는 불량을 정상으로 놓치는 `False Negative`와\n",
    "불량 재현율(`Recall`)을 특히 주의해서 봅니다.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0059ce6a",
   "metadata": {},
   "source": [
    "### 준비 · 1~8단계 코드 실행 (모델 학습까지)\n",
    "\n",
    "앞 단계 코드를 그대로 모아 한 번에 실행합니다. 출력은 앞 노트북과 같습니다."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "744ccfc4",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ── 1단계 ──\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.feature_selection import SelectKBest, f_classif   # ⭐ NEW\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import classification_report, confusion_matrix, roc_curve, auc\n",
    "\n",
    "# 그래프 한글 설정 (Mac은 'AppleGothic', Colab·리눅스는 'NanumGothic')\n",
    "plt.rcParams['font.family'] = 'Malgun Gothic'\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "\n",
    "# ── 2단계 ──\n",
    "df = pd.read_csv('fab.csv')\n",
    "\n",
    "# ── 3단계 결측값 처리 ──\n",
    "# 1️⃣ 컬럼별 결측률 계산\n",
    "miss_pct = (df.isnull().sum() / len(df) * 100).round(2)\n",
    "print(miss_pct.sort_values(ascending=False).head(10))\n",
    "\n",
    "# 2️⃣ 결측률 50% 초과 컬럼 제거\n",
    "THRESHOLD = 50.0\n",
    "cols_to_drop = miss_pct[miss_pct > THRESHOLD].index.tolist()\n",
    "print(f\"🗑️ 제거할 컬럼: {len(cols_to_drop)}개\")\n",
    "df = df.drop(columns=cols_to_drop)\n",
    "\n",
    "# 3️⃣ 남은 결측치는 중앙값으로 채우기 (타겟 제외!)\n",
    "numeric_cols = df.select_dtypes(include='number').columns.tolist()\n",
    "numeric_cols.remove('Pass_Fail')   # ⚠️ 타겟은 절대 채우지 말 것!\n",
    "\n",
    "df[numeric_cols] = df[numeric_cols].fillna(df[numeric_cols].median())\n",
    "print(f\"✅ 결측 처리 완료. 남은 결측: {df.isnull().sum().sum()}\")\n",
    "\n",
    "# ── 4단계 분산 0 제거 ──\n",
    "# 분산 = 0 컬럼 + 거의 0인 컬럼 모두 제거\n",
    "variances = df[numeric_cols].var()\n",
    "\n",
    "constant_cols    = variances[variances == 0].index.tolist()\n",
    "near_constant    = variances[(variances > 0) & (variances < 1e-6)].index.tolist()\n",
    "\n",
    "print(f\"분산 0  컬럼: {len(constant_cols)}개\")\n",
    "print(f\"분산 ≈0 컬럼: {len(near_constant)}개\")\n",
    "\n",
    "to_drop_var = constant_cols + near_constant\n",
    "df = df.drop(columns=to_drop_var)\n",
    "numeric_cols = [c for c in numeric_cols if c not in to_drop_var]\n",
    "\n",
    "print(f\"✅ 사용 가능한 센서: {len(numeric_cols)}개\")\n",
    "\n",
    "# ── 5단계 특성 선택 ──\n",
    "# 타겟을 0/1로 변환: 불량(1)을 양성 클래스로\n",
    "y = (df['Pass_Fail'] == 1).astype(int)\n",
    "X_all = df[numeric_cols].copy()\n",
    "\n",
    "# 상위 K=20 개 센서 자동 선택\n",
    "K = 20\n",
    "selector = SelectKBest(score_func=f_classif, k=K)\n",
    "selector.fit(X_all, y)\n",
    "\n",
    "f_scores   = pd.Series(selector.scores_, index=numeric_cols)\\\n",
    "               .replace([np.inf, -np.inf], np.nan).dropna()\n",
    "top_k_cols = f_scores.sort_values(ascending=False).head(K).index.tolist()\n",
    "\n",
    "print(f\"🏆 선택된 상위 {K}개 센서:\")\n",
    "for i, col in enumerate(top_k_cols, 1):\n",
    "    print(f\"  {i:2d}. {col}  F={f_scores[col]:6.1f}\")\n",
    "\n",
    "# ── 7단계 분리 & 스케일링 ──\n",
    "X = df[top_k_cols].copy()    # 상위 K개 센서만!\n",
    "# y = (df['Pass_Fail'] == 1).astype(int)  # 위에서 이미 만듦\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    X, y,\n",
    "    test_size=0.2,\n",
    "    random_state=42,\n",
    "    stratify=y          # ⭐ 불균형 비율 유지 필수!\n",
    ")\n",
    "\n",
    "scaler = StandardScaler()\n",
    "X_train_scaled = scaler.fit_transform(X_train)\n",
    "X_test_scaled  = scaler.transform(X_test)\n",
    "\n",
    "print(f\"학습: {X_train.shape}, 그 중 불량 {y_train.sum()}건\")\n",
    "print(f\"테스트: {X_test.shape}, 그 중 불량 {y_test.sum()}건\")\n",
    "\n",
    "# ── 8단계 모델 학습 ──\n",
    "# 1) 로지스틱 회귀\n",
    "lr_model = LogisticRegression(\n",
    "    random_state=42, max_iter=1000,\n",
    "    class_weight='balanced'   # ⭐ 소수 클래스에 가중치\n",
    ")\n",
    "lr_model.fit(X_train_scaled, y_train)\n",
    "\n",
    "# 2) 랜덤 포레스트\n",
    "rf_model = RandomForestClassifier(\n",
    "    n_estimators=200,\n",
    "    max_depth=8,\n",
    "    random_state=42,\n",
    "    class_weight='balanced'\n",
    ")\n",
    "rf_model.fit(X_train_scaled, y_train)\n",
    "\n",
    "# 예측\n",
    "y_pred_lr = lr_model.predict(X_test_scaled)\n",
    "y_pred_rf = rf_model.predict(X_test_scaled)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8e5a6678",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 실습 1 · 클래스 불균형과 기준 모델 이해하기\n",
    "\n",
    "**목표:** 항상 정상이라고 예측하는 단순 모델과 비교해 정확도의 함정을 확인합니다.\n",
    "\n",
    "아래 코드 셀의 주석을 보고 먼저 직접 작성해 보세요. 막히면 힌트를 확인하고,\n",
    "마지막에 정답 예제를 실행해 결과를 비교합니다.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "73cb17aa",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-exercise"
    ]
   },
   "outputs": [],
   "source": [
    "# TODO 1: y_test의 정상/불량 건수와 비율을 출력하세요.\n",
    "# TODO 2: 항상 정상(0)만 예측하는 배열을 만드세요.\n",
    "# TODO 3: 이 기준 모델의 정확도와 불량 Recall을 계산하세요.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a4cf4e08",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "<details>\n",
    "<summary><strong>힌트 보기</strong></summary>\n",
    "\n",
    "`value_counts(normalize=True)`와 `accuracy_score`, `recall_score`를 사용합니다.\n",
    "\n",
    "</details>\n",
    "\n",
    "**정답 예제:** 먼저 직접 시도한 뒤 아래 셀을 실행하세요.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f320e404",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-solution"
    ]
   },
   "outputs": [],
   "source": [
    "from sklearn.metrics import accuracy_score, recall_score\n",
    "\n",
    "print('테스트 판정 건수:')\n",
    "print(y_test.value_counts().sort_index())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aac76ebf",
   "metadata": {},
   "outputs": [],
   "source": [
    "print('\\n테스트 판정 비율(%):')\n",
    "print(y_test.value_counts(normalize=True).sort_index().mul(100).round(2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bd2d13a7",
   "metadata": {},
   "outputs": [],
   "source": [
    "always_normal = np.zeros(len(y_test), dtype=int)\n",
    "baseline_accuracy = accuracy_score(y_test, always_normal)\n",
    "baseline_recall = recall_score(y_test, always_normal, zero_division=0)\n",
    "print(f'항상 정상 모델 정확도: {baseline_accuracy:.3f}')\n",
    "print(f'항상 정상 모델 불량 Recall: {baseline_recall:.3f}')\n",
    "print('정확도가 높아도 불량 Recall이 0이면 불량 탐지 모델로 쓸 수 없습니다.')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ea26af1",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 실습 2 · 혼동행렬을 숫자로 읽기\n",
    "\n",
    "**목표:** 정상/불량 예측의 네 가지 경우와 놓친 불량 수를 직접 확인합니다.\n",
    "\n",
    "아래 코드 셀의 주석을 보고 먼저 직접 작성해 보세요. 막히면 힌트를 확인하고,\n",
    "마지막에 정답 예제를 실행해 결과를 비교합니다.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4563942c",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-exercise"
    ]
   },
   "outputs": [],
   "source": [
    "# TODO 1: 랜덤 포레스트 예측 결과로 혼동행렬을 만드세요.\n",
    "# TODO 2: tn, fp, fn, tp 네 값으로 나누어 저장하세요.\n",
    "# TODO 3: 불량 Recall = tp / (tp + fn)을 직접 계산하세요.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ad2c8e7",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "<details>\n",
    "<summary><strong>힌트 보기</strong></summary>\n",
    "\n",
    "2x2 혼동행렬에는 `ravel()`을 적용할 수 있습니다. 분모가 0인지도 확인하세요.\n",
    "\n",
    "</details>\n",
    "\n",
    "**정답 예제:** 먼저 직접 시도한 뒤 아래 셀을 실행하세요.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2556c4d1",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-solution"
    ]
   },
   "outputs": [],
   "source": [
    "rf_predictions = rf_model.predict(X_test_scaled)\n",
    "tn, fp, fn, tp = confusion_matrix(y_test, rf_predictions).ravel()\n",
    "manual_recall = tp / (tp + fn) if (tp + fn) else 0\n",
    "\n",
    "print(f'TN(정상을 정상): {tn}')\n",
    "print(f'FP(정상을 불량): {fp}')\n",
    "print(f'FN(불량을 정상으로 놓침): {fn}')\n",
    "print(f'TP(불량을 불량): {tp}')\n",
    "print(f'불량 Recall: {manual_recall:.3f}')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7441c078",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 실습 3 · 예측 임계값과 Recall의 관계\n",
    "\n",
    "**목표:** 불량 판정 기준을 바꿀 때 Recall과 Precision이 어떻게 달라지는지 비교합니다.\n",
    "\n",
    "아래 코드 셀의 주석을 보고 먼저 직접 작성해 보세요. 막히면 힌트를 확인하고,\n",
    "마지막에 정답 예제를 실행해 결과를 비교합니다.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "702487c6",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-exercise"
    ]
   },
   "outputs": [],
   "source": [
    "# TODO 1: 랜덤 포레스트의 불량 확률을 구하세요.\n",
    "# TODO 2: 임계값 0.3, 0.5, 0.7마다 예측값을 만드세요.\n",
    "# TODO 3: 각 임계값의 Precision과 Recall을 표로 정리하세요.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1e40c98c",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "<details>\n",
    "<summary><strong>힌트 보기</strong></summary>\n",
    "\n",
    "확률이 임계값 이상이면 1로 바꾸고 `precision_score`, `recall_score`를 계산합니다.\n",
    "\n",
    "</details>\n",
    "\n",
    "**정답 예제:** 먼저 직접 시도한 뒤 아래 셀을 실행하세요.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "31f23eb7",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-solution"
    ]
   },
   "outputs": [],
   "source": [
    "from sklearn.metrics import precision_score, recall_score\n",
    "\n",
    "rf_probabilities = rf_model.predict_proba(X_test_scaled)[:, 1]\n",
    "threshold_rows = []\n",
    "for threshold in [0.3, 0.5, 0.7]:\n",
    "    threshold_prediction = (rf_probabilities >= threshold).astype(int)\n",
    "    threshold_rows.append({\n",
    "        '임계값': threshold,\n",
    "        'Precision': precision_score(y_test, threshold_prediction, zero_division=0),\n",
    "        'Recall': recall_score(y_test, threshold_prediction, zero_division=0),\n",
    "        '불량예측수': int(threshold_prediction.sum())\n",
    "    })\n",
    "\n",
    "threshold_table = pd.DataFrame(threshold_rows).round(3)\n",
    "threshold_table\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91654d6b",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 실습 4 · 두 모델을 같은 기준으로 비교하기\n",
    "\n",
    "**목표:** 정확도만 보지 않고 불량 Precision, Recall, F1을 한 표에서 비교합니다.\n",
    "\n",
    "아래 코드 셀의 주석을 보고 먼저 직접 작성해 보세요. 막히면 힌트를 확인하고,\n",
    "마지막에 정답 예제를 실행해 결과를 비교합니다.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d9553eee",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-exercise"
    ]
   },
   "outputs": [],
   "source": [
    "# TODO 1: 로지스틱 회귀와 랜덤 포레스트의 예측값을 만드세요.\n",
    "# TODO 2: 각 모델의 Accuracy, Precision, Recall, F1을 계산하세요.\n",
    "# TODO 3: Recall이 높은 순서로 정렬하세요.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "41ae6245",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "<details>\n",
    "<summary><strong>힌트 보기</strong></summary>\n",
    "\n",
    "여러 모델을 리스트에 담아 반복하면 같은 계산 기준을 적용할 수 있습니다.\n",
    "\n",
    "</details>\n",
    "\n",
    "**정답 예제:** 먼저 직접 시도한 뒤 아래 셀을 실행하세요.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5fdc78a9",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-solution"
    ]
   },
   "outputs": [],
   "source": [
    "from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score\n",
    "\n",
    "comparison_rows = []\n",
    "for model_name, model in [\n",
    "    ('로지스틱 회귀', lr_model),\n",
    "    ('랜덤 포레스트', rf_model)\n",
    "]:\n",
    "    prediction = model.predict(X_test_scaled)\n",
    "    comparison_rows.append({\n",
    "        '모델': model_name,\n",
    "        'Accuracy': accuracy_score(y_test, prediction),\n",
    "        'Precision_불량': precision_score(y_test, prediction, zero_division=0),\n",
    "        'Recall_불량': recall_score(y_test, prediction, zero_division=0),\n",
    "        'F1_불량': f1_score(y_test, prediction, zero_division=0)\n",
    "    })\n",
    "\n",
    "model_comparison = (\n",
    "    pd.DataFrame(comparison_rows)\n",
    "    .sort_values('Recall_불량', ascending=False)\n",
    "    .round(3)\n",
    ")\n",
    "model_comparison\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5551754",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 실습 5 · 놓친 불량 사례 살펴보기\n",
    "\n",
    "**목표:** False Negative 행을 찾아 어떤 센서값을 추가로 점검할지 준비합니다.\n",
    "\n",
    "아래 코드 셀의 주석을 보고 먼저 직접 작성해 보세요. 막히면 힌트를 확인하고,\n",
    "마지막에 정답 예제를 실행해 결과를 비교합니다.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d9d4e4a6",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-exercise"
    ]
   },
   "outputs": [],
   "source": [
    "# TODO 1: y_test가 1이면서 랜덤 포레스트 예측이 0인 위치를 찾으세요.\n",
    "# TODO 2: 원래 X_test에서 해당 행을 선택하세요.\n",
    "# TODO 3: 놓친 불량 수와 센서값 일부를 출력하세요.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7c4ef0fd",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "<details>\n",
    "<summary><strong>힌트 보기</strong></summary>\n",
    "\n",
    "`(y_test == 1) & (예측 == 0)` 조건을 만들고 불리언 배열의 위치로 `X_test`를 선택합니다.\n",
    "\n",
    "</details>\n",
    "\n",
    "**정답 예제:** 먼저 직접 시도한 뒤 아래 셀을 실행하세요.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e63cabf0",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice",
     "beginner-solution"
    ]
   },
   "outputs": [],
   "source": [
    "false_negative_mask = (y_test.to_numpy() == 1) & (rf_predictions == 0)\n",
    "false_negative_cases = X_test.loc[false_negative_mask].copy()\n",
    "\n",
    "print(f'랜덤 포레스트가 놓친 불량: {len(false_negative_cases)}건')\n",
    "display_cols = top_k_cols[:5]\n",
    "if len(false_negative_cases) > 0:\n",
    "    display(false_negative_cases[display_cols].head())\n",
    "    print('이 행들은 원인 확정 대상이 아니라 추가 공정 점검 대상입니다.')\n",
    "else:\n",
    "    print('현재 테스트 데이터에서는 놓친 불량이 없습니다.')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1d44c04e",
   "metadata": {
    "generated_by": "enrich_beginner_notebooks_v1",
    "tags": [
     "beginner-practice"
    ]
   },
   "source": [
    "### 꼭 알아둘 데이터 누수\n",
    "\n",
    "실제 프로젝트에서는 **데이터를 학습용과 평가용으로 먼저 분리한 뒤** 다음 작업을\n",
    "학습 데이터에만 맞춰야 합니다.\n",
    "\n",
    "- 결측값을 채울 중앙값 계산\n",
    "- 중요한 센서 선택\n",
    "- 표준화 평균과 표준편차 계산\n",
    "\n",
    "평가 데이터의 정보를 미리 사용하면 모델 성능이 실제보다 좋아 보일 수 있습니다.\n",
    "AI에게 프로그램을 요청할 때도 이 순서를 명확히 적어 주는 것이 좋습니다.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "51a6862e",
   "metadata": {},
   "source": [
    "## 마무리\n",
    "\n",
    "- 정확도 0.933인 '항상 정상' 모델의 불량 Recall은 0입니다.\n",
    "- 임계값을 낮추면 불량 Recall이 오르지만 오탐(FP)도 늘어납니다. 임계값은 테스트가 아닌 **별도 검증 데이터**에서 정하세요.\n",
    "\n",
    "다음 노트북(`06_AI_미니프로젝트.ipynb`)에서 배운 내용을 AI와 함께 복습하고 응용해 봅니다."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
