Merge pull request #641 from microsoft/update-translations
🌐 Update translations via Co-op Translator
pull/642/head
commit
3cc916ba74
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,264 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## مقدمة في الاحتمالات والإحصاء \n",
|
||||
"## الواجب \n",
|
||||
"\n",
|
||||
"في هذا الواجب، سنستخدم مجموعة بيانات مرضى السكري المأخوذة [من هنا](https://www4.stat.ncsu.edu/~boos/var.select/diabetes.html). \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import numpy as np\r\n",
|
||||
"\r\n",
|
||||
"df = pd.read_csv(\"../../data/diabetes.tsv\",sep='\\t')\r\n",
|
||||
"df.head()"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
" AGE SEX BMI BP S1 S2 S3 S4 S5 S6 Y\n",
|
||||
"0 59 2 32.1 101.0 157 93.2 38.0 4.0 4.8598 87 151\n",
|
||||
"1 48 1 21.6 87.0 183 103.2 70.0 3.0 3.8918 69 75\n",
|
||||
"2 72 2 30.5 93.0 156 93.6 41.0 4.0 4.6728 85 141\n",
|
||||
"3 24 1 25.3 84.0 198 131.4 40.0 5.0 4.8903 89 206\n",
|
||||
"4 50 1 23.0 101.0 192 125.4 52.0 4.0 4.2905 80 135"
|
||||
],
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>AGE</th>\n",
|
||||
" <th>SEX</th>\n",
|
||||
" <th>BMI</th>\n",
|
||||
" <th>BP</th>\n",
|
||||
" <th>S1</th>\n",
|
||||
" <th>S2</th>\n",
|
||||
" <th>S3</th>\n",
|
||||
" <th>S4</th>\n",
|
||||
" <th>S5</th>\n",
|
||||
" <th>S6</th>\n",
|
||||
" <th>Y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>59</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>32.1</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>157</td>\n",
|
||||
" <td>93.2</td>\n",
|
||||
" <td>38.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.8598</td>\n",
|
||||
" <td>87</td>\n",
|
||||
" <td>151</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>48</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>21.6</td>\n",
|
||||
" <td>87.0</td>\n",
|
||||
" <td>183</td>\n",
|
||||
" <td>103.2</td>\n",
|
||||
" <td>70.0</td>\n",
|
||||
" <td>3.0</td>\n",
|
||||
" <td>3.8918</td>\n",
|
||||
" <td>69</td>\n",
|
||||
" <td>75</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>72</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>30.5</td>\n",
|
||||
" <td>93.0</td>\n",
|
||||
" <td>156</td>\n",
|
||||
" <td>93.6</td>\n",
|
||||
" <td>41.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.6728</td>\n",
|
||||
" <td>85</td>\n",
|
||||
" <td>141</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>24</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>25.3</td>\n",
|
||||
" <td>84.0</td>\n",
|
||||
" <td>198</td>\n",
|
||||
" <td>131.4</td>\n",
|
||||
" <td>40.0</td>\n",
|
||||
" <td>5.0</td>\n",
|
||||
" <td>4.8903</td>\n",
|
||||
" <td>89</td>\n",
|
||||
" <td>206</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>50</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>23.0</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>192</td>\n",
|
||||
" <td>125.4</td>\n",
|
||||
" <td>52.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.2905</td>\n",
|
||||
" <td>80</td>\n",
|
||||
" <td>135</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"execution_count": 13
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"في هذا الملف، الأعمدة كالتالي: \n",
|
||||
"* العمر والجنس واضحان بذاتهما \n",
|
||||
"* BMI هو مؤشر كتلة الجسم \n",
|
||||
"* BP هو متوسط ضغط الدم \n",
|
||||
"* S1 إلى S6 هي قياسات دم مختلفة \n",
|
||||
"* Y هو مقياس نوعي لتطور المرض خلال سنة واحدة \n",
|
||||
"\n",
|
||||
"لنقم بدراسة هذا الملف باستخدام طرق الاحتمالات والإحصاء. \n",
|
||||
"\n",
|
||||
"### المهمة 1: حساب القيم المتوسطة والتباين لجميع القيم \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### المهمة 2: رسم مخططات الصندوق لـ BMI و BP و Y حسب الجنس\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### المهمة 3: ما هو توزيع العمر، الجنس، مؤشر كتلة الجسم ومتغيرات Y؟\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### المهمة 4: اختبار العلاقة بين المتغيرات المختلفة وتطور المرض (Y)\n",
|
||||
"\n",
|
||||
"> **تلميح** مصفوفة الارتباط ستوفر لك المعلومات الأكثر فائدة حول القيم التي تعتمد على بعضها البعض.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### المهمة 5: اختبار الفرضية بأن درجة تقدم مرض السكري تختلف بين الرجال والنساء\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الموثوق. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.8.8",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.8.8 64-bit (conda)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "defe9f96b3d327a6f37d795c43ad0219",
|
||||
"translation_date": "2025-09-01T23:16:23+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,80 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# دعونا نتعلم عن الطيور\n",
|
||||
"\n",
|
||||
"## مقدمة\n",
|
||||
"الطيور هي كائنات رائعة تتميز بالريش، الأجنحة، والقدرة على الطيران. بعضها لا يستطيع الطيران، لكنها لا تزال مدهشة بطرقها الخاصة.\n",
|
||||
"\n",
|
||||
"## خصائص الطيور\n",
|
||||
"- **الريش**: الريش يساعد الطيور على الطيران ويوفر لها العزل.\n",
|
||||
"- **الأجنحة**: الأجنحة هي ما يجعل الطيران ممكنًا.\n",
|
||||
"- **المنقار**: الطيور تستخدم مناقيرها لتناول الطعام، بناء الأعشاش، والدفاع عن نفسها.\n",
|
||||
"- **البيض**: الطيور تضع البيض، وهو طريقة تكاثرها.\n",
|
||||
"\n",
|
||||
"## أنواع الطيور\n",
|
||||
"هناك آلاف الأنواع من الطيور حول العالم. بعضها صغير جدًا، مثل الطائر الطنان، وبعضها كبير جدًا، مثل النسر.\n",
|
||||
"\n",
|
||||
"### الطيور المغردة\n",
|
||||
"الطيور المغردة معروفة بأصواتها الجميلة. إنها تضيف الموسيقى إلى الطبيعة.\n",
|
||||
"\n",
|
||||
"### الطيور الجارحة\n",
|
||||
"الطيور الجارحة مثل الصقور والنسور قوية وسريعة، وتستخدم مخالبها الحادة للصيد.\n",
|
||||
"\n",
|
||||
"### الطيور المائية\n",
|
||||
"الطيور المائية مثل البط والبجع تعيش بالقرب من الماء وتتميز بأقدامها المكففة.\n",
|
||||
"\n",
|
||||
"## لماذا الطيور مهمة؟\n",
|
||||
"الطيور تلعب دورًا مهمًا في النظام البيئي. إنها تساعد في تلقيح النباتات، التحكم في الحشرات، وتساهم في توازن الطبيعة.\n",
|
||||
"\n",
|
||||
"## كيف يمكننا حماية الطيور؟\n",
|
||||
"- **الحفاظ على البيئة**: تجنب تدمير مواطن الطيور.\n",
|
||||
"- **تقليل التلوث**: التلوث يؤثر على صحة الطيور.\n",
|
||||
"- **دعم المحميات الطبيعية**: المحميات توفر أماكن آمنة للطيور.\n",
|
||||
"\n",
|
||||
"## خاتمة\n",
|
||||
"الطيور ليست فقط جميلة، لكنها أيضًا جزء مهم من عالمنا. دعونا نعمل معًا لحمايتها والحفاظ عليها.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الرسمي. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.7.0",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.7.0 64-bit"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "33e5c5d3f0630388e20f2e161bd4cdf3",
|
||||
"translation_date": "2025-09-01T22:29:57+00:00",
|
||||
"source_file": "3-Data-Visualization/09-visualization-quantities/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# توزيعات الطيور\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الموثوق. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "e5272cbcbffd1ddcc09e44d3d8e7e8cd",
|
||||
"translation_date": "2025-09-01T22:46:11+00:00",
|
||||
"source_file": "3-Data-Visualization/10-visualization-distributions/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# 🍄 نسب الفطر\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الموثوق. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "397e9bbc0743761dbf72e5f16b7043e6",
|
||||
"translation_date": "2025-09-01T22:25:07+00:00",
|
||||
"source_file": "3-Data-Visualization/11-visualization-proportions/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# تصور إنتاج العسل 🍯 🐝\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية هو المصدر الموثوق. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة ناتجة عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "0f988634b7192626d91cc33b4b6388c5",
|
||||
"translation_date": "2025-09-01T22:39:36+00:00",
|
||||
"source_file": "3-Data-Visualization/12-visualization-relationships/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,140 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# بيانات سيارات الأجرة في نيويورك خلال الشتاء والصيف\n",
|
||||
"\n",
|
||||
"راجع [قاموس البيانات](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) لمعرفة المزيد عن الأعمدة التي تم توفيرها.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الرسمي. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "3bd4c20c4e8f3158f483f0f1cc543bb1",
|
||||
"translation_date": "2025-09-01T22:23:21+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/14-Introduction/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# بيانات سيارات الأجرة في نيويورك خلال الشتاء والصيف\n",
|
||||
"\n",
|
||||
"راجع [قاموس البيانات](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) لمعرفة المزيد عن الأعمدة التي تم توفيرها.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# استخدم الخلايا أدناه لإجراء تحليل البيانات الاستكشافي الخاص بك\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الموثوق. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "7bca1c1abc1e55842817b62e44e1a963",
|
||||
"translation_date": "2025-09-01T22:21:00+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# تحليل البيانات\n",
|
||||
"أمثلة على وظائف Pandas المذكورة في [الدرس](README.md).\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import glob\r\n",
|
||||
"\r\n",
|
||||
"#Loading the dataset\r\n",
|
||||
"path = '../../data/emails.csv'\r\n",
|
||||
"email_df = pd.read_csv(path)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"source": [
|
||||
"# Using Describe on the email dataset\r\n",
|
||||
"print(email_df.describe())"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" the to ect and for of \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 7.022167 6.519704 4.948276 3.059113 3.502463 2.662562 \n",
|
||||
"std 10.945522 9.801907 9.293820 6.267806 4.901372 5.443939 \n",
|
||||
"min 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 \n",
|
||||
"50% 3.000000 3.000000 2.000000 1.000000 2.000000 1.000000 \n",
|
||||
"75% 9.000000 7.750000 4.000000 3.000000 4.750000 3.000000 \n",
|
||||
"max 99.000000 88.000000 79.000000 69.000000 39.000000 57.000000 \n",
|
||||
"\n",
|
||||
" a you in on is this \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 57.017241 2.394089 10.817734 11.591133 5.901478 1.485222 \n",
|
||||
"std 78.868243 4.067015 19.050972 16.407175 8.793103 2.912473 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 15.000000 0.000000 1.250000 3.000000 1.000000 0.000000 \n",
|
||||
"50% 29.000000 1.000000 5.000000 6.000000 3.000000 0.000000 \n",
|
||||
"75% 61.000000 3.000000 12.000000 13.000000 7.000000 2.000000 \n",
|
||||
"max 843.000000 31.000000 223.000000 125.000000 61.000000 24.000000 \n",
|
||||
"\n",
|
||||
" i be that will \n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 47.155172 2.950739 1.034483 0.955665 \n",
|
||||
"std 71.043009 4.297865 1.904846 2.042271 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 11.000000 1.000000 0.000000 0.000000 \n",
|
||||
"50% 24.000000 1.000000 0.000000 0.000000 \n",
|
||||
"75% 50.750000 3.000000 1.000000 1.000000 \n",
|
||||
"max 754.000000 40.000000 14.000000 24.000000 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"source": [
|
||||
"# Sampling 10 emails\r\n",
|
||||
"print(email_df.sample(10))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"150 Email 151 0 1 2 0 3 0 15 0 0 5 0 0 7 \n",
|
||||
"380 Email 5147 0 3 2 0 0 0 7 0 1 1 0 0 3 \n",
|
||||
"19 Email 20 3 4 11 0 4 2 32 1 1 3 9 5 25 \n",
|
||||
"300 Email 301 2 1 1 0 1 1 15 2 2 3 2 0 8 \n",
|
||||
"307 Email 308 0 0 1 0 0 0 1 0 1 0 0 0 2 \n",
|
||||
"167 Email 168 2 2 2 1 5 1 24 2 5 6 4 0 30 \n",
|
||||
"320 Email 321 10 12 4 6 8 6 187 5 26 28 23 2 171 \n",
|
||||
"61 Email 62 0 1 1 0 4 1 15 4 4 3 3 0 19 \n",
|
||||
"26 Email 27 5 4 1 1 4 4 51 0 8 6 6 2 44 \n",
|
||||
"73 Email 74 0 0 1 0 0 0 7 0 4 3 0 0 6 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"150 1 0 0 \n",
|
||||
"380 0 0 0 \n",
|
||||
"19 3 0 1 \n",
|
||||
"300 0 0 0 \n",
|
||||
"307 0 0 0 \n",
|
||||
"167 2 0 0 \n",
|
||||
"320 5 1 1 \n",
|
||||
"61 2 0 0 \n",
|
||||
"26 6 0 0 \n",
|
||||
"73 0 0 0 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"source": [
|
||||
"# Returns rows where there are more occurrences of \"to\" than \"the\"\r\n",
|
||||
"print(email_df.query('the < to'))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"1 Email 2 8 13 24 6 6 2 102 1 18 21 13 0 61 \n",
|
||||
"3 Email 4 0 5 22 0 5 1 51 2 1 5 9 2 16 \n",
|
||||
"5 Email 6 4 5 1 4 2 3 45 1 16 12 8 1 52 \n",
|
||||
"7 Email 8 0 2 2 3 1 2 21 6 2 6 2 0 28 \n",
|
||||
"13 Email 14 4 5 7 1 5 1 37 1 8 8 6 1 43 \n",
|
||||
".. ... ... .. ... ... ... .. ... ... .. .. .. ... .. \n",
|
||||
"390 Email 5157 4 13 1 0 3 1 48 2 8 26 9 1 45 \n",
|
||||
"393 Email 5160 2 13 1 0 2 1 38 2 7 24 6 1 34 \n",
|
||||
"396 Email 5163 2 3 1 2 1 2 32 0 7 3 2 0 26 \n",
|
||||
"404 Email 5171 2 7 1 0 2 1 28 2 8 11 7 1 39 \n",
|
||||
"405 Email 5172 22 24 5 1 6 5 148 8 23 13 5 4 99 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"1 4 2 0 \n",
|
||||
"3 2 0 0 \n",
|
||||
"5 2 0 0 \n",
|
||||
"7 1 0 1 \n",
|
||||
"13 1 0 1 \n",
|
||||
".. .. ... ... \n",
|
||||
"390 1 0 0 \n",
|
||||
"393 1 0 0 \n",
|
||||
"396 3 0 0 \n",
|
||||
"404 1 0 0 \n",
|
||||
"405 6 4 1 \n",
|
||||
"\n",
|
||||
"[169 rows x 17 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو معلومات غير دقيقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الرسمي. للحصول على معلومات حاسمة، يُوصى بالاستعانة بترجمة بشرية احترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.9.7",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "9d102c8c3cdbc8ea4e92fc32593462c6",
|
||||
"translation_date": "2025-09-01T22:19:12+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,323 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# علم البيانات في السحابة: طريقة \"Azure ML SDK\"\n",
|
||||
"\n",
|
||||
"## المقدمة\n",
|
||||
"\n",
|
||||
"في هذا الدفتر، سنتعلم كيفية استخدام Azure ML SDK لتدريب نموذج، نشره، واستهلاكه من خلال Azure ML.\n",
|
||||
"\n",
|
||||
"المتطلبات المسبقة:\n",
|
||||
"1. قمت بإنشاء مساحة عمل Azure ML.\n",
|
||||
"2. قمت بتحميل [مجموعة بيانات فشل القلب](https://www.kaggle.com/andrewmvd/heart-failure-clinical-data) إلى Azure ML.\n",
|
||||
"3. قمت برفع هذا الدفتر إلى Azure ML Studio.\n",
|
||||
"\n",
|
||||
"الخطوات التالية هي:\n",
|
||||
"\n",
|
||||
"1. إنشاء تجربة في مساحة عمل موجودة.\n",
|
||||
"2. إنشاء مجموعة حوسبة.\n",
|
||||
"3. تحميل مجموعة البيانات.\n",
|
||||
"4. إعداد AutoML باستخدام AutoMLConfig.\n",
|
||||
"5. تشغيل تجربة AutoML.\n",
|
||||
"6. استكشاف النتائج والحصول على أفضل نموذج.\n",
|
||||
"7. تسجيل أفضل نموذج.\n",
|
||||
"8. نشر أفضل نموذج.\n",
|
||||
"9. استهلاك نقطة النهاية.\n",
|
||||
"\n",
|
||||
"## استيرادات خاصة بـ Azure Machine Learning SDK\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"from azureml.core import Workspace, Experiment\n",
|
||||
"from azureml.core.compute import AmlCompute\n",
|
||||
"from azureml.train.automl import AutoMLConfig\n",
|
||||
"from azureml.widgets import RunDetails\n",
|
||||
"from azureml.core.model import InferenceConfig, Model\n",
|
||||
"from azureml.core.webservice import AciWebservice"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## تهيئة مساحة العمل \n",
|
||||
"تهيئة كائن مساحة العمل من التكوين المحفوظ. تأكد من وجود ملف التكوين في .\\config.json \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"ws = Workspace.from_config()\n",
|
||||
"print(ws.name, ws.resource_group, ws.location, ws.subscription_id, sep = '\\n')"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## إنشاء تجربة Azure ML\n",
|
||||
"\n",
|
||||
"لنقم بإنشاء تجربة باسم 'aml-experiment' في مساحة العمل التي قمنا بتفعيلها للتو.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"experiment_name = 'aml-experiment'\n",
|
||||
"experiment = Experiment(ws, experiment_name)\n",
|
||||
"experiment"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## إنشاء مجموعة حوسبة \n",
|
||||
"ستحتاج إلى إنشاء [هدف الحوسبة](https://docs.microsoft.com/azure/machine-learning/concept-azure-machine-learning-architecture#compute-target) لتشغيل AutoML الخاص بك. \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"aml_name = \"heart-f-cluster\"\n",
|
||||
"try:\n",
|
||||
" aml_compute = AmlCompute(ws, aml_name)\n",
|
||||
" print('Found existing AML compute context.')\n",
|
||||
"except:\n",
|
||||
" print('Creating new AML compute context.')\n",
|
||||
" aml_config = AmlCompute.provisioning_configuration(vm_size = \"Standard_D2_v2\", min_nodes=1, max_nodes=3)\n",
|
||||
" aml_compute = AmlCompute.create(ws, name = aml_name, provisioning_configuration = aml_config)\n",
|
||||
" aml_compute.wait_for_completion(show_output = True)\n",
|
||||
"\n",
|
||||
"cts = ws.compute_targets\n",
|
||||
"compute_target = cts[aml_name]"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## البيانات \n",
|
||||
"تأكد من أنك قد قمت برفع مجموعة البيانات إلى Azure ML وأن المفتاح يحمل نفس اسم مجموعة البيانات.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"key = 'heart-failure-records'\n",
|
||||
"dataset = ws.datasets[key]\n",
|
||||
"df = dataset.to_pandas_dataframe()\n",
|
||||
"df.describe()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## إعداد AutoML\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"automl_settings = {\n",
|
||||
" \"experiment_timeout_minutes\": 20,\n",
|
||||
" \"max_concurrent_iterations\": 3,\n",
|
||||
" \"primary_metric\" : 'AUC_weighted'\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"automl_config = AutoMLConfig(compute_target=compute_target,\n",
|
||||
" task = \"classification\",\n",
|
||||
" training_data=dataset,\n",
|
||||
" label_column_name=\"DEATH_EVENT\",\n",
|
||||
" enable_early_stopping= True,\n",
|
||||
" featurization= 'auto',\n",
|
||||
" debug_log = \"automl_errors.log\",\n",
|
||||
" **automl_settings\n",
|
||||
" )"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## تشغيل AutoML\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"remote_run = experiment.submit(automl_config)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"RunDetails(remote_run).show()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run, fitted_model = remote_run.get_output()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run.get_properties()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"model_name = best_run.properties['model_name']\n",
|
||||
"script_file_name = 'inference/score.py'\n",
|
||||
"best_run.download_file('outputs/scoring_file_v_1_0_0.py', 'inference/score.py')\n",
|
||||
"description = \"aml heart failure project sdk\"\n",
|
||||
"model = best_run.register_model(model_name = model_name,\n",
|
||||
" description = description,\n",
|
||||
" tags = None)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## نشر أفضل نموذج\n",
|
||||
"\n",
|
||||
"قم بتشغيل الكود التالي لنشر أفضل نموذج. يمكنك رؤية حالة النشر في بوابة Azure ML. قد تستغرق هذه الخطوة بضع دقائق.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"inference_config = InferenceConfig(entry_script=script_file_name, environment=best_run.get_environment())\n",
|
||||
"\n",
|
||||
"aciconfig = AciWebservice.deploy_configuration(cpu_cores = 1,\n",
|
||||
" memory_gb = 1,\n",
|
||||
" tags = {'type': \"automl-heart-failure-prediction\"},\n",
|
||||
" description = 'Sample service for AutoML Heart Failure Prediction')\n",
|
||||
"\n",
|
||||
"aci_service_name = 'automl-hf-sdk'\n",
|
||||
"aci_service = Model.deploy(ws, aci_service_name, [model], inference_config, aciconfig)\n",
|
||||
"aci_service.wait_for_deployment(True)\n",
|
||||
"print(aci_service.state)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## استخدام نقطة النهاية\n",
|
||||
"يمكنك إضافة المدخلات إلى نموذج الإدخال التالي.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"data = {\n",
|
||||
" \"data\":\n",
|
||||
" [\n",
|
||||
" {\n",
|
||||
" 'age': \"60\",\n",
|
||||
" 'anaemia': \"false\",\n",
|
||||
" 'creatinine_phosphokinase': \"500\",\n",
|
||||
" 'diabetes': \"false\",\n",
|
||||
" 'ejection_fraction': \"38\",\n",
|
||||
" 'high_blood_pressure': \"false\",\n",
|
||||
" 'platelets': \"260000\",\n",
|
||||
" 'serum_creatinine': \"1.40\",\n",
|
||||
" 'serum_sodium': \"137\",\n",
|
||||
" 'sex': \"false\",\n",
|
||||
" 'smoking': \"false\",\n",
|
||||
" 'time': \"130\",\n",
|
||||
" },\n",
|
||||
" ],\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"test_sample = str.encode(json.dumps(data))"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"response = aci_service.run(input_data=test_sample)\n",
|
||||
"response"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**إخلاء المسؤولية**: \nتم ترجمة هذا المستند باستخدام خدمة الترجمة بالذكاء الاصطناعي [Co-op Translator](https://github.com/Azure/co-op-translator). بينما نسعى لتحقيق الدقة، يرجى العلم أن الترجمات الآلية قد تحتوي على أخطاء أو عدم دقة. يجب اعتبار المستند الأصلي بلغته الأصلية المصدر الرسمي. للحصول على معلومات حاسمة، يُوصى بالترجمة البشرية الاحترافية. نحن غير مسؤولين عن أي سوء فهم أو تفسيرات خاطئة تنشأ عن استخدام هذه الترجمة.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "af42669556d5dc19fc4cc3866f7d2597",
|
||||
"translation_date": "2025-09-01T20:02:46+00:00",
|
||||
"source_file": "5-Data-Science-In-Cloud/19-Azure/notebook.ipynb",
|
||||
"language_code": "ar"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,84 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# চলুন পাখিদের সম্পর্কে জানি\n",
|
||||
"\n",
|
||||
"## পাখি কী?\n",
|
||||
"\n",
|
||||
"পাখি হলো উষ্ণ রক্তের প্রাণী যাদের দেহে পালক থাকে এবং তারা ডিম পাড়ে। তাদের হাড়গুলো ফাঁপা থাকে, যা তাদের উড়তে সাহায্য করে।\n",
|
||||
"\n",
|
||||
"## পাখিদের বৈশিষ্ট্য\n",
|
||||
"\n",
|
||||
"- **পালক:** পাখিদের দেহে পালক থাকে যা তাদের তাপমাত্রা নিয়ন্ত্রণে সাহায্য করে এবং উড়ার সময় ভারসাম্য বজায় রাখে।\n",
|
||||
"- **ডানা:** পাখিদের ডানা থাকে যা তাদের উড়তে সাহায্য করে।\n",
|
||||
"- **চঞ্চু:** পাখিদের দাঁত নেই, তবে তাদের চঞ্চু থাকে যা খাবার খেতে এবং অন্যান্য কাজ করতে ব্যবহৃত হয়।\n",
|
||||
"\n",
|
||||
"## পাখিদের প্রকারভেদ\n",
|
||||
"\n",
|
||||
"পাখিদের বিভিন্ন প্রজাতি রয়েছে। কিছু সাধারণ প্রজাতি হলো:\n",
|
||||
"\n",
|
||||
"1. **গায়ক পাখি:** যেমন, দোয়েল, কোকিল। এরা মিষ্টি সুরে গান গায়।\n",
|
||||
"2. **শিকারি পাখি:** যেমন, বাজপাখি, ঈগল। এরা শিকার ধরতে দক্ষ।\n",
|
||||
"3. **জলচর পাখি:** যেমন, হাঁস, রাজহাঁস। এরা পানিতে সাঁতার কাটতে পারে।\n",
|
||||
"\n",
|
||||
"## পাখিদের বাসস্থান\n",
|
||||
"\n",
|
||||
"পাখিরা বিভিন্ন জায়গায় বাস করে। কিছু পাখি গাছে বাসা বাঁধে, কিছু পাখি পাহাড়ে বা মাটিতে বাস করে। তাদের বাসস্থান তাদের প্রজাতি এবং পরিবেশের উপর নির্ভর করে।\n",
|
||||
"\n",
|
||||
"## পাখিদের খাদ্যাভ্যাস\n",
|
||||
"\n",
|
||||
"পাখিদের খাদ্যাভ্যাস তাদের প্রজাতি অনুযায়ী ভিন্ন হয়। কিছু পাখি ফল এবং বীজ খায়, কিছু পাখি পোকামাকড় বা ছোট প্রাণী শিকার করে।\n",
|
||||
"\n",
|
||||
"[!TIP]\n",
|
||||
"পাখিদের পর্যবেক্ষণ করতে চাইলে একটি দূরবীন ব্যবহার করুন। এটি আপনাকে তাদের আচরণ ভালোভাবে দেখতে সাহায্য করবে।\n",
|
||||
"\n",
|
||||
"## পাখিদের গুরুত্ব\n",
|
||||
"\n",
|
||||
"পাখিরা পরিবেশের ভারসাম্য বজায় রাখতে গুরুত্বপূর্ণ ভূমিকা পালন করে। তারা ফুলের পরাগায়ন করে, কীটপতঙ্গ নিয়ন্ত্রণ করে এবং প্রকৃতিকে সুন্দর করে তোলে।\n",
|
||||
"\n",
|
||||
"[!NOTE]\n",
|
||||
"পাখিদের প্রতি সদয় হোন এবং তাদের বাসস্থান নষ্ট করবেন না।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসাধ্য সঠিকতা নিশ্চিত করার চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা দায়বদ্ধ থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.7.0",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.7.0 64-bit"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "33e5c5d3f0630388e20f2e161bd4cdf3",
|
||||
"translation_date": "2025-09-01T22:30:06+00:00",
|
||||
"source_file": "3-Data-Visualization/09-visualization-quantities/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# পাখির বিতরণ\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসম্ভব সঠিক অনুবাদ প্রদানের চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা দায়বদ্ধ থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "e5272cbcbffd1ddcc09e44d3d8e7e8cd",
|
||||
"translation_date": "2025-09-01T22:46:15+00:00",
|
||||
"source_file": "3-Data-Visualization/10-visualization-distributions/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# 🍄 মাশরুমের অনুপাত\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসাধ্য সঠিকতার জন্য চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা দায়বদ্ধ থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "397e9bbc0743761dbf72e5f16b7043e6",
|
||||
"translation_date": "2025-09-01T22:25:11+00:00",
|
||||
"source_file": "3-Data-Visualization/11-visualization-proportions/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# মধু উৎপাদনের চিত্রায়ন 🍯 🐝\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসম্ভব সঠিক অনুবাদ প্রদানের চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা দায়বদ্ধ থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "0f988634b7192626d91cc33b4b6388c5",
|
||||
"translation_date": "2025-09-01T22:39:41+00:00",
|
||||
"source_file": "3-Data-Visualization/12-visualization-relationships/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,140 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# শীত এবং গ্রীষ্মে NYC ট্যাক্সি ডেটা\n",
|
||||
"\n",
|
||||
"কলামগুলির সম্পর্কে আরও জানতে [ডেটা ডিকশনারি](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) দেখুন।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসম্ভব সঠিক অনুবাদ প্রদানের চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা তার জন্য দায়ী থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "3bd4c20c4e8f3158f483f0f1cc543bb1",
|
||||
"translation_date": "2025-09-01T22:23:26+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/14-Introduction/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# শীত এবং গ্রীষ্মে NYC ট্যাক্সি ডেটা\n",
|
||||
"\n",
|
||||
"কলামগুলির সম্পর্কে আরও জানতে [ডেটা ডিকশনারি](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) দেখুন।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# আপনার নিজস্ব অনুসন্ধানমূলক ডেটা বিশ্লেষণ করতে নিচের সেলগুলো ব্যবহার করুন\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসম্ভব সঠিক অনুবাদ প্রদানের চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা তার জন্য দায়ী থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "7bca1c1abc1e55842817b62e44e1a963",
|
||||
"translation_date": "2025-09-01T22:21:07+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# ডেটা বিশ্লেষণ\n",
|
||||
"[পাঠে](README.md) উল্লেখিত Pandas ফাংশনগুলোর উদাহরণ।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import glob\r\n",
|
||||
"\r\n",
|
||||
"#Loading the dataset\r\n",
|
||||
"path = '../../data/emails.csv'\r\n",
|
||||
"email_df = pd.read_csv(path)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"source": [
|
||||
"# Using Describe on the email dataset\r\n",
|
||||
"print(email_df.describe())"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" the to ect and for of \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 7.022167 6.519704 4.948276 3.059113 3.502463 2.662562 \n",
|
||||
"std 10.945522 9.801907 9.293820 6.267806 4.901372 5.443939 \n",
|
||||
"min 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 \n",
|
||||
"50% 3.000000 3.000000 2.000000 1.000000 2.000000 1.000000 \n",
|
||||
"75% 9.000000 7.750000 4.000000 3.000000 4.750000 3.000000 \n",
|
||||
"max 99.000000 88.000000 79.000000 69.000000 39.000000 57.000000 \n",
|
||||
"\n",
|
||||
" a you in on is this \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 57.017241 2.394089 10.817734 11.591133 5.901478 1.485222 \n",
|
||||
"std 78.868243 4.067015 19.050972 16.407175 8.793103 2.912473 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 15.000000 0.000000 1.250000 3.000000 1.000000 0.000000 \n",
|
||||
"50% 29.000000 1.000000 5.000000 6.000000 3.000000 0.000000 \n",
|
||||
"75% 61.000000 3.000000 12.000000 13.000000 7.000000 2.000000 \n",
|
||||
"max 843.000000 31.000000 223.000000 125.000000 61.000000 24.000000 \n",
|
||||
"\n",
|
||||
" i be that will \n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 47.155172 2.950739 1.034483 0.955665 \n",
|
||||
"std 71.043009 4.297865 1.904846 2.042271 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 11.000000 1.000000 0.000000 0.000000 \n",
|
||||
"50% 24.000000 1.000000 0.000000 0.000000 \n",
|
||||
"75% 50.750000 3.000000 1.000000 1.000000 \n",
|
||||
"max 754.000000 40.000000 14.000000 24.000000 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"source": [
|
||||
"# Sampling 10 emails\r\n",
|
||||
"print(email_df.sample(10))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"150 Email 151 0 1 2 0 3 0 15 0 0 5 0 0 7 \n",
|
||||
"380 Email 5147 0 3 2 0 0 0 7 0 1 1 0 0 3 \n",
|
||||
"19 Email 20 3 4 11 0 4 2 32 1 1 3 9 5 25 \n",
|
||||
"300 Email 301 2 1 1 0 1 1 15 2 2 3 2 0 8 \n",
|
||||
"307 Email 308 0 0 1 0 0 0 1 0 1 0 0 0 2 \n",
|
||||
"167 Email 168 2 2 2 1 5 1 24 2 5 6 4 0 30 \n",
|
||||
"320 Email 321 10 12 4 6 8 6 187 5 26 28 23 2 171 \n",
|
||||
"61 Email 62 0 1 1 0 4 1 15 4 4 3 3 0 19 \n",
|
||||
"26 Email 27 5 4 1 1 4 4 51 0 8 6 6 2 44 \n",
|
||||
"73 Email 74 0 0 1 0 0 0 7 0 4 3 0 0 6 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"150 1 0 0 \n",
|
||||
"380 0 0 0 \n",
|
||||
"19 3 0 1 \n",
|
||||
"300 0 0 0 \n",
|
||||
"307 0 0 0 \n",
|
||||
"167 2 0 0 \n",
|
||||
"320 5 1 1 \n",
|
||||
"61 2 0 0 \n",
|
||||
"26 6 0 0 \n",
|
||||
"73 0 0 0 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"source": [
|
||||
"# Returns rows where there are more occurrences of \"to\" than \"the\"\r\n",
|
||||
"print(email_df.query('the < to'))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"1 Email 2 8 13 24 6 6 2 102 1 18 21 13 0 61 \n",
|
||||
"3 Email 4 0 5 22 0 5 1 51 2 1 5 9 2 16 \n",
|
||||
"5 Email 6 4 5 1 4 2 3 45 1 16 12 8 1 52 \n",
|
||||
"7 Email 8 0 2 2 3 1 2 21 6 2 6 2 0 28 \n",
|
||||
"13 Email 14 4 5 7 1 5 1 37 1 8 8 6 1 43 \n",
|
||||
".. ... ... .. ... ... ... .. ... ... .. .. .. ... .. \n",
|
||||
"390 Email 5157 4 13 1 0 3 1 48 2 8 26 9 1 45 \n",
|
||||
"393 Email 5160 2 13 1 0 2 1 38 2 7 24 6 1 34 \n",
|
||||
"396 Email 5163 2 3 1 2 1 2 32 0 7 3 2 0 26 \n",
|
||||
"404 Email 5171 2 7 1 0 2 1 28 2 8 11 7 1 39 \n",
|
||||
"405 Email 5172 22 24 5 1 6 5 148 8 23 13 5 4 99 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"1 4 2 0 \n",
|
||||
"3 2 0 0 \n",
|
||||
"5 2 0 0 \n",
|
||||
"7 1 0 1 \n",
|
||||
"13 1 0 1 \n",
|
||||
".. .. ... ... \n",
|
||||
"390 1 0 0 \n",
|
||||
"393 1 0 0 \n",
|
||||
"396 3 0 0 \n",
|
||||
"404 1 0 0 \n",
|
||||
"405 6 4 1 \n",
|
||||
"\n",
|
||||
"[169 rows x 17 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসাধ্য সঠিক অনুবাদের চেষ্টা করি, তবে দয়া করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। নথিটির মূল ভাষায় লেখা সংস্করণটিকেই প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে সৃষ্ট কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যার জন্য আমরা দায়ী নই।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.9.7",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "9d102c8c3cdbc8ea4e92fc32593462c6",
|
||||
"translation_date": "2025-09-01T22:19:18+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,323 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# ক্লাউডে ডেটা সায়েন্স: \"Azure ML SDK\" পদ্ধতি\n",
|
||||
"\n",
|
||||
"## ভূমিকা\n",
|
||||
"\n",
|
||||
"এই নোটবুকে, আমরা শিখব কীভাবে Azure ML SDK ব্যবহার করে একটি মডেল প্রশিক্ষণ, স্থাপন এবং ব্যবহার করা যায়।\n",
|
||||
"\n",
|
||||
"প্রয়োজনীয়তা:\n",
|
||||
"1. আপনি একটি Azure ML ওয়ার্কস্পেস তৈরি করেছেন।\n",
|
||||
"2. আপনি [Heart Failure dataset](https://www.kaggle.com/andrewmvd/heart-failure-clinical-data) Azure ML-এ লোড করেছেন।\n",
|
||||
"3. আপনি এই নোটবুকটি Azure ML Studio-তে আপলোড করেছেন।\n",
|
||||
"\n",
|
||||
"পরবর্তী ধাপগুলো:\n",
|
||||
"\n",
|
||||
"1. একটি বিদ্যমান ওয়ার্কস্পেসে একটি এক্সপেরিমেন্ট তৈরি করুন।\n",
|
||||
"2. একটি কম্পিউট ক্লাস্টার তৈরি করুন।\n",
|
||||
"3. ডেটাসেট লোড করুন।\n",
|
||||
"4. AutoMLConfig ব্যবহার করে AutoML কনফিগার করুন।\n",
|
||||
"5. AutoML এক্সপেরিমেন্ট চালান।\n",
|
||||
"6. ফলাফল বিশ্লেষণ করুন এবং সেরা মডেলটি পান।\n",
|
||||
"7. সেরা মডেলটি রেজিস্টার করুন।\n",
|
||||
"8. সেরা মডেলটি স্থাপন করুন।\n",
|
||||
"9. এন্ডপয়েন্ট ব্যবহার করুন।\n",
|
||||
"\n",
|
||||
"## Azure Machine Learning SDK-সম্পর্কিত ইমপোর্টসমূহ\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"from azureml.core import Workspace, Experiment\n",
|
||||
"from azureml.core.compute import AmlCompute\n",
|
||||
"from azureml.train.automl import AutoMLConfig\n",
|
||||
"from azureml.widgets import RunDetails\n",
|
||||
"from azureml.core.model import InferenceConfig, Model\n",
|
||||
"from azureml.core.webservice import AciWebservice"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## ওয়ার্কস্পেস আরম্ভ করুন \n",
|
||||
"সংরক্ষিত কনফিগারেশন থেকে একটি ওয়ার্কস্পেস অবজেক্ট আরম্ভ করুন। নিশ্চিত করুন যে কনফিগারেশন ফাইলটি .\\config.json এ উপস্থিত আছে। \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"ws = Workspace.from_config()\n",
|
||||
"print(ws.name, ws.resource_group, ws.location, ws.subscription_id, sep = '\\n')"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## একটি Azure ML পরীক্ষা তৈরি করুন\n",
|
||||
"\n",
|
||||
"চলুন আমরা 'aml-experiment' নামে একটি পরীক্ষা তৈরি করি সেই কর্মক্ষেত্রে যা আমরা ঠিক এখনই আরম্ভ করেছি।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"experiment_name = 'aml-experiment'\n",
|
||||
"experiment = Experiment(ws, experiment_name)\n",
|
||||
"experiment"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## একটি কম্পিউট ক্লাস্টার তৈরি করুন \n",
|
||||
"আপনার AutoML রান-এর জন্য একটি [কম্পিউট টার্গেট](https://docs.microsoft.com/azure/machine-learning/concept-azure-machine-learning-architecture#compute-target) তৈরি করতে হবে। \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"aml_name = \"heart-f-cluster\"\n",
|
||||
"try:\n",
|
||||
" aml_compute = AmlCompute(ws, aml_name)\n",
|
||||
" print('Found existing AML compute context.')\n",
|
||||
"except:\n",
|
||||
" print('Creating new AML compute context.')\n",
|
||||
" aml_config = AmlCompute.provisioning_configuration(vm_size = \"Standard_D2_v2\", min_nodes=1, max_nodes=3)\n",
|
||||
" aml_compute = AmlCompute.create(ws, name = aml_name, provisioning_configuration = aml_config)\n",
|
||||
" aml_compute.wait_for_completion(show_output = True)\n",
|
||||
"\n",
|
||||
"cts = ws.compute_targets\n",
|
||||
"compute_target = cts[aml_name]"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## ডেটা\n",
|
||||
"নিশ্চিত করুন যে আপনি ডেটাসেটটি Azure ML-এ আপলোড করেছেন এবং যে কীটি ডেটাসেটের নামের সাথে একই।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"key = 'heart-failure-records'\n",
|
||||
"dataset = ws.datasets[key]\n",
|
||||
"df = dataset.to_pandas_dataframe()\n",
|
||||
"df.describe()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## অটোএমএল কনফিগারেশন\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"automl_settings = {\n",
|
||||
" \"experiment_timeout_minutes\": 20,\n",
|
||||
" \"max_concurrent_iterations\": 3,\n",
|
||||
" \"primary_metric\" : 'AUC_weighted'\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"automl_config = AutoMLConfig(compute_target=compute_target,\n",
|
||||
" task = \"classification\",\n",
|
||||
" training_data=dataset,\n",
|
||||
" label_column_name=\"DEATH_EVENT\",\n",
|
||||
" enable_early_stopping= True,\n",
|
||||
" featurization= 'auto',\n",
|
||||
" debug_log = \"automl_errors.log\",\n",
|
||||
" **automl_settings\n",
|
||||
" )"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## অটোএমএল রান\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"remote_run = experiment.submit(automl_config)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"RunDetails(remote_run).show()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run, fitted_model = remote_run.get_output()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run.get_properties()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"model_name = best_run.properties['model_name']\n",
|
||||
"script_file_name = 'inference/score.py'\n",
|
||||
"best_run.download_file('outputs/scoring_file_v_1_0_0.py', 'inference/score.py')\n",
|
||||
"description = \"aml heart failure project sdk\"\n",
|
||||
"model = best_run.register_model(model_name = model_name,\n",
|
||||
" description = description,\n",
|
||||
" tags = None)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## সেরা মডেলটি ডিপ্লয় করুন\n",
|
||||
"\n",
|
||||
"সেরা মডেলটি ডিপ্লয় করতে নিচের কোডটি চালান। আপনি Azure ML পোর্টালে ডিপ্লয়মেন্টের অবস্থা দেখতে পারবেন। এই ধাপটি সম্পন্ন হতে কয়েক মিনিট সময় লাগতে পারে।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"inference_config = InferenceConfig(entry_script=script_file_name, environment=best_run.get_environment())\n",
|
||||
"\n",
|
||||
"aciconfig = AciWebservice.deploy_configuration(cpu_cores = 1,\n",
|
||||
" memory_gb = 1,\n",
|
||||
" tags = {'type': \"automl-heart-failure-prediction\"},\n",
|
||||
" description = 'Sample service for AutoML Heart Failure Prediction')\n",
|
||||
"\n",
|
||||
"aci_service_name = 'automl-hf-sdk'\n",
|
||||
"aci_service = Model.deploy(ws, aci_service_name, [model], inference_config, aciconfig)\n",
|
||||
"aci_service.wait_for_deployment(True)\n",
|
||||
"print(aci_service.state)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## এন্ডপয়েন্ট ব্যবহার করুন\n",
|
||||
"আপনি নিম্নলিখিত ইনপুট নমুনায় ইনপুট যোগ করতে পারেন।\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"data = {\n",
|
||||
" \"data\":\n",
|
||||
" [\n",
|
||||
" {\n",
|
||||
" 'age': \"60\",\n",
|
||||
" 'anaemia': \"false\",\n",
|
||||
" 'creatinine_phosphokinase': \"500\",\n",
|
||||
" 'diabetes': \"false\",\n",
|
||||
" 'ejection_fraction': \"38\",\n",
|
||||
" 'high_blood_pressure': \"false\",\n",
|
||||
" 'platelets': \"260000\",\n",
|
||||
" 'serum_creatinine': \"1.40\",\n",
|
||||
" 'serum_sodium': \"137\",\n",
|
||||
" 'sex': \"false\",\n",
|
||||
" 'smoking': \"false\",\n",
|
||||
" 'time': \"130\",\n",
|
||||
" },\n",
|
||||
" ],\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"test_sample = str.encode(json.dumps(data))"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"response = aci_service.run(input_data=test_sample)\n",
|
||||
"response"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**অস্বীকৃতি**: \nএই নথিটি AI অনুবাদ পরিষেবা [Co-op Translator](https://github.com/Azure/co-op-translator) ব্যবহার করে অনুবাদ করা হয়েছে। আমরা যথাসাধ্য সঠিকতা নিশ্চিত করার চেষ্টা করি, তবে অনুগ্রহ করে মনে রাখবেন যে স্বয়ংক্রিয় অনুবাদে ত্রুটি বা অসঙ্গতি থাকতে পারে। মূল ভাষায় থাকা নথিটিকে প্রামাণিক উৎস হিসেবে বিবেচনা করা উচিত। গুরুত্বপূর্ণ তথ্যের জন্য, পেশাদার মানব অনুবাদ সুপারিশ করা হয়। এই অনুবাদ ব্যবহারের ফলে কোনো ভুল বোঝাবুঝি বা ভুল ব্যাখ্যা হলে আমরা দায়বদ্ধ থাকব না।\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "af42669556d5dc19fc4cc3866f7d2597",
|
||||
"translation_date": "2025-09-01T20:03:08+00:00",
|
||||
"source_file": "5-Data-Science-In-Cloud/19-Azure/notebook.ipynb",
|
||||
"language_code": "bn"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,260 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Introdução à Probabilidade e Estatística\n",
|
||||
"## Tarefa\n",
|
||||
"\n",
|
||||
"Nesta tarefa, usaremos o conjunto de dados de pacientes com diabetes retirado [deste link](https://www4.stat.ncsu.edu/~boos/var.select/diabetes.html).\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import numpy as np\r\n",
|
||||
"\r\n",
|
||||
"df = pd.read_csv(\"../../data/diabetes.tsv\",sep='\\t')\r\n",
|
||||
"df.head()"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
" AGE SEX BMI BP S1 S2 S3 S4 S5 S6 Y\n",
|
||||
"0 59 2 32.1 101.0 157 93.2 38.0 4.0 4.8598 87 151\n",
|
||||
"1 48 1 21.6 87.0 183 103.2 70.0 3.0 3.8918 69 75\n",
|
||||
"2 72 2 30.5 93.0 156 93.6 41.0 4.0 4.6728 85 141\n",
|
||||
"3 24 1 25.3 84.0 198 131.4 40.0 5.0 4.8903 89 206\n",
|
||||
"4 50 1 23.0 101.0 192 125.4 52.0 4.0 4.2905 80 135"
|
||||
],
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>AGE</th>\n",
|
||||
" <th>SEX</th>\n",
|
||||
" <th>BMI</th>\n",
|
||||
" <th>BP</th>\n",
|
||||
" <th>S1</th>\n",
|
||||
" <th>S2</th>\n",
|
||||
" <th>S3</th>\n",
|
||||
" <th>S4</th>\n",
|
||||
" <th>S5</th>\n",
|
||||
" <th>S6</th>\n",
|
||||
" <th>Y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>59</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>32.1</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>157</td>\n",
|
||||
" <td>93.2</td>\n",
|
||||
" <td>38.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.8598</td>\n",
|
||||
" <td>87</td>\n",
|
||||
" <td>151</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>48</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>21.6</td>\n",
|
||||
" <td>87.0</td>\n",
|
||||
" <td>183</td>\n",
|
||||
" <td>103.2</td>\n",
|
||||
" <td>70.0</td>\n",
|
||||
" <td>3.0</td>\n",
|
||||
" <td>3.8918</td>\n",
|
||||
" <td>69</td>\n",
|
||||
" <td>75</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>72</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>30.5</td>\n",
|
||||
" <td>93.0</td>\n",
|
||||
" <td>156</td>\n",
|
||||
" <td>93.6</td>\n",
|
||||
" <td>41.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.6728</td>\n",
|
||||
" <td>85</td>\n",
|
||||
" <td>141</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>24</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>25.3</td>\n",
|
||||
" <td>84.0</td>\n",
|
||||
" <td>198</td>\n",
|
||||
" <td>131.4</td>\n",
|
||||
" <td>40.0</td>\n",
|
||||
" <td>5.0</td>\n",
|
||||
" <td>4.8903</td>\n",
|
||||
" <td>89</td>\n",
|
||||
" <td>206</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>50</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>23.0</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>192</td>\n",
|
||||
" <td>125.4</td>\n",
|
||||
" <td>52.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.2905</td>\n",
|
||||
" <td>80</td>\n",
|
||||
" <td>135</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"execution_count": 13
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"Neste conjunto de dados, as colunas são as seguintes: \n",
|
||||
"* Idade e sexo são autoexplicativos \n",
|
||||
"* IMC é o índice de massa corporal \n",
|
||||
"* PA é a pressão arterial média \n",
|
||||
"* S1 até S6 são diferentes medições sanguíneas \n",
|
||||
"* Y é a medida qualitativa da progressão da doença ao longo de um ano \n",
|
||||
"\n",
|
||||
"Vamos estudar este conjunto de dados usando métodos de probabilidade e estatística.\n",
|
||||
"\n",
|
||||
"### Tarefa 1: Calcular os valores médios e a variância para todos os valores\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tarefa 2: Traçar boxplots para IMC, PA e Y dependendo do gênero\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tarefa 4: Teste a correlação entre diferentes variáveis e a progressão da doença (Y)\n",
|
||||
"\n",
|
||||
"> **Dica** A matriz de correlação fornecerá as informações mais úteis sobre quais valores são dependentes.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.8.8",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.8.8 64-bit (conda)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "defe9f96b3d327a6f37d795c43ad0219",
|
||||
"translation_date": "2025-09-01T23:17:02+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,92 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Vamos aprender sobre pássaros\n",
|
||||
"\n",
|
||||
"## Introdução\n",
|
||||
"\n",
|
||||
"Os pássaros são criaturas fascinantes que podem ser encontrados em quase todos os lugares do mundo. Eles vêm em uma variedade de formas, tamanhos e cores, e desempenham papéis importantes em nossos ecossistemas.\n",
|
||||
"\n",
|
||||
"[!NOTE] Este guia é apenas uma introdução ao mundo dos pássaros. Para informações mais detalhadas, consulte fontes especializadas.\n",
|
||||
"\n",
|
||||
"## Características dos pássaros\n",
|
||||
"\n",
|
||||
"Os pássaros possuem várias características únicas que os diferenciam de outros animais:\n",
|
||||
"\n",
|
||||
"- **Penas**: As penas ajudam os pássaros a voar, manter-se aquecidos e até se camuflar.\n",
|
||||
"- **Bico**: O formato do bico varia dependendo da dieta do pássaro.\n",
|
||||
"- **Ovos**: Todos os pássaros põem ovos, geralmente em ninhos.\n",
|
||||
"- **Voo**: A maioria dos pássaros pode voar, embora existam exceções como o avestruz e o pinguim.\n",
|
||||
"\n",
|
||||
"[!TIP] Observe os pássaros em seu ambiente natural para aprender mais sobre seus comportamentos.\n",
|
||||
"\n",
|
||||
"## Tipos de pássaros\n",
|
||||
"\n",
|
||||
"Existem milhares de espécies de pássaros, mas aqui estão alguns grupos principais:\n",
|
||||
"\n",
|
||||
"- **Passeriformes**: Incluem pardais, canários e outros pássaros pequenos.\n",
|
||||
"- **Rapinantes**: Como águias e falcões, conhecidos por sua visão aguçada e habilidades de caça.\n",
|
||||
"- **Aquáticos**: Pássaros como patos e pelicanos que vivem perto da água.\n",
|
||||
"- **Noturnos**: Corujas e outros pássaros que são ativos à noite.\n",
|
||||
"\n",
|
||||
"[!WARNING] Não tente se aproximar de pássaros selvagens sem o devido cuidado. Eles podem se sentir ameaçados.\n",
|
||||
"\n",
|
||||
"## Por que estudar pássaros?\n",
|
||||
"\n",
|
||||
"Estudar pássaros pode ser uma atividade gratificante por várias razões:\n",
|
||||
"\n",
|
||||
"- **Conservação**: Entender os pássaros ajuda a proteger espécies ameaçadas.\n",
|
||||
"- **Ciência**: Os pássaros são importantes para pesquisas sobre evolução e comportamento animal.\n",
|
||||
"- **Lazer**: A observação de pássaros é um passatempo relaxante e educativo.\n",
|
||||
"\n",
|
||||
"[!IMPORTANT] Sempre respeite os habitats naturais dos pássaros ao observá-los.\n",
|
||||
"\n",
|
||||
"## Conclusão\n",
|
||||
"\n",
|
||||
"Os pássaros são uma parte essencial do nosso mundo natural. Aprender sobre eles não apenas enriquece nosso conhecimento, mas também nos ajuda a apreciar a beleza e a complexidade da vida ao nosso redor.\n",
|
||||
"\n",
|
||||
"[!CAUTION] Certifique-se de seguir as leis locais ao interagir com pássaros ou seus habitats.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automáticas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte oficial. Para informações críticas, recomenda-se a tradução profissional feita por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.7.0",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.7.0 64-bit"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "33e5c5d3f0630388e20f2e161bd4cdf3",
|
||||
"translation_date": "2025-09-01T22:30:24+00:00",
|
||||
"source_file": "3-Data-Visualization/09-visualization-quantities/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Distribuições de pássaros\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "e5272cbcbffd1ddcc09e44d3d8e7e8cd",
|
||||
"translation_date": "2025-09-01T22:46:22+00:00",
|
||||
"source_file": "3-Data-Visualization/10-visualization-distributions/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,30 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "397e9bbc0743761dbf72e5f16b7043e6",
|
||||
"translation_date": "2025-09-01T22:25:17+00:00",
|
||||
"source_file": "3-Data-Visualization/11-visualization-proportions/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,32 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Visualizando a Produção de Mel 🍯 🐝\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "0f988634b7192626d91cc33b4b6388c5",
|
||||
"translation_date": "2025-09-01T22:39:49+00:00",
|
||||
"source_file": "3-Data-Visualization/12-visualization-relationships/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,140 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Dados de táxi de NYC no inverno e verão\n",
|
||||
"\n",
|
||||
"Consulte o [Data dictionary](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) para saber mais sobre as colunas que foram fornecidas.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "3bd4c20c4e8f3158f483f0f1cc543bb1",
|
||||
"translation_date": "2025-09-01T22:23:35+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/14-Introduction/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Dados de táxi de NYC no inverno e verão\n",
|
||||
"\n",
|
||||
"Consulte o [Dicionário de dados](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) para saber mais sobre as colunas que foram fornecidas.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"#Install the pandas library\r\n",
|
||||
"!pip install pandas"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"\r\n",
|
||||
"path = '../../data/taxi.csv'\r\n",
|
||||
"\r\n",
|
||||
"#Load the csv file into a dataframe\r\n",
|
||||
"df = pd.read_csv(path)\r\n",
|
||||
"\r\n",
|
||||
"#Print the dataframe\r\n",
|
||||
"print(df)\r\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" VendorID tpep_pickup_datetime tpep_dropoff_datetime passenger_count \\\n",
|
||||
"0 2.0 2019-07-15 16:27:53 2019-07-15 16:44:21 3.0 \n",
|
||||
"1 2.0 2019-07-17 20:26:35 2019-07-17 20:40:09 6.0 \n",
|
||||
"2 2.0 2019-07-06 16:01:08 2019-07-06 16:10:25 1.0 \n",
|
||||
"3 1.0 2019-07-18 22:32:23 2019-07-18 22:35:08 1.0 \n",
|
||||
"4 2.0 2019-07-19 14:54:29 2019-07-19 15:19:08 1.0 \n",
|
||||
".. ... ... ... ... \n",
|
||||
"195 2.0 2019-01-18 08:42:15 2019-01-18 08:56:57 1.0 \n",
|
||||
"196 1.0 2019-01-19 04:34:45 2019-01-19 04:43:44 1.0 \n",
|
||||
"197 2.0 2019-01-05 10:37:39 2019-01-05 10:42:03 1.0 \n",
|
||||
"198 2.0 2019-01-23 10:36:29 2019-01-23 10:44:34 2.0 \n",
|
||||
"199 2.0 2019-01-30 06:55:58 2019-01-30 07:07:02 5.0 \n",
|
||||
"\n",
|
||||
" trip_distance RatecodeID store_and_fwd_flag PULocationID DOLocationID \\\n",
|
||||
"0 2.02 1.0 N 186 233 \n",
|
||||
"1 1.59 1.0 N 141 161 \n",
|
||||
"2 1.69 1.0 N 246 249 \n",
|
||||
"3 0.90 1.0 N 229 141 \n",
|
||||
"4 4.79 1.0 N 237 107 \n",
|
||||
".. ... ... ... ... ... \n",
|
||||
"195 1.18 1.0 N 43 237 \n",
|
||||
"196 2.30 1.0 N 148 234 \n",
|
||||
"197 0.83 1.0 N 237 263 \n",
|
||||
"198 1.12 1.0 N 144 113 \n",
|
||||
"199 2.41 1.0 N 209 107 \n",
|
||||
"\n",
|
||||
" payment_type fare_amount extra mta_tax tip_amount tolls_amount \\\n",
|
||||
"0 1.0 12.0 1.0 0.5 4.08 0.0 \n",
|
||||
"1 2.0 10.0 0.5 0.5 0.00 0.0 \n",
|
||||
"2 2.0 8.5 0.0 0.5 0.00 0.0 \n",
|
||||
"3 1.0 4.5 3.0 0.5 1.65 0.0 \n",
|
||||
"4 1.0 19.5 0.0 0.5 5.70 0.0 \n",
|
||||
".. ... ... ... ... ... ... \n",
|
||||
"195 1.0 10.0 0.0 0.5 2.16 0.0 \n",
|
||||
"196 1.0 9.5 0.5 0.5 2.15 0.0 \n",
|
||||
"197 1.0 5.0 0.0 0.5 1.16 0.0 \n",
|
||||
"198 2.0 7.0 0.0 0.5 0.00 0.0 \n",
|
||||
"199 1.0 10.5 0.0 0.5 1.00 0.0 \n",
|
||||
"\n",
|
||||
" improvement_surcharge total_amount congestion_surcharge \n",
|
||||
"0 0.3 20.38 2.5 \n",
|
||||
"1 0.3 13.80 2.5 \n",
|
||||
"2 0.3 11.80 2.5 \n",
|
||||
"3 0.3 9.95 2.5 \n",
|
||||
"4 0.3 28.50 2.5 \n",
|
||||
".. ... ... ... \n",
|
||||
"195 0.3 12.96 0.0 \n",
|
||||
"196 0.3 12.95 0.0 \n",
|
||||
"197 0.3 6.96 0.0 \n",
|
||||
"198 0.3 7.80 0.0 \n",
|
||||
"199 0.3 12.30 0.0 \n",
|
||||
"\n",
|
||||
"[200 rows x 18 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Use as células abaixo para fazer sua própria Análise Exploratória de Dados\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"language_info": {
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"version": "3.9.7",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"name": "04-nyc-taxi-join-weather-in-pandas",
|
||||
"notebookId": 1709144033725344,
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "7bca1c1abc1e55842817b62e44e1a963",
|
||||
"translation_date": "2025-09-01T22:21:18+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Analisando Dados\n",
|
||||
"Exemplos das funções do Pandas mencionadas na [lição](README.md).\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import glob\r\n",
|
||||
"\r\n",
|
||||
"#Loading the dataset\r\n",
|
||||
"path = '../../data/emails.csv'\r\n",
|
||||
"email_df = pd.read_csv(path)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"source": [
|
||||
"# Using Describe on the email dataset\r\n",
|
||||
"print(email_df.describe())"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" the to ect and for of \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 7.022167 6.519704 4.948276 3.059113 3.502463 2.662562 \n",
|
||||
"std 10.945522 9.801907 9.293820 6.267806 4.901372 5.443939 \n",
|
||||
"min 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 \n",
|
||||
"50% 3.000000 3.000000 2.000000 1.000000 2.000000 1.000000 \n",
|
||||
"75% 9.000000 7.750000 4.000000 3.000000 4.750000 3.000000 \n",
|
||||
"max 99.000000 88.000000 79.000000 69.000000 39.000000 57.000000 \n",
|
||||
"\n",
|
||||
" a you in on is this \\\n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 57.017241 2.394089 10.817734 11.591133 5.901478 1.485222 \n",
|
||||
"std 78.868243 4.067015 19.050972 16.407175 8.793103 2.912473 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 15.000000 0.000000 1.250000 3.000000 1.000000 0.000000 \n",
|
||||
"50% 29.000000 1.000000 5.000000 6.000000 3.000000 0.000000 \n",
|
||||
"75% 61.000000 3.000000 12.000000 13.000000 7.000000 2.000000 \n",
|
||||
"max 843.000000 31.000000 223.000000 125.000000 61.000000 24.000000 \n",
|
||||
"\n",
|
||||
" i be that will \n",
|
||||
"count 406.000000 406.000000 406.000000 406.000000 \n",
|
||||
"mean 47.155172 2.950739 1.034483 0.955665 \n",
|
||||
"std 71.043009 4.297865 1.904846 2.042271 \n",
|
||||
"min 0.000000 0.000000 0.000000 0.000000 \n",
|
||||
"25% 11.000000 1.000000 0.000000 0.000000 \n",
|
||||
"50% 24.000000 1.000000 0.000000 0.000000 \n",
|
||||
"75% 50.750000 3.000000 1.000000 1.000000 \n",
|
||||
"max 754.000000 40.000000 14.000000 24.000000 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"source": [
|
||||
"# Sampling 10 emails\r\n",
|
||||
"print(email_df.sample(10))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"150 Email 151 0 1 2 0 3 0 15 0 0 5 0 0 7 \n",
|
||||
"380 Email 5147 0 3 2 0 0 0 7 0 1 1 0 0 3 \n",
|
||||
"19 Email 20 3 4 11 0 4 2 32 1 1 3 9 5 25 \n",
|
||||
"300 Email 301 2 1 1 0 1 1 15 2 2 3 2 0 8 \n",
|
||||
"307 Email 308 0 0 1 0 0 0 1 0 1 0 0 0 2 \n",
|
||||
"167 Email 168 2 2 2 1 5 1 24 2 5 6 4 0 30 \n",
|
||||
"320 Email 321 10 12 4 6 8 6 187 5 26 28 23 2 171 \n",
|
||||
"61 Email 62 0 1 1 0 4 1 15 4 4 3 3 0 19 \n",
|
||||
"26 Email 27 5 4 1 1 4 4 51 0 8 6 6 2 44 \n",
|
||||
"73 Email 74 0 0 1 0 0 0 7 0 4 3 0 0 6 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"150 1 0 0 \n",
|
||||
"380 0 0 0 \n",
|
||||
"19 3 0 1 \n",
|
||||
"300 0 0 0 \n",
|
||||
"307 0 0 0 \n",
|
||||
"167 2 0 0 \n",
|
||||
"320 5 1 1 \n",
|
||||
"61 2 0 0 \n",
|
||||
"26 6 0 0 \n",
|
||||
"73 0 0 0 \n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"source": [
|
||||
"# Returns rows where there are more occurrences of \"to\" than \"the\"\r\n",
|
||||
"print(email_df.query('the < to'))"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": [
|
||||
" Email No. the to ect and for of a you in on is this i \\\n",
|
||||
"1 Email 2 8 13 24 6 6 2 102 1 18 21 13 0 61 \n",
|
||||
"3 Email 4 0 5 22 0 5 1 51 2 1 5 9 2 16 \n",
|
||||
"5 Email 6 4 5 1 4 2 3 45 1 16 12 8 1 52 \n",
|
||||
"7 Email 8 0 2 2 3 1 2 21 6 2 6 2 0 28 \n",
|
||||
"13 Email 14 4 5 7 1 5 1 37 1 8 8 6 1 43 \n",
|
||||
".. ... ... .. ... ... ... .. ... ... .. .. .. ... .. \n",
|
||||
"390 Email 5157 4 13 1 0 3 1 48 2 8 26 9 1 45 \n",
|
||||
"393 Email 5160 2 13 1 0 2 1 38 2 7 24 6 1 34 \n",
|
||||
"396 Email 5163 2 3 1 2 1 2 32 0 7 3 2 0 26 \n",
|
||||
"404 Email 5171 2 7 1 0 2 1 28 2 8 11 7 1 39 \n",
|
||||
"405 Email 5172 22 24 5 1 6 5 148 8 23 13 5 4 99 \n",
|
||||
"\n",
|
||||
" be that will \n",
|
||||
"1 4 2 0 \n",
|
||||
"3 2 0 0 \n",
|
||||
"5 2 0 0 \n",
|
||||
"7 1 0 1 \n",
|
||||
"13 1 0 1 \n",
|
||||
".. .. ... ... \n",
|
||||
"390 1 0 0 \n",
|
||||
"393 1 0 0 \n",
|
||||
"396 3 0 0 \n",
|
||||
"404 1 0 0 \n",
|
||||
"405 6 4 1 \n",
|
||||
"\n",
|
||||
"[169 rows x 17 columns]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.9.7",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.9.7 64-bit ('venv': venv)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "6b9b57232c4b57163d057191678da2030059e733b8becc68f245de5a75abe84e"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "9d102c8c3cdbc8ea4e92fc32593462c6",
|
||||
"translation_date": "2025-09-01T22:19:27+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,323 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Ciência de Dados na Nuvem: O jeito \"Azure ML SDK\"\n",
|
||||
"\n",
|
||||
"## Introdução\n",
|
||||
"\n",
|
||||
"Neste notebook, vamos aprender como usar o Azure ML SDK para treinar, implantar e consumir um modelo através do Azure ML.\n",
|
||||
"\n",
|
||||
"Pré-requisitos: \n",
|
||||
"1. Você criou um workspace do Azure ML. \n",
|
||||
"2. Você carregou o [conjunto de dados de Insuficiência Cardíaca](https://www.kaggle.com/andrewmvd/heart-failure-clinical-data) no Azure ML. \n",
|
||||
"3. Você fez o upload deste notebook no Azure ML Studio. \n",
|
||||
"\n",
|
||||
"Os próximos passos são:\n",
|
||||
"\n",
|
||||
"1. Criar um Experimento em um Workspace existente. \n",
|
||||
"2. Criar um cluster de Computação. \n",
|
||||
"3. Carregar o conjunto de dados. \n",
|
||||
"4. Configurar o AutoML usando AutoMLConfig. \n",
|
||||
"5. Executar o experimento AutoML. \n",
|
||||
"6. Explorar os resultados e obter o melhor modelo. \n",
|
||||
"7. Registrar o melhor modelo. \n",
|
||||
"8. Implantar o melhor modelo. \n",
|
||||
"9. Consumir o endpoint. \n",
|
||||
"\n",
|
||||
"## Importações específicas do Azure Machine Learning SDK\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"from azureml.core import Workspace, Experiment\n",
|
||||
"from azureml.core.compute import AmlCompute\n",
|
||||
"from azureml.train.automl import AutoMLConfig\n",
|
||||
"from azureml.widgets import RunDetails\n",
|
||||
"from azureml.core.model import InferenceConfig, Model\n",
|
||||
"from azureml.core.webservice import AciWebservice"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Inicializar Espaço de Trabalho\n",
|
||||
"Inicialize um objeto de espaço de trabalho a partir de uma configuração persistida. Certifique-se de que o arquivo de configuração esteja presente em .\\config.json\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"ws = Workspace.from_config()\n",
|
||||
"print(ws.name, ws.resource_group, ws.location, ws.subscription_id, sep = '\\n')"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Criar um experimento no Azure ML\n",
|
||||
"\n",
|
||||
"Vamos criar um experimento chamado 'aml-experiment' no espaço de trabalho que acabamos de inicializar.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"experiment_name = 'aml-experiment'\n",
|
||||
"experiment = Experiment(ws, experiment_name)\n",
|
||||
"experiment"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Criar um Cluster de Computação \n",
|
||||
"Você precisará criar um [destino de computação](https://docs.microsoft.com/azure/machine-learning/concept-azure-machine-learning-architecture#compute-target) para sua execução do AutoML. \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"aml_name = \"heart-f-cluster\"\n",
|
||||
"try:\n",
|
||||
" aml_compute = AmlCompute(ws, aml_name)\n",
|
||||
" print('Found existing AML compute context.')\n",
|
||||
"except:\n",
|
||||
" print('Creating new AML compute context.')\n",
|
||||
" aml_config = AmlCompute.provisioning_configuration(vm_size = \"Standard_D2_v2\", min_nodes=1, max_nodes=3)\n",
|
||||
" aml_compute = AmlCompute.create(ws, name = aml_name, provisioning_configuration = aml_config)\n",
|
||||
" aml_compute.wait_for_completion(show_output = True)\n",
|
||||
"\n",
|
||||
"cts = ws.compute_targets\n",
|
||||
"compute_target = cts[aml_name]"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Dados\n",
|
||||
"Certifique-se de que você carregou o conjunto de dados no Azure ML e que a chave tem o mesmo nome do conjunto de dados.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"key = 'heart-failure-records'\n",
|
||||
"dataset = ws.datasets[key]\n",
|
||||
"df = dataset.to_pandas_dataframe()\n",
|
||||
"df.describe()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Configuração AutoML\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"automl_settings = {\n",
|
||||
" \"experiment_timeout_minutes\": 20,\n",
|
||||
" \"max_concurrent_iterations\": 3,\n",
|
||||
" \"primary_metric\" : 'AUC_weighted'\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"automl_config = AutoMLConfig(compute_target=compute_target,\n",
|
||||
" task = \"classification\",\n",
|
||||
" training_data=dataset,\n",
|
||||
" label_column_name=\"DEATH_EVENT\",\n",
|
||||
" enable_early_stopping= True,\n",
|
||||
" featurization= 'auto',\n",
|
||||
" debug_log = \"automl_errors.log\",\n",
|
||||
" **automl_settings\n",
|
||||
" )"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Execução AutoML\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"remote_run = experiment.submit(automl_config)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"RunDetails(remote_run).show()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run, fitted_model = remote_run.get_output()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"best_run.get_properties()"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"model_name = best_run.properties['model_name']\n",
|
||||
"script_file_name = 'inference/score.py'\n",
|
||||
"best_run.download_file('outputs/scoring_file_v_1_0_0.py', 'inference/score.py')\n",
|
||||
"description = \"aml heart failure project sdk\"\n",
|
||||
"model = best_run.register_model(model_name = model_name,\n",
|
||||
" description = description,\n",
|
||||
" tags = None)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Implantar o Melhor Modelo\n",
|
||||
"\n",
|
||||
"Execute o código a seguir para implantar o melhor modelo. Você pode verificar o estado da implantação no portal do Azure ML. Este processo pode levar alguns minutos.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"inference_config = InferenceConfig(entry_script=script_file_name, environment=best_run.get_environment())\n",
|
||||
"\n",
|
||||
"aciconfig = AciWebservice.deploy_configuration(cpu_cores = 1,\n",
|
||||
" memory_gb = 1,\n",
|
||||
" tags = {'type': \"automl-heart-failure-prediction\"},\n",
|
||||
" description = 'Sample service for AutoML Heart Failure Prediction')\n",
|
||||
"\n",
|
||||
"aci_service_name = 'automl-hf-sdk'\n",
|
||||
"aci_service = Model.deploy(ws, aci_service_name, [model], inference_config, aciconfig)\n",
|
||||
"aci_service.wait_for_deployment(True)\n",
|
||||
"print(aci_service.state)"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Consumir o Endpoint\n",
|
||||
"Você pode adicionar entradas ao exemplo de entrada abaixo.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"data = {\n",
|
||||
" \"data\":\n",
|
||||
" [\n",
|
||||
" {\n",
|
||||
" 'age': \"60\",\n",
|
||||
" 'anaemia': \"false\",\n",
|
||||
" 'creatinine_phosphokinase': \"500\",\n",
|
||||
" 'diabetes': \"false\",\n",
|
||||
" 'ejection_fraction': \"38\",\n",
|
||||
" 'high_blood_pressure': \"false\",\n",
|
||||
" 'platelets': \"260000\",\n",
|
||||
" 'serum_creatinine': \"1.40\",\n",
|
||||
" 'serum_sodium': \"137\",\n",
|
||||
" 'sex': \"false\",\n",
|
||||
" 'smoking': \"false\",\n",
|
||||
" 'time': \"130\",\n",
|
||||
" },\n",
|
||||
" ],\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"test_sample = str.encode(json.dumps(data))"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"response = aci_service.run(input_data=test_sample)\n",
|
||||
"response"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Aviso Legal**: \nEste documento foi traduzido utilizando o serviço de tradução por IA [Co-op Translator](https://github.com/Azure/co-op-translator). Embora nos esforcemos para garantir a precisão, esteja ciente de que traduções automatizadas podem conter erros ou imprecisões. O documento original em seu idioma nativo deve ser considerado a fonte autoritativa. Para informações críticas, recomenda-se a tradução profissional realizada por humanos. Não nos responsabilizamos por quaisquer mal-entendidos ou interpretações equivocadas decorrentes do uso desta tradução.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "af42669556d5dc19fc4cc3866f7d2597",
|
||||
"translation_date": "2025-09-01T20:03:49+00:00",
|
||||
"source_file": "5-Data-Science-In-Cloud/19-Azure/notebook.ipynb",
|
||||
"language_code": "br"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,262 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Úvod do pravděpodobnosti a statistiky\n",
|
||||
"## Zadání\n",
|
||||
"\n",
|
||||
"V tomto úkolu použijeme dataset pacientů s diabetem, který je dostupný [zde](https://www4.stat.ncsu.edu/~boos/var.select/diabetes.html).\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"source": [
|
||||
"import pandas as pd\r\n",
|
||||
"import numpy as np\r\n",
|
||||
"\r\n",
|
||||
"df = pd.read_csv(\"../../data/diabetes.tsv\",sep='\\t')\r\n",
|
||||
"df.head()"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
" AGE SEX BMI BP S1 S2 S3 S4 S5 S6 Y\n",
|
||||
"0 59 2 32.1 101.0 157 93.2 38.0 4.0 4.8598 87 151\n",
|
||||
"1 48 1 21.6 87.0 183 103.2 70.0 3.0 3.8918 69 75\n",
|
||||
"2 72 2 30.5 93.0 156 93.6 41.0 4.0 4.6728 85 141\n",
|
||||
"3 24 1 25.3 84.0 198 131.4 40.0 5.0 4.8903 89 206\n",
|
||||
"4 50 1 23.0 101.0 192 125.4 52.0 4.0 4.2905 80 135"
|
||||
],
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>AGE</th>\n",
|
||||
" <th>SEX</th>\n",
|
||||
" <th>BMI</th>\n",
|
||||
" <th>BP</th>\n",
|
||||
" <th>S1</th>\n",
|
||||
" <th>S2</th>\n",
|
||||
" <th>S3</th>\n",
|
||||
" <th>S4</th>\n",
|
||||
" <th>S5</th>\n",
|
||||
" <th>S6</th>\n",
|
||||
" <th>Y</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>59</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>32.1</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>157</td>\n",
|
||||
" <td>93.2</td>\n",
|
||||
" <td>38.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.8598</td>\n",
|
||||
" <td>87</td>\n",
|
||||
" <td>151</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>48</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>21.6</td>\n",
|
||||
" <td>87.0</td>\n",
|
||||
" <td>183</td>\n",
|
||||
" <td>103.2</td>\n",
|
||||
" <td>70.0</td>\n",
|
||||
" <td>3.0</td>\n",
|
||||
" <td>3.8918</td>\n",
|
||||
" <td>69</td>\n",
|
||||
" <td>75</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>72</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>30.5</td>\n",
|
||||
" <td>93.0</td>\n",
|
||||
" <td>156</td>\n",
|
||||
" <td>93.6</td>\n",
|
||||
" <td>41.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.6728</td>\n",
|
||||
" <td>85</td>\n",
|
||||
" <td>141</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>24</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>25.3</td>\n",
|
||||
" <td>84.0</td>\n",
|
||||
" <td>198</td>\n",
|
||||
" <td>131.4</td>\n",
|
||||
" <td>40.0</td>\n",
|
||||
" <td>5.0</td>\n",
|
||||
" <td>4.8903</td>\n",
|
||||
" <td>89</td>\n",
|
||||
" <td>206</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>50</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>23.0</td>\n",
|
||||
" <td>101.0</td>\n",
|
||||
" <td>192</td>\n",
|
||||
" <td>125.4</td>\n",
|
||||
" <td>52.0</td>\n",
|
||||
" <td>4.0</td>\n",
|
||||
" <td>4.2905</td>\n",
|
||||
" <td>80</td>\n",
|
||||
" <td>135</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"execution_count": 13
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"V této datové sadě jsou sloupce následující: \n",
|
||||
"* Věk a pohlaví jsou samovysvětlující \n",
|
||||
"* BMI je index tělesné hmotnosti \n",
|
||||
"* BP je průměrný krevní tlak \n",
|
||||
"* S1 až S6 jsou různé krevní hodnoty \n",
|
||||
"* Y je kvalitativní měřítko progrese onemocnění během jednoho roku \n",
|
||||
"\n",
|
||||
"Pojďme tuto datovou sadu prozkoumat pomocí metod pravděpodobnosti a statistiky.\n",
|
||||
"\n",
|
||||
"### Úkol 1: Vypočítejte průměrné hodnoty a rozptyl pro všechny hodnoty\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Úkol 2: Vykreslete krabicové grafy pro BMI, BP a Y v závislosti na pohlaví\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Úkol 3: Jaké je rozložení věku, pohlaví, BMI a proměnných Y?\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Úkol 4: Otestujte korelaci mezi různými proměnnými a progresí nemoci (Y)\n",
|
||||
"\n",
|
||||
"> **Tip** Korelační matice vám poskytne nejvíce užitečných informací o tom, které hodnoty jsou závislé.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Prohlášení**: \nTento dokument byl přeložen pomocí služby pro automatický překlad [Co-op Translator](https://github.com/Azure/co-op-translator). Ačkoli se snažíme o přesnost, mějte na paměti, že automatické překlady mohou obsahovat chyby nebo nepřesnosti. Původní dokument v jeho původním jazyce by měl být považován za autoritativní zdroj. Pro důležité informace se doporučuje profesionální lidský překlad. Neodpovídáme za žádné nedorozumění nebo nesprávné interpretace vyplývající z použití tohoto překladu.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python",
|
||||
"version": "3.8.8",
|
||||
"mimetype": "text/x-python",
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"pygments_lexer": "ipython3",
|
||||
"nbconvert_exporter": "python",
|
||||
"file_extension": ".py"
|
||||
},
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.8.8 64-bit (conda)"
|
||||
},
|
||||
"interpreter": {
|
||||
"hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "defe9f96b3d327a6f37d795c43ad0219",
|
||||
"translation_date": "2025-09-01T23:17:15+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "cs"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue