Merge pull request #642 from microsoft/update-translations
🌐 Update translations via Co-op Translator
pull/643/head
commit
86772ac44f
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
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
@ -0,0 +1,258 @@
|
||||
{
|
||||
"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": [],
|
||||
"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": [
|
||||
"### कार्य ४: विविध चल आणि आजार प्रगती (Y) यांच्यातील परस्परसंबंध तपासा\n",
|
||||
"\n",
|
||||
"> **सूचना** परस्परसंबंध मॅट्रिक्स तुम्हाला कोणते मूल्ये परस्पर अवलंबून आहेत याबद्दल सर्वात उपयुक्त माहिती देईल.\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**अस्वीकरण**: \nहा दस्तऐवज AI भाषांतर सेवा [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-02T09:43:44+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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,90 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# चला पक्ष्यांबद्दल शिकूया\n",
|
||||
"\n",
|
||||
"## पक्षी म्हणजे काय?\n",
|
||||
"\n",
|
||||
"पक्षी हे पंख असलेले, उडण्याची क्षमता असलेले, उष्ण रक्ताचे प्राणी आहेत. त्यांना पिसे असतात आणि बहुतेक पक्षी अंडी घालतात. \n",
|
||||
"\n",
|
||||
"## पक्ष्यांची वैशिष्ट्ये\n",
|
||||
"\n",
|
||||
"पक्ष्यांमध्ये काही महत्त्वाची वैशिष्ट्ये असतात:\n",
|
||||
"- **पंख:** उडण्यासाठी किंवा शरीराला उष्णता राखण्यासाठी मदत करतात.\n",
|
||||
"- **पिसे:** शरीराचे संरक्षण करतात आणि उडण्यास मदत करतात.\n",
|
||||
"- **चोच:** अन्न खाण्यासाठी आणि वस्तू उचलण्यासाठी उपयोगी.\n",
|
||||
"- **हलकी हाडे:** उडण्यासाठी शरीर हलके ठेवतात.\n",
|
||||
"\n",
|
||||
"## पक्ष्यांचे प्रकार\n",
|
||||
"\n",
|
||||
"पक्ष्यांचे विविध प्रकार आहेत, त्यापैकी काही खाली दिले आहेत:\n",
|
||||
"1. **गायन करणारे पक्षी:** यामध्ये बुलबुल, कोकीळ यांचा समावेश होतो.\n",
|
||||
"2. **शिकारी पक्षी:** गरुड, घार यांसारखे पक्षी जे इतर प्राण्यांवर शिकारी करतात.\n",
|
||||
"3. **पाणपक्षी:** बदक, हंस यांसारखे पक्षी जे पाण्यात राहतात.\n",
|
||||
"4. **रात्रीचे पक्षी:** घुबड यांसारखे पक्षी जे रात्री सक्रिय असतात.\n",
|
||||
"\n",
|
||||
"## पक्ष्यांचे महत्त्व\n",
|
||||
"\n",
|
||||
"पक्ष्यांचे पर्यावरणात महत्त्वाचे योगदान असते:\n",
|
||||
"- **परागीकरण:** फुलांमधील परागकण पसरवून झाडांच्या पुनरुत्पादनात मदत करतात.\n",
|
||||
"- **कीटक नियंत्रण:** कीटक खाऊन शेतीचे संरक्षण करतात.\n",
|
||||
"- **जैवविविधता:** निसर्गाच्या संतुलनासाठी महत्त्वाचे घटक आहेत.\n",
|
||||
"\n",
|
||||
"[!NOTE] पक्ष्यांचे निरीक्षण करणे हा एक छान छंद असू शकतो!\n",
|
||||
"\n",
|
||||
"## पक्ष्यांचे संरक्षण\n",
|
||||
"\n",
|
||||
"पक्ष्यांचे संरक्षण करण्यासाठी आपण काही गोष्टी करू शकतो:\n",
|
||||
"- झाडे लावा, कारण ती पक्ष्यांसाठी घरटे बनवण्यासाठी उपयुक्त असतात.\n",
|
||||
"- पक्ष्यांसाठी पाणी आणि अन्न उपलब्ध करून द्या.\n",
|
||||
"- जंगलतोड आणि प्रदूषण टाळा.\n",
|
||||
"\n",
|
||||
"[!TIP] पक्ष्यांसाठी घरटे तयार करण्याचा प्रयत्न करा!\n",
|
||||
"\n",
|
||||
"## निष्कर्ष\n",
|
||||
"\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-02T08:43:10+00:00",
|
||||
"source_file": "3-Data-Visualization/09-visualization-quantities/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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**अस्वीकरण**: \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-02T09:04:43+00:00",
|
||||
"source_file": "3-Data-Visualization/10-visualization-distributions/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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**अस्वीकरण**: \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-02T08:36:45+00:00",
|
||||
"source_file": "3-Data-Visualization/11-visualization-proportions/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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-02T08:56:02+00:00",
|
||||
"source_file": "3-Data-Visualization/12-visualization-relationships/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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-02T08:34:33+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/14-Introduction/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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-02T08:31:22+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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-02T08:28:55+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,319 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# क्लाउडमधील डेटा सायन्स: \"Azure ML SDK\" मार्ग\n",
|
||||
"\n",
|
||||
"## परिचय\n",
|
||||
"\n",
|
||||
"या नोटबुकमध्ये, आपण Azure ML SDK चा वापर करून मॉडेल प्रशिक्षण, तैनात आणि वापरण्याची प्रक्रिया शिकणार आहोत.\n",
|
||||
"\n",
|
||||
"पूर्व-आवश्यकता:\n",
|
||||
"1. तुम्ही Azure ML workspace तयार केले आहे.\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. विद्यमान Workspace मध्ये एक Experiment तयार करा.\n",
|
||||
"2. एक Compute cluster तयार करा.\n",
|
||||
"3. डेटासेट लोड करा.\n",
|
||||
"4. AutoMLConfig वापरून AutoML कॉन्फिगर करा.\n",
|
||||
"5. AutoML experiment चालवा.\n",
|
||||
"6. निकालांचा अभ्यास करा आणि सर्वोत्तम मॉडेल मिळवा.\n",
|
||||
"7. सर्वोत्तम मॉडेल नोंदणी करा.\n",
|
||||
"8. सर्वोत्तम मॉडेल तैनात करा.\n",
|
||||
"9. Endpoint वापरा.\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": [],
|
||||
"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": [],
|
||||
"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-02T05:36:50+00:00",
|
||||
"source_file": "5-Data-Science-In-Cloud/19-Azure/notebook.ipynb",
|
||||
"language_code": "mr"
|
||||
}
|
||||
},
|
||||
"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,264 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Pengenalan kepada Kebarangkalian dan Statistik\n",
|
||||
"## Tugasan\n",
|
||||
"\n",
|
||||
"Dalam tugasan ini, kita akan menggunakan set data pesakit diabetes yang diambil [dari sini](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": [
|
||||
"Dalam set data ini, lajur-lajur adalah seperti berikut: \n",
|
||||
"* Umur dan jantina adalah jelas dengan sendirinya \n",
|
||||
"* BMI ialah indeks jisim badan \n",
|
||||
"* BP ialah tekanan darah purata \n",
|
||||
"* S1 hingga S6 adalah pelbagai ukuran darah \n",
|
||||
"* Y ialah ukuran kualitatif perkembangan penyakit sepanjang satu tahun \n",
|
||||
"\n",
|
||||
"Mari kita kaji set data ini menggunakan kaedah kebarangkalian dan statistik. \n",
|
||||
"\n",
|
||||
"### Tugasan 1: Kira nilai purata dan varians untuk semua nilai \n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tugasan 2: Plot kotak plot untuk BMI, BP dan Y bergantung kepada jantina\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tugasan 3: Apakah taburan Umur, Jantina, BMI dan pembolehubah Y?\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tugasan 4: Uji korelasi antara pelbagai pemboleh ubah dan perkembangan penyakit (Y)\n",
|
||||
"\n",
|
||||
"> **Petunjuk** Matriks korelasi akan memberikan anda maklumat paling berguna tentang nilai-nilai yang saling bergantung.\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### Tugasan 5: Uji hipotesis bahawa tahap perkembangan diabetes adalah berbeza antara lelaki dan wanita\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\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-02T09:43:27+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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,88 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Mari belajar tentang burung\n",
|
||||
"\n",
|
||||
"Burung adalah makhluk yang menakjubkan dan memainkan peranan penting dalam ekosistem kita. Dalam dokumen ini, kita akan meneroka beberapa fakta menarik tentang burung.\n",
|
||||
"\n",
|
||||
"## Apa itu burung?\n",
|
||||
"\n",
|
||||
"Burung adalah haiwan vertebrata berdarah panas yang mempunyai bulu, paruh tanpa gigi, dan bertelur. Mereka tergolong dalam kelas Aves.\n",
|
||||
"\n",
|
||||
"[!NOTE] Burung terdapat di hampir setiap habitat di dunia, dari hutan tropika hingga kawasan kutub.\n",
|
||||
"\n",
|
||||
"## Ciri-ciri utama burung\n",
|
||||
"\n",
|
||||
"1. **Bulu**: Bulu membantu burung untuk terbang, mengawal suhu badan, dan memberikan perlindungan.\n",
|
||||
"2. **Sayap**: Kebanyakan burung mempunyai sayap yang membolehkan mereka terbang, walaupun ada juga burung yang tidak boleh terbang seperti burung unta.\n",
|
||||
"3. **Paruh**: Paruh burung berbeza-beza bentuk dan saiz bergantung kepada jenis makanan yang mereka makan.\n",
|
||||
"4. **Bertelur**: Semua burung bertelur, dan mereka biasanya menjaga telur mereka sehingga menetas.\n",
|
||||
"\n",
|
||||
"[!TIP] Adakah anda tahu bahawa burung kolibri adalah satu-satunya burung yang boleh terbang ke belakang?\n",
|
||||
"\n",
|
||||
"## Kepentingan burung\n",
|
||||
"\n",
|
||||
"Burung memainkan peranan penting dalam alam sekitar, termasuk:\n",
|
||||
"\n",
|
||||
"- **Penyebaran benih**: Burung membantu menyebarkan benih tumbuhan, yang penting untuk pertumbuhan tumbuhan baru.\n",
|
||||
"- **Pengawalan serangga**: Banyak burung memakan serangga, membantu mengawal populasi serangga.\n",
|
||||
"- **Penunjuk kesihatan ekosistem**: Kehadiran atau ketiadaan burung tertentu boleh menunjukkan kesihatan ekosistem.\n",
|
||||
"\n",
|
||||
"[!WARNING] Kehilangan habitat dan perubahan iklim adalah ancaman utama kepada populasi burung di seluruh dunia.\n",
|
||||
"\n",
|
||||
"## Bagaimana kita boleh membantu burung?\n",
|
||||
"\n",
|
||||
"1. **Melindungi habitat mereka**: Pastikan kawasan semula jadi seperti hutan dan paya dilindungi.\n",
|
||||
"2. **Memberi makan burung**: Sediakan makanan dan air untuk burung, terutamanya semasa musim sejuk.\n",
|
||||
"3. **Mengurangkan penggunaan bahan kimia**: Elakkan penggunaan racun perosak yang boleh membahayakan burung.\n",
|
||||
"4. **Menyokong organisasi pemuliharaan**: Sertai atau sumbangkan kepada organisasi yang bekerja untuk melindungi burung.\n",
|
||||
"\n",
|
||||
"[!IMPORTANT] Setiap usaha kecil yang kita lakukan boleh memberi impak besar kepada kelangsungan hidup burung.\n",
|
||||
"\n",
|
||||
"## Kesimpulan\n",
|
||||
"\n",
|
||||
"Burung adalah sebahagian penting daripada dunia kita. Dengan memahami dan melindungi mereka, kita juga membantu menjaga keseimbangan alam sekitar. Mari kita lakukan bahagian kita untuk memastikan burung terus berkembang di planet ini!\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil perhatian bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat penting, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\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-02T08:42:58+00:00",
|
||||
"source_file": "3-Data-Visualization/09-visualization-quantities/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
"# Taburan burung\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "e5272cbcbffd1ddcc09e44d3d8e7e8cd",
|
||||
"translation_date": "2025-09-02T09:04:39+00:00",
|
||||
"source_file": "3-Data-Visualization/10-visualization-distributions/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat penting, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "397e9bbc0743761dbf72e5f16b7043e6",
|
||||
"translation_date": "2025-09-02T08:36:41+00:00",
|
||||
"source_file": "3-Data-Visualization/11-visualization-proportions/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
"# Memvisualkan Pengeluaran Madu 🍯 🐝\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil perhatian bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "0f988634b7192626d91cc33b4b6388c5",
|
||||
"translation_date": "2025-09-02T08:55:56+00:00",
|
||||
"source_file": "3-Data-Visualization/12-visualization-relationships/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
"# Data teksi NYC pada musim sejuk dan musim panas\n",
|
||||
"\n",
|
||||
"Rujuk [Data dictionary](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) untuk mengetahui lebih lanjut tentang lajur yang telah disediakan.\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**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\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-02T08:34:26+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/14-Introduction/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Data teksi NYC pada musim sejuk dan musim panas\n",
|
||||
"\n",
|
||||
"Rujuk [Data dictionary](https://www1.nyc.gov/assets/tlc/downloads/pdf/data_dictionary_trip_records_yellow.pdf) untuk mengetahui lebih lanjut mengenai lajur-lajur yang telah disediakan.\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": [
|
||||
"# Gunakan sel di bawah untuk melakukan Analisis Data Eksploratori anda sendiri\n"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n---\n\n**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil perhatian bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\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-02T08:31:15+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/assignment.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Menganalisis Data\n",
|
||||
"Contoh fungsi Pandas yang disebut dalam [pelajaran](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**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat yang kritikal, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\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-02T08:28:49+00:00",
|
||||
"source_file": "4-Data-Science-Lifecycle/15-analyzing/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -0,0 +1,323 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# Sains Data di Awan: Cara \"Azure ML SDK\"\n",
|
||||
"\n",
|
||||
"## Pengenalan\n",
|
||||
"\n",
|
||||
"Dalam buku nota ini, kita akan belajar cara menggunakan Azure ML SDK untuk melatih, menyebarkan, dan menggunakan model melalui Azure ML.\n",
|
||||
"\n",
|
||||
"Prasyarat:\n",
|
||||
"1. Anda telah mencipta ruang kerja Azure ML.\n",
|
||||
"2. Anda telah memuat naik [set data Kegagalan Jantung](https://www.kaggle.com/andrewmvd/heart-failure-clinical-data) ke dalam Azure ML.\n",
|
||||
"3. Anda telah memuat naik buku nota ini ke dalam Azure ML Studio.\n",
|
||||
"\n",
|
||||
"Langkah-langkah seterusnya adalah:\n",
|
||||
"\n",
|
||||
"1. Cipta satu Eksperimen dalam Ruang Kerja yang sedia ada.\n",
|
||||
"2. Cipta kluster Komputer.\n",
|
||||
"3. Muatkan set data.\n",
|
||||
"4. Konfigurasikan AutoML menggunakan AutoMLConfig.\n",
|
||||
"5. Jalankan eksperimen AutoML.\n",
|
||||
"6. Terokai hasil dan dapatkan model terbaik.\n",
|
||||
"7. Daftarkan model terbaik.\n",
|
||||
"8. Sebarkan model terbaik.\n",
|
||||
"9. Gunakan titik akhir.\n",
|
||||
"\n",
|
||||
"## Import khusus untuk 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": [
|
||||
"## Memulakan Ruang Kerja\n",
|
||||
"Mulakan objek ruang kerja daripada konfigurasi yang disimpan. Pastikan fail konfigurasi terdapat di .\\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": [
|
||||
"## Cipta eksperimen Azure ML\n",
|
||||
"\n",
|
||||
"Mari kita cipta satu eksperimen bernama 'aml-experiment' dalam ruang kerja yang baru sahaja kita inisialisasikan.\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": [
|
||||
"## Membuat Kluster Pengiraan\n",
|
||||
"Anda perlu mencipta [sasaran pengiraan](https://docs.microsoft.com/azure/machine-learning/concept-azure-machine-learning-architecture#compute-target) untuk menjalankan AutoML anda.\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": [
|
||||
"## Data\n",
|
||||
"Pastikan anda telah memuat naik set data ke Azure ML dan bahawa kunci mempunyai nama yang sama seperti set data.\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": [
|
||||
"## Konfigurasi 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": [
|
||||
"## Larian 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": [
|
||||
"## Melancarkan Model Terbaik\n",
|
||||
"\n",
|
||||
"Jalankan kod berikut untuk melancarkan model terbaik. Anda boleh melihat status pelancaran di portal Azure ML. Langkah ini mungkin mengambil masa beberapa minit.\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": [
|
||||
"## Menggunakan Endpoint\n",
|
||||
"Anda boleh menambah input kepada sampel input berikut.\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**Penafian**: \nDokumen ini telah diterjemahkan menggunakan perkhidmatan terjemahan AI [Co-op Translator](https://github.com/Azure/co-op-translator). Walaupun kami berusaha untuk memastikan ketepatan, sila ambil maklum bahawa terjemahan automatik mungkin mengandungi kesilapan atau ketidaktepatan. Dokumen asal dalam bahasa asalnya harus dianggap sebagai sumber yang berwibawa. Untuk maklumat penting, terjemahan manusia profesional adalah disyorkan. Kami tidak bertanggungjawab atas sebarang salah faham atau salah tafsir yang timbul daripada penggunaan terjemahan ini.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"orig_nbformat": 4,
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
},
|
||||
"coopTranslator": {
|
||||
"original_hash": "af42669556d5dc19fc4cc3866f7d2597",
|
||||
"translation_date": "2025-09-02T05:36:29+00:00",
|
||||
"source_file": "5-Data-Science-In-Cloud/19-Azure/notebook.ipynb",
|
||||
"language_code": "ms"
|
||||
}
|
||||
},
|
||||
"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,258 @@
|
||||
{
|
||||
"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",
|
||||
"Probability နှင့် Statistics နည်းလမ်းများကို အသုံးပြု၍ ဒီဒေတာဆက်တင်ကို လေ့လာကြမည်။\n",
|
||||
"\n",
|
||||
"### Task 1: တန်ဖိုးအားလုံးအတွက် ပျမ်းမျှနှင့် အပြောင်းအလဲကိုတွက်ချက်ပါ \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": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"### အလုပ် ၄: အမျိုးမျိုးသော အပြောင်းအလဲများနှင့် ရောဂါတိုးတက်မှု (Y) အကြား ဆက်စပ်မှုကို စမ်းသပ်ပါ\n",
|
||||
"\n",
|
||||
"> **အကြံပြုချက်** ဆက်စပ်မှုအမီတာဇယားက ဘယ်တန်ဖိုးတွေက အချင်းချင်းမူတည်နေတယ်ဆိုတာ အထောက်အကူဖြစ်စေမယ့် အချက်အလက်တွေကို ပိုမိုပေးနိုင်ပါတယ်။\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**ဝက်ဘ်ဆိုက်မှတ်ချက်**: \nဤစာရွက်စာတမ်းကို AI ဘာသာပြန်ဝန်ဆောင်မှု [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-02T09:44:02+00:00",
|
||||
"source_file": "1-Introduction/04-stats-and-probability/assignment.ipynb",
|
||||
"language_code": "my"
|
||||
}
|
||||
},
|
||||
"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