소스 검색

adding a new logit analysis

zahra 1 년 전
부모
커밋
a644dac925
3개의 변경된 파일101개의 추가작업 그리고 34개의 파일을 삭제
  1. 15 5
      python/Logit-Breastdataset.ipynb
  2. 0 29
      python/Logit-bankdataset.ipynb
  3. 86 0
      python/Testing real data with logit_NEW.ipynb

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 15 - 5
python/Logit-Breastdataset.ipynb


+ 0 - 29
python/Logit-bankdataset.ipynb

@@ -1,29 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import pandas as pd\n",
-    "import numpy as np\n",
-    "from sklearn import preprocessing\n",
-    "import matplotlib.pyplot as plt \n",
-    "plt.rc(\"font\", size=14)\n",
-    "from sklearn.linear_model import LogisticRegression\n",
-    "from sklearn.cross_validation import train_test_split\n",
-    "import seaborn as sns\n",
-    "sns.set(style=\"white\")\n",
-    "sns.set(style=\"whitegrid\", color_codes=True)"
-   ]
-  }
- ],
- "metadata": {
-  "language_info": {
-   "name": "python"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}

+ 86 - 0
python/Testing real data with logit_NEW.ipynb

@@ -0,0 +1,86 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "677c5e27",
+   "metadata": {},
+   "source": [
+    "Starting with MLE and logistic regression model\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "2520b517",
+   "metadata": {},
+   "source": [
+    "Prerequisites\n",
+    "Make sure you have the necessary Python libraries installed:\n",
+    "pip install numpy pandas scikit-learn scipy matplotlib statsmodels\n",
+    "\n",
+    "\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "2e1f9bfa",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import numpy as np\n",
+    "import pandas as pd\n",
+    "from scipy.io import loadmat\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "37c6709b",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "#data_path\n",
+    "data_path = \"../data/\"\n",
+    "suv_filename = data_path + \"suv_percentilesSLOthenUWM.mat\"\n",
+    "flags_filename=  data_path + \"flags_combined.mat\"\n",
+    "normal_range_filename =  data_path + \"normal_range.mat\""
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "b103dce8",
+   "metadata": {},
+   "source": [
+    "Step 1: Data Preprocessing\n",
+    "Ensure that your data is in the correct format. \n",
+    "\n",
+    "We'll assume that:\n",
+    "\n",
+    "suv_percentiles is a matrix of SUV values.\n",
+    "\n",
+    "flags_combined contains the labels (1 for adverse effects and 0 for normal controls)."
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "base",
+   "language": "python",
+   "name": "python3"
+  },
+  "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.12.7"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.