From 798f7d908ca0772edc3841d2ecdd8027f2bec67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B0=D1=81=D1=8B=D0=BF=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= Date: Sun, 19 Apr 2026 15:52:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D0=B7=20=D0=B4=D0=B0=D1=82=D0=B0=D1=81?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- week2_analysis.ipynb | 155 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 3 deletions(-) diff --git a/week2_analysis.ipynb b/week2_analysis.ipynb index 3db0bc9..3575efc 100644 --- a/week2_analysis.ipynb +++ b/week2_analysis.ipynb @@ -51,8 +51,8 @@ "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2026-04-19T12:05:44.048568400Z", - "start_time": "2026-04-19T12:05:43.322172500Z" + "end_time": "2026-04-19T12:41:22.373444800Z", + "start_time": "2026-04-19T12:41:22.281455400Z" } }, "source": [ @@ -75,7 +75,156 @@ ] } ], - "execution_count": 1 + "execution_count": 22 + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": "## 2. Базовый анализ", + "id": "720874a9593f504f" + }, + { + "metadata": { + "ExecuteTime": { + "end_time": "2026-04-19T12:41:22.761903800Z", + "start_time": "2026-04-19T12:41:22.423624400Z" + } + }, + "cell_type": "code", + "source": [ + "print(\"Базовый анализ Stress Dataset:\\n\")\n", + "df.info()\n", + "df.describe()\n", + "print(\"\\nРаспределение по гендеру и средний возраст:\")\n", + "print(df['Gender'].value_counts())\n", + "print(f\"\\n- Средний возраст парней: {df[df['Gender'] == 0]['Age'].mean()}\")\n", + "print(f\"- Средний возраст девушек: {df[df['Gender'] == 1]['Age'].mean()}\")\n", + "\n", + "print(\"\\nБазовый анализ StressLevelDataset:\\n\")\n", + "df2.info()\n", + "df2.describe()\n", + "print('\\nРаспределение по уровню стресса:')\n", + "print(df2['stress_level'].value_counts())" + ], + "id": "516dfa5d689cfc2c", + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Базовый анализ Stress Dataset:\n", + "\n", + "\n", + "RangeIndex: 843 entries, 0 to 842\n", + "Data columns (total 26 columns):\n", + " # Column Non-Null Count Dtype\n", + "--- ------ -------------- -----\n", + " 0 Gender 843 non-null int64\n", + " 1 Age 843 non-null int64\n", + " 2 Have you recently experienced stress in your life? 843 non-null int64\n", + " 3 Have you noticed a rapid heartbeat or palpitations? 843 non-null int64\n", + " 4 Have you been dealing with anxiety or tension recently? 843 non-null int64\n", + " 5 Do you face any sleep problems or difficulties falling asleep? 843 non-null int64\n", + " 6 Have you been dealing with anxiety or tension recently?.1 843 non-null int64\n", + " 7 Have you been getting headaches more often than usual? 843 non-null int64\n", + " 8 Do you get irritated easily? 843 non-null int64\n", + " 9 Do you have trouble concentrating on your academic tasks? 843 non-null int64\n", + " 10 Have you been feeling sadness or low mood? 843 non-null int64\n", + " 11 Have you been experiencing any illness or health issues? 843 non-null int64\n", + " 12 Do you often feel lonely or isolated? 843 non-null int64\n", + " 13 Do you feel overwhelmed with your academic workload? 843 non-null int64\n", + " 14 Are you in competition with your peers, and does it affect you? 843 non-null int64\n", + " 15 Do you find that your relationship often causes you stress? 843 non-null int64\n", + " 16 Are you facing any difficulties with your professors or instructors? 843 non-null int64\n", + " 17 Is your working environment unpleasant or stressful? 843 non-null int64\n", + " 18 Do you struggle to find time for relaxation and leisure activities? 843 non-null int64\n", + " 19 Is your hostel or home environment causing you difficulties? 843 non-null int64\n", + " 20 Do you lack confidence in your academic performance? 843 non-null int64\n", + " 21 Do you lack confidence in your choice of academic subjects? 843 non-null int64\n", + " 22 Academic and extracurricular activities conflicting for you? 843 non-null int64\n", + " 23 Do you attend classes regularly? 843 non-null int64\n", + " 24 Have you gained/lost weight? 843 non-null int64\n", + " 25 Which type of stress do you primarily experience? 843 non-null str \n", + "dtypes: int64(25), str(1)\n", + "memory usage: 171.4 KB\n", + "\n", + "Распределение по гендеру и средний возраст:\n", + "Gender\n", + "0 548\n", + "1 295\n", + "Name: count, dtype: int64\n", + "\n", + "- Средний возраст парней: 20.07846715328467\n", + "- Средний возраст девушек: 20.057627118644067\n", + "\n", + "Базовый анализ StressLevelDataset:\n", + "\n", + "\n", + "RangeIndex: 1100 entries, 0 to 1099\n", + "Data columns (total 21 columns):\n", + " # Column Non-Null Count Dtype\n", + "--- ------ -------------- -----\n", + " 0 anxiety_level 1100 non-null int64\n", + " 1 self_esteem 1100 non-null int64\n", + " 2 mental_health_history 1100 non-null int64\n", + " 3 depression 1100 non-null int64\n", + " 4 headache 1100 non-null int64\n", + " 5 blood_pressure 1100 non-null int64\n", + " 6 sleep_quality 1100 non-null int64\n", + " 7 breathing_problem 1100 non-null int64\n", + " 8 noise_level 1100 non-null int64\n", + " 9 living_conditions 1100 non-null int64\n", + " 10 safety 1100 non-null int64\n", + " 11 basic_needs 1100 non-null int64\n", + " 12 academic_performance 1100 non-null int64\n", + " 13 study_load 1100 non-null int64\n", + " 14 teacher_student_relationship 1100 non-null int64\n", + " 15 future_career_concerns 1100 non-null int64\n", + " 16 social_support 1100 non-null int64\n", + " 17 peer_pressure 1100 non-null int64\n", + " 18 extracurricular_activities 1100 non-null int64\n", + " 19 bullying 1100 non-null int64\n", + " 20 stress_level 1100 non-null int64\n", + "dtypes: int64(21)\n", + "memory usage: 180.6 KB\n", + "\n", + "Распределение по уровню стресса:\n", + "stress_level\n", + "0 373\n", + "2 369\n", + "1 358\n", + "Name: count, dtype: int64\n" + ] + } + ], + "execution_count": 23 + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": [ + "### Вывод по базовому анализу\n", + "1. В исследовании участвовало: Парней: 548, Девушек: 295\n", + "2. Средний возраст обоих полов: 20 лет\n", + "3. По уровню стресса: 0: 373 (Нет стресса), 1: 358 (Небольшой стресс), 2: 369 (Сильный стресс)" + ], + "id": "34642f7cb7dae151", + "attachments": { + "9df74c62-e54f-4a47-a2cf-de8260dc1e33.png": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlkAAAAgCAIAAACuKPowAAAAT0lEQVR4Xu3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAdwPhgAABhn0ZlwAAAABJRU5ErkJggg==" + }, + "277270f1-1db4-4c92-ae1d-c06d1a2f1f97.png": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlkAAAAgCAIAAACuKPowAAAAT0lEQVR4Xu3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAdwPhgAABhn0ZlwAAAABJRU5ErkJggg==" + } + } + }, + { + "metadata": {}, + "cell_type": "code", + "outputs": [], + "execution_count": null, + "source": "", + "id": "a3a36eeb3ddab3a9" } ], "metadata": {