├── 4_visualization ├── stock.txt └── img │ ├── cat.jpeg │ ├── Anatomy.png │ ├── John.webp │ ├── animation.gif │ ├── mat_markers.png │ ├── mat_css_color.webp │ ├── seaborn_ax_fig.png │ ├── connectionstyle.png │ ├── live_matplotlib.mp4 │ └── matplotlib_objects.png ├── imgs └── hr.gif ├── 2_numpy └── img │ ├── numpy.png │ ├── travis.jpeg │ └── Tensor_01.webp ├── 3_pandas └── img │ ├── wes.png │ └── pandas.svg ├── data ├── house_intro_pandas.xlsx ├── house_intro_pandas.csv └── titanic_test.csv ├── 0_brief_review ├── fig │ ├── AI_ML_DL.png │ └── ML_classical.png └── 0_contents.ipynb ├── 7_fully_connected_nn ├── img │ ├── fcnns.png │ ├── graph1.png │ ├── 1in_1out.png │ ├── 2in_1out.png │ └── graph_session.gif ├── 0_intro_to_pytorch.ipynb └── 1_simpe_NN_with_pytorch.ipynb ├── 5_data_analysis_processing ├── img │ ├── std.png │ ├── Daisy.png │ ├── cab51.png │ ├── William.png │ └── outlier.png ├── 1_intro_to_data_preparation.ipynb └── breast_cancer.csv ├── 1_intro_to_python ├── img │ ├── guido_van_rossum.jpeg │ └── programming_languages.png └── 1_modular_programming.ipynb ├── 6_classical_machine_learning ├── img │ ├── hyperplane.png │ ├── bias_variance.png │ ├── biasvariance.png │ ├── random-forest-diagram.png │ └── supervised_unsupervised.jpeg └── 0_Intro_to_ML.md ├── _config.yml ├── .github └── ISSUE_TEMPLATE │ ├── new-method-request.md │ └── bug_report.md ├── LICENSE └── README.md /4_visualization/stock.txt: -------------------------------------------------------------------------------- 1 | 1, 2 2 | 2, 30 3 | 3, 10 4 | 4, 5, 5 | 5, 12 -------------------------------------------------------------------------------- /imgs/hr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/imgs/hr.gif -------------------------------------------------------------------------------- /2_numpy/img/numpy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/2_numpy/img/numpy.png -------------------------------------------------------------------------------- /3_pandas/img/wes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/3_pandas/img/wes.png -------------------------------------------------------------------------------- /2_numpy/img/travis.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/2_numpy/img/travis.jpeg -------------------------------------------------------------------------------- /2_numpy/img/Tensor_01.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/2_numpy/img/Tensor_01.webp -------------------------------------------------------------------------------- /4_visualization/img/cat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/cat.jpeg -------------------------------------------------------------------------------- /data/house_intro_pandas.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/data/house_intro_pandas.xlsx -------------------------------------------------------------------------------- /0_brief_review/fig/AI_ML_DL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/0_brief_review/fig/AI_ML_DL.png -------------------------------------------------------------------------------- /4_visualization/img/Anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/Anatomy.png -------------------------------------------------------------------------------- /4_visualization/img/John.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/John.webp -------------------------------------------------------------------------------- /4_visualization/img/animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/animation.gif -------------------------------------------------------------------------------- /0_brief_review/fig/ML_classical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/0_brief_review/fig/ML_classical.png -------------------------------------------------------------------------------- /4_visualization/img/mat_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/mat_markers.png -------------------------------------------------------------------------------- /7_fully_connected_nn/img/fcnns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/7_fully_connected_nn/img/fcnns.png -------------------------------------------------------------------------------- /7_fully_connected_nn/img/graph1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/7_fully_connected_nn/img/graph1.png -------------------------------------------------------------------------------- /4_visualization/img/mat_css_color.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/mat_css_color.webp -------------------------------------------------------------------------------- /4_visualization/img/seaborn_ax_fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/seaborn_ax_fig.png -------------------------------------------------------------------------------- /5_data_analysis_processing/img/std.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/5_data_analysis_processing/img/std.png -------------------------------------------------------------------------------- /7_fully_connected_nn/img/1in_1out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/7_fully_connected_nn/img/1in_1out.png -------------------------------------------------------------------------------- /7_fully_connected_nn/img/2in_1out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/7_fully_connected_nn/img/2in_1out.png -------------------------------------------------------------------------------- /4_visualization/img/connectionstyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/connectionstyle.png -------------------------------------------------------------------------------- /4_visualization/img/live_matplotlib.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/live_matplotlib.mp4 -------------------------------------------------------------------------------- /5_data_analysis_processing/img/Daisy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/5_data_analysis_processing/img/Daisy.png -------------------------------------------------------------------------------- /5_data_analysis_processing/img/cab51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/5_data_analysis_processing/img/cab51.png -------------------------------------------------------------------------------- /1_intro_to_python/img/guido_van_rossum.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/1_intro_to_python/img/guido_van_rossum.jpeg -------------------------------------------------------------------------------- /4_visualization/img/matplotlib_objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/4_visualization/img/matplotlib_objects.png -------------------------------------------------------------------------------- /5_data_analysis_processing/img/William.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/5_data_analysis_processing/img/William.png -------------------------------------------------------------------------------- /5_data_analysis_processing/img/outlier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/5_data_analysis_processing/img/outlier.png -------------------------------------------------------------------------------- /7_fully_connected_nn/img/graph_session.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/7_fully_connected_nn/img/graph_session.gif -------------------------------------------------------------------------------- /1_intro_to_python/img/programming_languages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/1_intro_to_python/img/programming_languages.png -------------------------------------------------------------------------------- /6_classical_machine_learning/img/hyperplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/6_classical_machine_learning/img/hyperplane.png -------------------------------------------------------------------------------- /6_classical_machine_learning/img/bias_variance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/6_classical_machine_learning/img/bias_variance.png -------------------------------------------------------------------------------- /6_classical_machine_learning/img/biasvariance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/6_classical_machine_learning/img/biasvariance.png -------------------------------------------------------------------------------- /6_classical_machine_learning/img/random-forest-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/6_classical_machine_learning/img/random-forest-diagram.png -------------------------------------------------------------------------------- /6_classical_machine_learning/img/supervised_unsupervised.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmirMardan/ml_course/HEAD/6_classical_machine_learning/img/supervised_unsupervised.jpeg -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-leap-day 2 | 3 | title: Machine Learning Course 4 | description: This website belongs to the course of machine learning with Python which is getting ready for AUT -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-method-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New method request 3 | about: Suggest another method to be discussed 4 | title: New 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | Are you interested to learn a method, package, or algorithm that I haven't explained? 11 | 12 | Please let me know precisely what you need. 13 | Can you provide some references? 14 | 15 | What's the use of the method? 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /data/house_intro_pandas.csv: -------------------------------------------------------------------------------- 1 | bedroom,price,area,furnish_type,bathroom,city 2 | 2.0,20000.0,1450.0,Furnished,2.0,Ahmedabad 3 | 1.0,7350.0,210.0,Semi-Furnished,1.0,Ahmedabad 4 | 3.0,22000.0,1900.0,Unfurnished,3.0,Ahmedabad 5 | 2.0,13000.0,1285.0,Semi-Furnished,2.0,Ahmedabad 6 | 2.0,18000.0,1600.0,Furnished,2.0,Ahmedabad 7 | 1.0,8500.0,570.0,Unfurnished,1.0,Ahmedabad 8 | 1.0,6000.0,180.0,Semi-Furnished,1.0,Ahmedabad 9 | 2.0,12000.0,1200.0,Semi-Furnished,2.0,Ahmedabad 10 | 2.0,13000.0,1126.0,Semi-Furnished,2.0,Ahmedabad 11 | 4.0,38500.0,3500.0,Furnished,4.0,Ahmedabad 12 | 1.0,6000.0,400.0,Semi-Furnished,1.0,Ahmedabad 13 | 2.0,15000.0,990.0,Unfurnished,2.0,Ahmedabad 14 | 3.0,20000.0,1440.0,Semi-Furnished,3.0,Ahmedabad 15 | 2.0,6500.0,900.0,Unfurnished,1.0,Ahmedabad 16 | 2.0,25000.0,1250.0,Furnished,1.0,Ahmedabad 17 | 1.0,13500.0,1000.0,Semi-Furnished,2.0,Ahmedabad 18 | 1.0,8000.0,160.0,Furnished,1.0,Ahmedabad 19 | 3.0,20000.0,1800.0,Semi-Furnished,3.0,Ahmedabad 20 | 2.0,12500.0,1044.0,Unfurnished,2.0,Ahmedabad 21 | 2.0,12000.0,810.0,Unfurnished,2.0,Ahmedabad 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Amir Mardan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /6_classical_machine_learning/0_Intro_to_ML.md: -------------------------------------------------------------------------------- 1 | # 6. What Is Machine Learning 2 | Machine learning is a subfield of artificial intelligence that build a mathematical model of data to help understand data. 3 | By giving *tunable parameters* to the model which can be adapted to observed data, *learning* occurs. 4 | Once the model has been fit to previously observed data, it can *predict* based on new observed data. 5 | 6 | ## Categories of Machine Learning 7 | Machine learning problems can be categorized into two main classes: 8 | - **Supervised learning** build a relationship between measured features and some labels associated with the data. 9 | This category is subdivided into *classification* with discrete labels ans and *regression* with continuous labels. 10 | - **Unsupervised learning** build the model of data without considering any labels involved in the the data. 11 | This is the concept of "letting the dataset speak for itself". 12 | Unsupervised learning is subdivided to *clustering* and *dimensionality reduction* tasks. 13 | Clustering algorithms put the observed data in different categories while the dimensionality reduction techniques are provided to find more efficient repersentations of the data. 14 | 15 | There is also **semi-supervised learning** which falls between supervised and unsupervised methods. 16 | 17 | ![supervised](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/img/supervised_unsupervised.jpeg) 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /5_data_analysis_processing/1_intro_to_data_preparation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "This notebook is created by Amir Mardan. For any feedback or suggestions, please contact me via email, (mardan.amir.h@gmail.com).\n", 8 | "\n" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "\n", 16 | "# Data preparation\n", 17 | "\n", 18 | "Data preparation focuses on transforming the raw data into a form that can improve the modeling.\n", 19 | "\n", 20 | "> Data pre-processing techniques generally refer to the addition, deletion, or transformation of training set data.\n", 21 | "\n", 22 | "Although it highly depends on your data, the project, the algorithm you want to use, there are common tasks that you might do during the data preparation steps,\n", 23 | "- **Data Cleaning**: find the errors in the data and correct them\n", 24 | "- **Feature Selection**: Find the most important features in the dataset for your task.\n", 25 | "- **Data Transforms**: Tasks such as normalization or scaling for changing the distribution of data.\n", 26 | "- **Dimensionality Reduction**: Creating more effective projections of the data\n", 27 | "\n", 28 | "\n", 29 | "These four steps are discussed in the next four notebooks.\n", 30 | "\n" 31 | ] 32 | } 33 | ], 34 | "metadata": { 35 | "interpreter": { 36 | "hash": "ece4c4f9c4961c7468795d846fc72c6e00987d764e9134aaba41ea0514f48bf6" 37 | }, 38 | "kernelspec": { 39 | "display_name": "Python 3 (ipykernel)", 40 | "language": "python", 41 | "name": "python3" 42 | }, 43 | "language_info": { 44 | "codemirror_mode": { 45 | "name": "ipython", 46 | "version": 3 47 | }, 48 | "file_extension": ".py", 49 | "mimetype": "text/x-python", 50 | "name": "python", 51 | "nbconvert_exporter": "python", 52 | "pygments_lexer": "ipython3", 53 | "version": "3.9.9" 54 | } 55 | }, 56 | "nbformat": 4, 57 | "nbformat_minor": 2 58 | } 59 | -------------------------------------------------------------------------------- /3_pandas/img/pandas.svg: -------------------------------------------------------------------------------- 1 | Artboard 63 -------------------------------------------------------------------------------- /0_brief_review/0_contents.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "
\n", 8 | "\n", 9 | " \n", 10 | " \n", 13 | " \n", 16 | " \n", 17 | "
\n", 11 | " \n", 12 | " \n", 14 | " \n", 15 | "
\n", 18 | "
\n", 19 | "\n", 20 | "\n", 21 | "This notebook is created by Amir Mardan. For any feedback or suggestion, please contact me via my email, (mardan.amir.h@gmail.com).\n", 22 | "\n" 23 | ] 24 | }, 25 | { 26 | "cell_type": "markdown", 27 | "metadata": {}, 28 | "source": [ 29 | "#
Machine Learning with Hands-on Coding
" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "## Course description" 37 | ] 38 | }, 39 | { 40 | "cell_type": "markdown", 41 | "metadata": {}, 42 | "source": [ 43 | "When in the 1950s computer scientists started asking whether computers could be made to \"think\", artificial intelligence (AI) was born.\n", 44 | "AI tries to automate intellectual tasks normally performed by humans. \n", 45 | "AI is a general and vast field that encompasses machine learning, and deep learning which are usually wrongly used interchangeably. \n", 46 | "Let's understand the difference between these three topics.\n", 47 | "\n", 48 | "
\"AI_vs_ML_vs_DL\"
\n", 49 | "\n", 50 | "\n", 51 | "Machine learning arises for answering these questions: could a computer learn on its own how to perform a specific task? Could a computer learn the rules behind a problem by looking at data?\n", 52 | "If a computer can get these rules, those rules can then be applied to new data (answers) to produce the original data.\n", 53 | "
ML_vs_classical
\n", 54 | "\n", 55 | "Deep learning however is a subfield of machine learning that focuses on learning successive layers of increasingly meaningful representation.\n", 56 | "\n", 57 | "By knowing that machine learning tries to automate the analytical model building, we can apply this technique to different parts of our research from rock physics and geophysical studies to reservoir characterization. \n", 58 | "This way, the analysis could be faster and more consistent than using traditional methods.\n", 59 | "\n", 60 | "To take the best out of machine learning, three tools are required:\n", 61 | "- programming skill,\n", 62 | "- mathematics and statics knowledge,\n", 63 | "- field of application.\n", 64 | "\n", 65 | "We start this course by learning Python as our programming language. We walk through machine learning, deep learning, and big data. We discuss the basic principles of machine learning and the most commonly used algorithms. We work on different problems and with the hands-on nature of the course, we code various types of problems together to grasp the different aspects of each algorithm.\n", 66 | "During the course, we discover the publicly available Python packages that can solve any machine learning problem only with a couple of lines of code. " 67 | ] 68 | }, 69 | { 70 | "cell_type": "markdown", 71 | "metadata": {}, 72 | "source": [ 73 | "## Course objective" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "metadata": {}, 79 | "source": [ 80 | "1. Learning Python\n", 81 | "2. Learning git, GitHub, Google colab\n", 82 | "3. Understanding different machine learning algorithms\n", 83 | "4. Evaluation and analysis of learning applications" 84 | ] 85 | }, 86 | { 87 | "cell_type": "markdown", 88 | "metadata": {}, 89 | "source": [ 90 | "## Course outline" 91 | ] 92 | }, 93 | { 94 | "cell_type": "markdown", 95 | "metadata": {}, 96 | "source": [ 97 | "1. Introduction\n", 98 | "2. Data manipulation with Numpy\n", 99 | "3. Data manipulation with Pandas\n", 100 | "4. Data visualization with Matplotlib\n", 101 | "5. Data analysis and preparation\n", 102 | "6. Introduction to machine learning\n", 103 | "7. Classical machine learning with scikit-learn\n", 104 | "8. Introduction to artificial neural networks with TensorFlow\n", 105 | "9. Deep computer vision with TensorFlow\n" 106 | ] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "metadata": {}, 111 | "source": [ 112 | "Please note that no prerequisites are required." 113 | ] 114 | }, 115 | { 116 | "cell_type": "markdown", 117 | "metadata": {}, 118 | "source": [ 119 | "## References\n" 120 | ] 121 | }, 122 | { 123 | "cell_type": "markdown", 124 | "metadata": {}, 125 | "source": [ 126 | "VanderPlas, J. (2016). Python data science handbook: Essential tools for working with data. \" O'Reilly Media, Inc.\".\n", 127 | "\n", 128 | "Chollet, F. (2021). Deep learning with Python. Simon and Schuster.\n", 129 | "\n", 130 | "TensorFlow \n", 131 | "\n", 132 | " Python \n", 133 | "\n", 134 | " scikit-learn\n", 135 | "\n", 136 | " Numpy \n", 137 | "\n", 138 | " Pandas \n", 139 | "\n", 140 | " Matplotlib \n", 141 | "\n", 142 | " seaborn \n", 143 | "\n", 144 | " GitHub " 145 | ] 146 | } 147 | ], 148 | "metadata": { 149 | "kernelspec": { 150 | "display_name": "Python 3 (ipykernel)", 151 | "language": "python", 152 | "name": "python3" 153 | }, 154 | "language_info": { 155 | "codemirror_mode": { 156 | "name": "ipython", 157 | "version": 3 158 | }, 159 | "file_extension": ".py", 160 | "mimetype": "text/x-python", 161 | "name": "python", 162 | "nbconvert_exporter": "python", 163 | "pygments_lexer": "ipython3", 164 | "version": "3.9.9" 165 | } 166 | }, 167 | "nbformat": 4, 168 | "nbformat_minor": 2 169 | } 170 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Welcom to Python and machine learning course 2 | 3 | This repository is created by [Amir Mardan](https://amirmardan.github.io/) to maintain and preview the contents for a Python and machine learning course prepared for Amirkabir University of Technology, Tehran, Iran. Please contact me via my email (mardan.amir.h@gmail.com) for your lovely feedback and suggestions. 4 | 5 | --- 6 | **NOTE** 7 | 8 | I will push new contents weekly 9 | 10 | --- 11 | ## [1. Introduction to Python](https://github.com/AmirMardan/ml_course/blob/main/1_intro_to_python/0_intro_to_python.ipynb) 12 | #### 1.1 General programming 13 | - An introduction 14 | - Required tools 15 | - Variables and data types 16 | - Numbers in Python 17 | - Strings in Python 18 | - Booleans in Python 19 | - List in Python 20 | - Dictionary in Python 21 | - Operators 22 | - Comparison operators 23 | - Logical operators 24 | - Membership operators 25 | - Bitwise operators 26 | - Control flow 27 | - `if` statements 28 | - `match` statements 29 | - `for` statements 30 | - `while` statements 31 | 32 | #### [1.2 Modular programming](https://github.com/AmirMardan/ml_course/blob/main/1_intro_to_python/1_modular_programming.ipynb) 33 | - Functions 34 | - `Lambda` functions 35 | - Built-in functions 36 | - `map` function 37 | - `filter` function 38 | - `enumerate` function 39 | - `zip` function 40 | - Classes / objects 41 | 42 | ## [2. Introduction to NumPy](https://github.com/AmirMardan/ml_course/blob/main/2_numpy/0_intro_to_numpy.ipynb) 43 | - Creating a NumPy array 44 | - Creating arrays from lists 45 | - Special arrays 46 | - Attributes of arrays 47 | - Data Selection 48 | - Array indexing 49 | - Array slicing 50 | - Array view vs copy 51 | - Conditional selection 52 | - Array manipulation 53 | - Shape of an array 54 | - Joining arrays 55 | - Splitting of arrays 56 | - Computation on NumPy arrays 57 | - Aggregations 58 | - Summation 59 | - Minimum and maximum 60 | - Variance and standard deviation 61 | - Mean and median 62 | - Find index 63 | 64 | ## 3. Data Manipulation with Pandas 65 | #### [3.1 Introduction to pandas](https://github.com/AmirMardan/ml_course/blob/main/3_pandas/0_intro_to_pandas.ipynb) 66 | - Introducing Pandas objects 67 | - The pandas `Series` object 68 | - The pandas `DataFrame` object 69 | - Data indexing and selection 70 | - Data selection in Series 71 | - Data selection in DataFrame 72 | - Handling missing data 73 | - Detecting the missing values 74 | - Dealing with missing values 75 | - IO in pandas 76 | 77 | #### [3.2 Data manipulation in using pandas](https://github.com/AmirMardan/ml_course/blob/main/3_pandas/1_data_manipulation_using_pandas.ipynb) 78 | - Basic operations in pandas 79 | - Combining datasets 80 | - Concat 81 | - Merge 82 | - Join 83 | - Aggregation 84 | - `Groupby` 85 | - Vectorized string 86 | 87 | ## 4 Visualization 88 | 89 | #### [4.1 Matplotlib](https://github.com/AmirMardan/ml_course/blob/main/4_visualization/0_matplotlib.ipynb) 90 | - Basic matplotlib 91 | - Simple matplotlib 92 | - Subplots 93 | - Object-oriented method 94 | - Different types of plot 95 | - Scatter plot 96 | - Bar plot 97 | - Histogram 98 | - Pie chart 99 | - Box Plot 100 | - Violin plot 101 | - Images with matplotlib 102 | - Animation using matplotlib 103 | - Live graph with matplotlib 104 | 105 | #### [4.2 Seaborn](https://github.com/AmirMardan/ml_course/blob/main/4_visualization/1_seaborn.ipynb) 106 | - Relational plots 107 | - Distribution plots 108 | - `displot` 109 | - `jointplot` 110 | - `pairplot` 111 | - Categorical plots 112 | - Categorical scatter plots 113 | - Categorical distribution plots 114 | - Categorical estimate plots 115 | - Regression plots 116 | - FacetGrid 117 | - Customization 118 | - Style and theme 119 | - Colors 120 | 121 | ## 5 Data Analysis and Processing 122 | 123 | #### [5.1 Exploratory data analysis (EDA)](https://github.com/AmirMardan/ml_course/blob/main/5_data_analysis_processing/0_introduction_to_EDA.ipynb) 124 | - Initial general assessment 125 | - Basic analysis 126 | - Missing data 127 | - Outliers 128 | - Correlation 129 | 130 | #### [5.2 Data preparation](https://github.com/AmirMardan/ml_course/blob/main/5_data_analysis_processing/1_intro_to_data_preparation.ipynb) 131 | 132 | #### [5.3 Data Cleaning](https://github.com/AmirMardan/ml_course/blob/main/5_data_analysis_processing/2_data_cleaning.ipynb) 133 | - Initial general assessment 134 | - Rows with duplicated data 135 | - Columns with a single value 136 | - Outliers 137 | - Standard deviation method 138 | - Interquartile range method 139 | - Missing data 140 | - Remove rows with missing values 141 | - Filling missing values 142 | 143 | #### [5.4 Data Transforms](https://github.com/AmirMardan/ml_course/blob/main/5_data_analysis_processing/3_data_transform.ipynb) 144 | - Scaling numerical data 145 | - Data normalization 146 | - Data standardization 147 | - Robust scaling 148 | - Encode categorical data 149 | - Ordinal Encoding 150 | - One Hot Encoding 151 | - Dummy Encoding 152 | - How to make distribution more Gaussian 153 | - Box-Cox transform 154 | - Yeo-Johnson transform 155 | - Quantile transform 156 | 157 | ## 6 Classical Machine Learning 158 | 159 | #### [6.1 Introduction to Machine Learning](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/0_Intro_to_ML.md) 160 | 161 | #### [6.2 Introduction to Scikit-Learn](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/1_intro_to_sklearn.ipynb) 162 | - Data presentation 163 | - Models in Scikit-learn 164 | - Simple linear regression example 165 | - Simple classification example 166 | - Simple dimensionality reduction example 167 | - Simple clustering example 168 | - Hyperparameters and model validation 169 | - Cross validation 170 | - Finding the best model 171 | - Grid Search 172 | 173 | #### [6.3 Regression 1](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/2_regression_1.ipynb) 174 | - Ordinary Linear Regression 175 | - Linear Regression With Regularization 176 | - Ridge Regularization 177 | - Lasso Regularization 178 | - Combined Regularization 179 | - A Linear Regression Project 180 | - Exploratory Data Analysis 181 | - Data Cleaning 182 | - Data Processing Pipeline 183 | - Training and Evaluation 184 | - Training Curve 185 | 186 | #### [6.4 Classification 1](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/3_classification_1.ipynb) 187 | - Logistic Regression 188 | - Support Vector Machine 189 | - Random Forest Classifier 190 | 191 | #### [6.5 Clustering 1](https://github.com/AmirMardan/ml_course/blob/main/6_classical_machine_learning/4_clustering_1.ipynb) 192 | - k-Means Clustering 193 | - Gaussian Mixture Models 194 | - Evaluation Clustering Models 195 | 196 | ## 7. Fully Connected Neural Networks (FCNNs) 197 | 198 | #### [7.1 Introduction to TensorFlow](https://github.com/AmirMardan/ml_course/blob/main/7_fully_connected_nn/0_intro_to_tensorflow.ipynb) 199 | - Graph and Session 200 | - Build and Perform a Graph 201 | - Gradient in TensorFlow 202 | - Tensor types in TensorFlow 203 | - Constant 204 | - Variable 205 | - Tensor Manipulation 206 | - Creating A Tensors 207 | - Creating Special Tensors 208 | - Shape Manipulation 209 | - Slicing 210 | - Operators 211 | - Basic Arithmetic Operators 212 | - Comparison Operators 213 | - Logical And Bitwise Operators 214 | 215 | #### [7.2 Introduction To Fully Connected Neural Networks](https://github.com/AmirMardan/ml_course/blob/main/7_fully_connected_nn/1_intro_to_NN.ipynb) 216 | - Neural Network From Scratch 217 | - Neural Network With TensorFlow 218 | 219 | -------------------------------------------------------------------------------- /1_intro_to_python/1_modular_programming.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "
\n", 8 | "\n", 9 | " \n", 10 | " \n", 13 | " \n", 16 | " \n", 17 | "
\n", 11 | " \n", 12 | " \n", 14 | " \n", 15 | "
\n", 18 | "
\n", 19 | "\n", 20 | "\n", 21 | "This notebook is created by Amir Mardan. For any feedback or suggestion, please contact me via my email, (mardan.amir.h@gmail.com).\n", 22 | "\n" 23 | ] 24 | }, 25 | { 26 | "cell_type": "markdown", 27 | "metadata": {}, 28 | "source": [ 29 | "#
🐍 Python 🐍
" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "\n", 37 | "# Modular programming in Python\n", 38 | "\n", 39 | "This notebook will cover the following topics:\n", 40 | "\n", 41 | "- Introduction \n", 42 | "- 1. Functions \n", 43 | "- 2. Lambda functions \n", 44 | "- 3. Built-in functions \n", 45 | " - map function \n", 46 | " - filter function \n", 47 | " - enumerate function \n", 48 | " - zip function \n", 49 | "- 4. Classes \n", 50 | "\n" 51 | ] 52 | }, 53 | { 54 | "cell_type": "markdown", 55 | "metadata": {}, 56 | "source": [ 57 | "\n", 58 | "## Introduction " 59 | ] 60 | }, 61 | { 62 | "cell_type": "markdown", 63 | "metadata": {}, 64 | "source": [ 65 | "***Modular programming*** in Python is a very important tool for modern developers. To create robust systems that last, you need to know how to organize your programs so that they can grow over time. The techniques of modular programming and the specific use of Python modules and packages give us tools that we need to succeed as expertise in the fast-changing programming landscape." 66 | ] 67 | }, 68 | { 69 | "cell_type": "markdown", 70 | "metadata": {}, 71 | "source": [ 72 | "\n", 73 | "## 1. Functions " 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "metadata": {}, 79 | "source": [ 80 | "A function is a block of code that only runs when it is called. Functions are used to reduce the repetition in code.\n", 81 | "\n", 82 | "\n", 83 | "```Python\n", 84 | "def function_name(inputs):\n", 85 | " \"\"\"\n", 86 | " a summary\n", 87 | "\n", 88 | " Parameters\n", 89 | " ----------\n", 90 | " inputs : type\n", 91 | " description\n", 92 | "\n", 93 | " Returns\n", 94 | " -------\n", 95 | " type\n", 96 | " description\n", 97 | " \"\"\"\n", 98 | " block of code\n", 99 | " \n", 100 | " return result\n", 101 | "```" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": 1, 107 | "metadata": {}, 108 | "outputs": [], 109 | "source": [ 110 | "# Example 1\n", 111 | "\n", 112 | "def add (a , b):\n", 113 | " \"\"\"\n", 114 | " add is used to calculate the summation of two variables\n", 115 | "\n", 116 | "\n", 117 | " Parameters\n", 118 | " ----------\n", 119 | " a : Numeric\n", 120 | " a numeric variable\n", 121 | " b : Numeric\n", 122 | " a numeric variable\n", 123 | "\n", 124 | " Returns\n", 125 | " -------\n", 126 | " c : Numeric\n", 127 | " a + b\n", 128 | " \"\"\"\n", 129 | " c = a + b\n", 130 | " \n", 131 | " return c" 132 | ] 133 | }, 134 | { 135 | "cell_type": "markdown", 136 | "metadata": {}, 137 | "source": [ 138 | "add(2,3)" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 2, 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "data": { 148 | "text/plain": [ 149 | "5" 150 | ] 151 | }, 152 | "execution_count": 2, 153 | "metadata": {}, 154 | "output_type": "execute_result" 155 | } 156 | ], 157 | "source": [ 158 | "# Calling a function\n", 159 | " \n", 160 | "add(2, 3)" 161 | ] 162 | }, 163 | { 164 | "cell_type": "code", 165 | "execution_count": 3, 166 | "metadata": {}, 167 | "outputs": [], 168 | "source": [ 169 | "# Example 2\n", 170 | "\n", 171 | "def subtract (a , b):\n", 172 | " \"\"\"\n", 173 | " subtract is used to calculate the subtraction of two variables\n", 174 | "\n", 175 | "\n", 176 | " Parameters\n", 177 | " ----------\n", 178 | " a : Numeric\n", 179 | " a numeric variable\n", 180 | " b : Numeric\n", 181 | " a numeric variable\n", 182 | "\n", 183 | " Returns\n", 184 | " -------\n", 185 | " c : Numeric\n", 186 | " a - b\n", 187 | " \"\"\"\n", 188 | " c = a - b\n", 189 | " \n", 190 | " return c" 191 | ] 192 | }, 193 | { 194 | "cell_type": "code", 195 | "execution_count": 4, 196 | "metadata": {}, 197 | "outputs": [ 198 | { 199 | "data": { 200 | "text/plain": [ 201 | "-1" 202 | ] 203 | }, 204 | "execution_count": 4, 205 | "metadata": {}, 206 | "output_type": "execute_result" 207 | } 208 | ], 209 | "source": [ 210 | "subtract(2, 3)" 211 | ] 212 | }, 213 | { 214 | "cell_type": "code", 215 | "execution_count": 5, 216 | "metadata": {}, 217 | "outputs": [ 218 | { 219 | "name": "stdout", 220 | "output_type": "stream", 221 | "text": [ 222 | "\n", 223 | " add is used to calculate the summation of two variables\n", 224 | "\n", 225 | "\n", 226 | " Parameters\n", 227 | " ----------\n", 228 | " a : Numeric\n", 229 | " a numeric variable\n", 230 | " b : Numeric\n", 231 | " a numeric variable\n", 232 | "\n", 233 | " Returns\n", 234 | " -------\n", 235 | " c : Numeric\n", 236 | " a + b\n", 237 | " \n" 238 | ] 239 | } 240 | ], 241 | "source": [ 242 | "# How to get the documentation of a function\n", 243 | "\n", 244 | "print(add.__doc__)" 245 | ] 246 | }, 247 | { 248 | "cell_type": "markdown", 249 | "metadata": {}, 250 | "source": [ 251 | "\n", 252 | "## 2. Lambda functions " 253 | ] 254 | }, 255 | { 256 | "cell_type": "markdown", 257 | "metadata": {}, 258 | "source": [ 259 | "We can make a function in one line using `lambda` as\n", 260 | "\n", 261 | "```Python\n", 262 | "function_name = lambda input1, input2: statement\n", 263 | "```" 264 | ] 265 | }, 266 | { 267 | "cell_type": "code", 268 | "execution_count": 6, 269 | "metadata": {}, 270 | "outputs": [], 271 | "source": [ 272 | "add_lambda = lambda a, b: a + b" 273 | ] 274 | }, 275 | { 276 | "cell_type": "code", 277 | "execution_count": 7, 278 | "metadata": {}, 279 | "outputs": [ 280 | { 281 | "data": { 282 | "text/plain": [ 283 | "5" 284 | ] 285 | }, 286 | "execution_count": 7, 287 | "metadata": {}, 288 | "output_type": "execute_result" 289 | } 290 | ], 291 | "source": [ 292 | "add_lambda(2, 3)" 293 | ] 294 | }, 295 | { 296 | "cell_type": "markdown", 297 | "metadata": {}, 298 | "source": [ 299 | "\n", 300 | "## 3. Built in functions " 301 | ] 302 | }, 303 | { 304 | "cell_type": "markdown", 305 | "metadata": {}, 306 | "source": [ 307 | "\n", 308 | "\n", 309 | "Python has a set of built-in functions.\n", 310 | "You can find a list of them here.\n", 311 | "\n" 312 | ] 313 | }, 314 | { 315 | "cell_type": "code", 316 | "execution_count": 8, 317 | "metadata": {}, 318 | "outputs": [ 319 | { 320 | "data": { 321 | "text/plain": [ 322 | "3" 323 | ] 324 | }, 325 | "execution_count": 8, 326 | "metadata": {}, 327 | "output_type": "execute_result" 328 | } 329 | ], 330 | "source": [ 331 | "# Function for absolute value\n", 332 | "\n", 333 | "abs(-3)" 334 | ] 335 | }, 336 | { 337 | "cell_type": "code", 338 | "execution_count": 9, 339 | "metadata": {}, 340 | "outputs": [ 341 | { 342 | "name": "stdout", 343 | "output_type": "stream", 344 | "text": [ 345 | " \n" 346 | ] 347 | } 348 | ], 349 | "source": [ 350 | "a = '2'\n", 351 | "\n", 352 | "print(type(a), type(float(a)))" 353 | ] 354 | }, 355 | { 356 | "cell_type": "markdown", 357 | "metadata": {}, 358 | "source": [ 359 | "Let's learn some more useful and complicated built-in functions." 360 | ] 361 | }, 362 | { 363 | "cell_type": "markdown", 364 | "metadata": {}, 365 | "source": [ 366 | "\n", 367 | "### 3.1 `map` function " 368 | ] 369 | }, 370 | { 371 | "cell_type": "markdown", 372 | "metadata": {}, 373 | "source": [ 374 | "The `map()` function applies a specific function for each item in an iterable structure.\n", 375 | "\n", 376 | "```Python\n", 377 | "map(function_name, iterable)\n", 378 | "```" 379 | ] 380 | }, 381 | { 382 | "cell_type": "code", 383 | "execution_count": 10, 384 | "metadata": {}, 385 | "outputs": [ 386 | { 387 | "data": { 388 | "text/plain": [ 389 | "3" 390 | ] 391 | }, 392 | "execution_count": 10, 393 | "metadata": {}, 394 | "output_type": "execute_result" 395 | } 396 | ], 397 | "source": [ 398 | "add_lambda = lambda a, b: a + b\n", 399 | "\n", 400 | "add_lambda(1, 2)" 401 | ] 402 | }, 403 | { 404 | "cell_type": "code", 405 | "execution_count": 11, 406 | "metadata": {}, 407 | "outputs": [ 408 | { 409 | "data": { 410 | "text/plain": [ 411 | "[1, 3, 3, 2]" 412 | ] 413 | }, 414 | "execution_count": 11, 415 | "metadata": {}, 416 | "output_type": "execute_result" 417 | } 418 | ], 419 | "source": [ 420 | "# By entering 2 lists, addition becomes concatenation.\n", 421 | "\n", 422 | "add_lambda([1, 3], [3, 2])" 423 | ] 424 | }, 425 | { 426 | "cell_type": "code", 427 | "execution_count": 12, 428 | "metadata": {}, 429 | "outputs": [], 430 | "source": [ 431 | "# To add up each two items, we need to use the map()\n", 432 | "\n", 433 | "x = map(add_lambda, [1, 3], [3, 2])" 434 | ] 435 | }, 436 | { 437 | "cell_type": "markdown", 438 | "metadata": {}, 439 | "source": [ 440 | "The output of `map()` has a type of map! 🤯" 441 | ] 442 | }, 443 | { 444 | "cell_type": "code", 445 | "execution_count": 13, 446 | "metadata": {}, 447 | "outputs": [ 448 | { 449 | "data": { 450 | "text/plain": [ 451 | "map" 452 | ] 453 | }, 454 | "execution_count": 13, 455 | "metadata": {}, 456 | "output_type": "execute_result" 457 | } 458 | ], 459 | "source": [ 460 | "# Type is another built-in function\n", 461 | "\n", 462 | "type(x)" 463 | ] 464 | }, 465 | { 466 | "cell_type": "markdown", 467 | "metadata": {}, 468 | "source": [ 469 | "So, we use another built-in function like `list()` to get our data in list type." 470 | ] 471 | }, 472 | { 473 | "cell_type": "code", 474 | "execution_count": 14, 475 | "metadata": {}, 476 | "outputs": [ 477 | { 478 | "data": { 479 | "text/plain": [ 480 | "[4, 5]" 481 | ] 482 | }, 483 | "execution_count": 14, 484 | "metadata": {}, 485 | "output_type": "execute_result" 486 | } 487 | ], 488 | "source": [ 489 | "list(x)" 490 | ] 491 | }, 492 | { 493 | "cell_type": "markdown", 494 | "metadata": {}, 495 | "source": [ 496 | "\n", 497 | "### 3.2 `filter` function " 498 | ] 499 | }, 500 | { 501 | "cell_type": "markdown", 502 | "metadata": {}, 503 | "source": [ 504 | "The `filter()` function returns an iterator where the items are filtered through a function to test if the item is accepted or not." 505 | ] 506 | }, 507 | { 508 | "cell_type": "code", 509 | "execution_count": 15, 510 | "metadata": {}, 511 | "outputs": [], 512 | "source": [ 513 | "def day_check(day):\n", 514 | " workday_list = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']\n", 515 | " \n", 516 | " return day in workday_list\n", 517 | "\n", 518 | "\n", 519 | " " 520 | ] 521 | }, 522 | { 523 | "cell_type": "code", 524 | "execution_count": 16, 525 | "metadata": {}, 526 | "outputs": [ 527 | { 528 | "data": { 529 | "text/plain": [ 530 | "filter" 531 | ] 532 | }, 533 | "execution_count": 16, 534 | "metadata": {}, 535 | "output_type": "execute_result" 536 | } 537 | ], 538 | "source": [ 539 | "my_list = ['Python', 'May', 1, 'Mon', 'Fri', 'Sun', 'Sunday']\n", 540 | "\n", 541 | "x = filter(day_check, my_list)\n", 542 | "\n", 543 | "type(x)" 544 | ] 545 | }, 546 | { 547 | "cell_type": "markdown", 548 | "metadata": {}, 549 | "source": [ 550 | "As is shown, the output of `filter()` has a type of filter. We use another build-in function like `tuple()` to get the data." 551 | ] 552 | }, 553 | { 554 | "cell_type": "code", 555 | "execution_count": 17, 556 | "metadata": {}, 557 | "outputs": [ 558 | { 559 | "data": { 560 | "text/plain": [ 561 | "('Mon', 'Fri')" 562 | ] 563 | }, 564 | "execution_count": 17, 565 | "metadata": {}, 566 | "output_type": "execute_result" 567 | } 568 | ], 569 | "source": [ 570 | "tuple(x)" 571 | ] 572 | }, 573 | { 574 | "cell_type": "markdown", 575 | "metadata": {}, 576 | "source": [ 577 | "\n", 578 | "### 3.3 `enumerate` function" 579 | ] 580 | }, 581 | { 582 | "cell_type": "markdown", 583 | "metadata": {}, 584 | "source": [ 585 | "The `enumerate()` function takes a collection and returns it as an enumerate object." 586 | ] 587 | }, 588 | { 589 | "cell_type": "code", 590 | "execution_count": 18, 591 | "metadata": {}, 592 | "outputs": [ 593 | { 594 | "data": { 595 | "text/plain": [ 596 | "" 597 | ] 598 | }, 599 | "execution_count": 18, 600 | "metadata": {}, 601 | "output_type": "execute_result" 602 | } 603 | ], 604 | "source": [ 605 | "x = ['France', 'Japan', 'USA']\n", 606 | "\n", 607 | "y = enumerate(x)\n", 608 | "y" 609 | ] 610 | }, 611 | { 612 | "cell_type": "code", 613 | "execution_count": 19, 614 | "metadata": {}, 615 | "outputs": [ 616 | { 617 | "data": { 618 | "text/plain": [ 619 | "[(0, 'France'), (1, 'Japan'), (2, 'USA')]" 620 | ] 621 | }, 622 | "execution_count": 19, 623 | "metadata": {}, 624 | "output_type": "execute_result" 625 | } 626 | ], 627 | "source": [ 628 | "list(y)" 629 | ] 630 | }, 631 | { 632 | "cell_type": "code", 633 | "execution_count": 20, 634 | "metadata": {}, 635 | "outputs": [ 636 | { 637 | "name": "stdout", 638 | "output_type": "stream", 639 | "text": [ 640 | "France\n", 641 | "Japan\n", 642 | "USA\n" 643 | ] 644 | } 645 | ], 646 | "source": [ 647 | "for i, country in enumerate(x):\n", 648 | " print(country)" 649 | ] 650 | }, 651 | { 652 | "cell_type": "code", 653 | "execution_count": 21, 654 | "metadata": {}, 655 | "outputs": [], 656 | "source": [ 657 | "def even_items(iterable):\n", 658 | " return [v for i, v in enumerate(iterable, start=1) if not i % 2]" 659 | ] 660 | }, 661 | { 662 | "cell_type": "code", 663 | "execution_count": 22, 664 | "metadata": {}, 665 | "outputs": [ 666 | { 667 | "name": "stdout", 668 | "output_type": "stream", 669 | "text": [ 670 | "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" 671 | ] 672 | } 673 | ], 674 | "source": [ 675 | "seq = list(range(1, 11))\n", 676 | "\n", 677 | "print(seq)" 678 | ] 679 | }, 680 | { 681 | "cell_type": "code", 682 | "execution_count": 23, 683 | "metadata": {}, 684 | "outputs": [ 685 | { 686 | "data": { 687 | "text/plain": [ 688 | "[2, 4, 6, 8, 10]" 689 | ] 690 | }, 691 | "execution_count": 23, 692 | "metadata": {}, 693 | "output_type": "execute_result" 694 | } 695 | ], 696 | "source": [ 697 | "even_items(seq)" 698 | ] 699 | }, 700 | { 701 | "cell_type": "markdown", 702 | "metadata": {}, 703 | "source": [ 704 | " Reference " 705 | ] 706 | }, 707 | { 708 | "cell_type": "markdown", 709 | "metadata": {}, 710 | "source": [ 711 | "\n", 712 | "### 3.4 `zip` function" 713 | ] 714 | }, 715 | { 716 | "cell_type": "markdown", 717 | "metadata": {}, 718 | "source": [ 719 | "Python’s `zip()` function creates an iterator of tuples that will aggregate elements from two or more iterables." 720 | ] 721 | }, 722 | { 723 | "cell_type": "code", 724 | "execution_count": 24, 725 | "metadata": {}, 726 | "outputs": [ 727 | { 728 | "data": { 729 | "text/plain": [ 730 | "" 731 | ] 732 | }, 733 | "execution_count": 24, 734 | "metadata": {}, 735 | "output_type": "execute_result" 736 | } 737 | ], 738 | "source": [ 739 | "a = [1, 2, 5, 1.3]\n", 740 | "b = ['Nike', ' Adidas', 'Soccer', 'Volleyball']\n", 741 | "\n", 742 | "c = zip(a, b)\n", 743 | "c" 744 | ] 745 | }, 746 | { 747 | "cell_type": "code", 748 | "execution_count": 25, 749 | "metadata": {}, 750 | "outputs": [ 751 | { 752 | "data": { 753 | "text/plain": [ 754 | "[(1, 'Nike'), (2, ' Adidas'), (5, 'Soccer'), (1.3, 'Volleyball')]" 755 | ] 756 | }, 757 | "execution_count": 25, 758 | "metadata": {}, 759 | "output_type": "execute_result" 760 | } 761 | ], 762 | "source": [ 763 | "list(c)" 764 | ] 765 | }, 766 | { 767 | "cell_type": "markdown", 768 | "metadata": {}, 769 | "source": [ 770 | " Reference \n" 771 | ] 772 | }, 773 | { 774 | "cell_type": "markdown", 775 | "metadata": {}, 776 | "source": [ 777 | "\n", 778 | "## 4. Classes\n" 779 | ] 780 | }, 781 | { 782 | "cell_type": "markdown", 783 | "metadata": {}, 784 | "source": [ 785 | "Python is an ***object-oriented programming language*** and almost everything is an object in Python with its own attributes and methods" 786 | ] 787 | }, 788 | { 789 | "cell_type": "markdown", 790 | "metadata": {}, 791 | "source": [ 792 | "TO create a class we use the keyword `class`" 793 | ] 794 | }, 795 | { 796 | "cell_type": "code", 797 | "execution_count": 26, 798 | "metadata": {}, 799 | "outputs": [], 800 | "source": [ 801 | "class Calculator:\n", 802 | " \n", 803 | " intro = 'Hi, this is my calculator! '\n", 804 | " \n", 805 | " def add(self, a, b):\n", 806 | " return a + b\n", 807 | " \n", 808 | " def multiply(self, a, b):\n", 809 | " return a * b" 810 | ] 811 | }, 812 | { 813 | "cell_type": "code", 814 | "execution_count": 27, 815 | "metadata": {}, 816 | "outputs": [ 817 | { 818 | "data": { 819 | "text/plain": [ 820 | "3" 821 | ] 822 | }, 823 | "execution_count": 27, 824 | "metadata": {}, 825 | "output_type": "execute_result" 826 | } 827 | ], 828 | "source": [ 829 | "MyClass = Calculator()\n", 830 | "\n", 831 | "# Methods\n", 832 | "MyClass.add(1, 2)" 833 | ] 834 | }, 835 | { 836 | "cell_type": "code", 837 | "execution_count": 28, 838 | "metadata": {}, 839 | "outputs": [ 840 | { 841 | "name": "stdout", 842 | "output_type": "stream", 843 | "text": [ 844 | "Hi, this is my calculator! \n" 845 | ] 846 | } 847 | ], 848 | "source": [ 849 | "# Attribute \n", 850 | "\n", 851 | "print (MyClass.intro)" 852 | ] 853 | }, 854 | { 855 | "cell_type": "markdown", 856 | "metadata": {}, 857 | "source": [ 858 | " Reference \n" 859 | ] 860 | }, 861 | { 862 | "cell_type": "markdown", 863 | "metadata": {}, 864 | "source": [ 865 | "### [TOP ☝️](#top)" 866 | ] 867 | } 868 | ], 869 | "metadata": { 870 | "interpreter": { 871 | "hash": "ece4c4f9c4961c7468795d846fc72c6e00987d764e9134aaba41ea0514f48bf6" 872 | }, 873 | "kernelspec": { 874 | "display_name": "Python 3 (ipykernel)", 875 | "language": "python", 876 | "name": "python3" 877 | }, 878 | "language_info": { 879 | "codemirror_mode": { 880 | "name": "ipython", 881 | "version": 3 882 | }, 883 | "file_extension": ".py", 884 | "mimetype": "text/x-python", 885 | "name": "python", 886 | "nbconvert_exporter": "python", 887 | "pygments_lexer": "ipython3", 888 | "version": "3.7.9" 889 | } 890 | }, 891 | "nbformat": 4, 892 | "nbformat_minor": 2 893 | } 894 | -------------------------------------------------------------------------------- /5_data_analysis_processing/breast_cancer.csv: -------------------------------------------------------------------------------- 1 | '40-49','premeno','15-19','0-2','yes','3','right','left_up','no','recurrence-events' 2 | '50-59','ge40','15-19','0-2','no','1','right','central','no','no-recurrence-events' 3 | '50-59','ge40','35-39','0-2','no','2','left','left_low','no','recurrence-events' 4 | '40-49','premeno','35-39','0-2','yes','3','right','left_low','yes','no-recurrence-events' 5 | '40-49','premeno','30-34','3-5','yes','2','left','right_up','no','recurrence-events' 6 | '50-59','premeno','25-29','3-5','no','2','right','left_up','yes','no-recurrence-events' 7 | '50-59','ge40','40-44','0-2','no','3','left','left_up','no','no-recurrence-events' 8 | '40-49','premeno','10-14','0-2','no','2','left','left_up','no','no-recurrence-events' 9 | '40-49','premeno','0-4','0-2','no','2','right','right_low','no','no-recurrence-events' 10 | '40-49','ge40','40-44','15-17','yes','2','right','left_up','yes','no-recurrence-events' 11 | '50-59','premeno','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 12 | '60-69','ge40','15-19','0-2','no','2','right','left_up','no','no-recurrence-events' 13 | '50-59','ge40','30-34','0-2','no','1','right','central','no','no-recurrence-events' 14 | '50-59','ge40','25-29','0-2','no','2','right','left_up','no','no-recurrence-events' 15 | '40-49','premeno','25-29','0-2','no','2','left','left_low','yes','recurrence-events' 16 | '30-39','premeno','20-24','0-2','no','3','left','central','no','no-recurrence-events' 17 | '50-59','premeno','10-14','3-5','no','1','right','left_up','no','no-recurrence-events' 18 | '60-69','ge40','15-19','0-2','no','2','right','left_up','no','no-recurrence-events' 19 | '50-59','premeno','40-44','0-2','no','2','left','left_up','no','no-recurrence-events' 20 | '50-59','ge40','20-24','0-2','no','3','left','left_up','no','no-recurrence-events' 21 | '50-59','lt40','20-24','0-2',nan,'1','left','left_low','no','recurrence-events' 22 | '60-69','ge40','40-44','3-5','no','2','right','left_up','yes','no-recurrence-events' 23 | '50-59','ge40','15-19','0-2','no','2','right','left_low','no','no-recurrence-events' 24 | '40-49','premeno','10-14','0-2','no','1','right','left_up','no','no-recurrence-events' 25 | '30-39','premeno','15-19','6-8','yes','3','left','left_low','yes','recurrence-events' 26 | '50-59','ge40','20-24','3-5','yes','2','right','left_up','no','no-recurrence-events' 27 | '50-59','ge40','10-14','0-2','no','2','right','left_low','no','no-recurrence-events' 28 | '40-49','premeno','10-14','0-2','no','1','right','left_up','no','no-recurrence-events' 29 | '60-69','ge40','30-34','3-5','yes','3','left','left_low','no','no-recurrence-events' 30 | '40-49','premeno','15-19','15-17','yes','3','left','left_low','no','recurrence-events' 31 | '60-69','ge40','30-34','0-2','no','3','right','central','no','recurrence-events' 32 | '60-69','ge40','25-29','3-5',nan,'1','right','left_low','yes','no-recurrence-events' 33 | '50-59','ge40','25-29','0-2','no','3','left','right_up','no','no-recurrence-events' 34 | '50-59','ge40','20-24','0-2','no','3','right','left_up','no','no-recurrence-events' 35 | '40-49','premeno','30-34','0-2','no','1','left','left_low','yes','recurrence-events' 36 | '30-39','premeno','15-19','0-2','no','1','left','left_low','no','no-recurrence-events' 37 | '40-49','premeno','10-14','0-2','no','2','right','left_up','no','no-recurrence-events' 38 | '60-69','ge40','45-49','6-8','yes','3','left','central','no','no-recurrence-events' 39 | '40-49','ge40','20-24','0-2','no','3','left','left_low','no','no-recurrence-events' 40 | '40-49','premeno','10-14','0-2','no','1','right','right_low','no','no-recurrence-events' 41 | '30-39','premeno','35-39','0-2','no','3','left','left_low','no','recurrence-events' 42 | '40-49','premeno','35-39','9-11','yes','2','right','right_up','yes','no-recurrence-events' 43 | '60-69','ge40','25-29','0-2','no','2','right','left_low','no','no-recurrence-events' 44 | '50-59','ge40','20-24','3-5','yes','3','right','right_up','no','recurrence-events' 45 | '30-39','premeno','15-19','0-2','no','1','left','left_low','no','no-recurrence-events' 46 | '50-59','premeno','30-34','0-2','no','3','left','right_up','no','recurrence-events' 47 | '60-69','ge40','10-14','0-2','no','2','right','left_up','yes','no-recurrence-events' 48 | '40-49','premeno','35-39','0-2','yes','3','right','left_up','yes','no-recurrence-events' 49 | '50-59','premeno','50-54','0-2','yes','2','right','left_up','yes','no-recurrence-events' 50 | '50-59','ge40','40-44','0-2','no','3','right','left_up','no','no-recurrence-events' 51 | '70-79','ge40','15-19','9-11',nan,'1','left','left_low','yes','recurrence-events' 52 | '50-59','lt40','30-34','0-2','no','3','right','left_up','no','no-recurrence-events' 53 | '40-49','premeno','0-4','0-2','no','3','left','central','no','no-recurrence-events' 54 | '70-79','ge40','40-44','0-2','no','1','right','right_up','no','no-recurrence-events' 55 | '40-49','premeno','25-29','0-2',nan,'2','left','right_low','yes','no-recurrence-events' 56 | '50-59','ge40','25-29','15-17','yes','3','right','left_up','no','no-recurrence-events' 57 | '50-59','premeno','20-24','0-2','no','1','left','left_low','no','no-recurrence-events' 58 | '50-59','ge40','35-39','15-17','no','3','left','left_low','no','no-recurrence-events' 59 | '50-59','ge40','50-54','0-2','no','1','right','right_up','no','no-recurrence-events' 60 | '30-39','premeno','0-4','0-2','no','2','right','central','no','recurrence-events' 61 | '50-59','ge40','40-44','6-8','yes','3','left','left_low','yes','recurrence-events' 62 | '40-49','premeno','30-34','0-2','no','2','right','right_up','yes','no-recurrence-events' 63 | '40-49','ge40','20-24','0-2','no','3','left','left_up','no','no-recurrence-events' 64 | '40-49','premeno','30-34','15-17','yes','3','left','left_low','no','recurrence-events' 65 | '40-49','ge40','20-24','0-2','no','2','right','left_up','no','recurrence-events' 66 | '50-59','ge40','15-19','0-2','no','1','right','central','no','no-recurrence-events' 67 | '30-39','premeno','25-29','0-2','no','2','right','left_low','no','no-recurrence-events' 68 | '60-69','ge40','15-19','0-2','no','2','left','left_low','no','no-recurrence-events' 69 | '50-59','premeno','50-54','9-11','yes','2','right','left_up','no','recurrence-events' 70 | '30-39','premeno','10-14','0-2','no','1','right','left_low','no','no-recurrence-events' 71 | '50-59','premeno','25-29','3-5','yes','3','left','left_low','yes','recurrence-events' 72 | '60-69','ge40','25-29','3-5',nan,'1','right','left_up','yes','no-recurrence-events' 73 | '60-69','ge40','10-14','0-2','no','1','right','left_low','no','no-recurrence-events' 74 | '50-59','ge40','30-34','6-8','yes','3','left','right_low','no','recurrence-events' 75 | '30-39','premeno','25-29','6-8','yes','3','left','right_low','yes','recurrence-events' 76 | '50-59','ge40','10-14','0-2','no','1','left','left_low','no','no-recurrence-events' 77 | '50-59','premeno','15-19','0-2','no','1','left','left_low','no','no-recurrence-events' 78 | '40-49','premeno','25-29','0-2','no','2','right','central','no','no-recurrence-events' 79 | '40-49','premeno','25-29','0-2','no','3','left','right_up','no','recurrence-events' 80 | '60-69','ge40','30-34','6-8','yes','2','right','right_up','no','no-recurrence-events' 81 | '50-59','lt40','15-19','0-2','no','2','left','left_low','no','no-recurrence-events' 82 | '40-49','premeno','25-29','0-2','no','2','right','left_low','no','no-recurrence-events' 83 | '40-49','premeno','30-34','0-2','no','1','right','left_up','no','no-recurrence-events' 84 | '60-69','ge40','15-19','0-2','no','2','left','left_up','yes','no-recurrence-events' 85 | '30-39','premeno','0-4','0-2','no','2','right','central','no','no-recurrence-events' 86 | '50-59','ge40','35-39','0-2','no','3','left','left_up','no','no-recurrence-events' 87 | '40-49','premeno','40-44','0-2','no','1','right','left_up','no','no-recurrence-events' 88 | '30-39','premeno','25-29','6-8','yes','2','right','left_up','yes','no-recurrence-events' 89 | '50-59','ge40','20-24','0-2','no','1','right','left_low','no','no-recurrence-events' 90 | '50-59','ge40','30-34','0-2','no','1','left','left_up','no','no-recurrence-events' 91 | '60-69','ge40','20-24','0-2','no','1','right','left_up','no','recurrence-events' 92 | '30-39','premeno','30-34','3-5','no','3','right','left_up','yes','recurrence-events' 93 | '50-59','lt40','20-24','0-2',nan,'1','left','left_up','no','recurrence-events' 94 | '50-59','premeno','10-14','0-2','no','2','right','left_up','no','no-recurrence-events' 95 | '50-59','ge40','20-24','0-2','no','2','right','left_up','no','no-recurrence-events' 96 | '40-49','premeno','45-49','0-2','no','2','left','left_low','yes','no-recurrence-events' 97 | '30-39','premeno','40-44','0-2','no','1','left','left_up','no','recurrence-events' 98 | '50-59','premeno','10-14','0-2','no','1','left','left_low','no','no-recurrence-events' 99 | '60-69','ge40','30-34','0-2','no','3','right','left_up','yes','recurrence-events' 100 | '40-49','premeno','35-39','0-2','no','1','right','left_up','no','recurrence-events' 101 | '40-49','premeno','20-24','3-5','yes','2','left','left_low','yes','recurrence-events' 102 | '50-59','premeno','15-19','0-2','no','2','left','left_low','no','recurrence-events' 103 | '50-59','ge40','30-34','0-2','no','3','right','left_low','no','no-recurrence-events' 104 | '60-69','ge40','20-24','0-2','no','2','left','left_up','no','no-recurrence-events' 105 | '40-49','premeno','20-24','0-2','no','1','left','right_low','no','no-recurrence-events' 106 | '60-69','ge40','30-34','3-5','yes','2','left','central','yes','recurrence-events' 107 | '60-69','ge40','20-24','3-5','no','2','left','left_low','yes','recurrence-events' 108 | '50-59','premeno','25-29','0-2','no','2','left','right_up','no','recurrence-events' 109 | '50-59','ge40','30-34','0-2','no','1','right','right_up','no','no-recurrence-events' 110 | '40-49','premeno','20-24','0-2','no','2','left','right_low','no','no-recurrence-events' 111 | '60-69','ge40','15-19','0-2','no','1','right','left_up','no','no-recurrence-events' 112 | '60-69','ge40','30-34','0-2','no','2','left','left_low','yes','no-recurrence-events' 113 | '30-39','premeno','30-34','0-2','no','2','left','left_up','no','no-recurrence-events' 114 | '30-39','premeno','40-44','3-5','no','3','right','right_up','yes','no-recurrence-events' 115 | '60-69','ge40','5-9','0-2','no','1','left','central','no','no-recurrence-events' 116 | '60-69','ge40','10-14','0-2','no','1','left','left_up','no','no-recurrence-events' 117 | '40-49','premeno','30-34','6-8','yes','3','right','left_up','no','recurrence-events' 118 | '60-69','ge40','10-14','0-2','no','1','left','left_up','no','no-recurrence-events' 119 | '40-49','premeno','35-39','9-11','yes','2','right','left_up','yes','no-recurrence-events' 120 | '40-49','premeno','20-24','0-2','no','1','right','left_low','no','no-recurrence-events' 121 | '40-49','premeno','30-34','0-2','yes','3','right','right_up','no','recurrence-events' 122 | '50-59','premeno','25-29','0-2','yes','2','left','left_up','no','no-recurrence-events' 123 | '40-49','premeno','15-19','0-2','no','2','left','left_low','no','no-recurrence-events' 124 | '30-39','premeno','35-39','9-11','yes','3','left','left_low','no','recurrence-events' 125 | '30-39','premeno','10-14','0-2','no','2','left','right_low','no','no-recurrence-events' 126 | '50-59','ge40','30-34','0-2','no','1','right','left_low','no','no-recurrence-events' 127 | '60-69','ge40','30-34','0-2','no','2','left','left_up','no','no-recurrence-events' 128 | '60-69','ge40','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 129 | '40-49','premeno','15-19','0-2','no','2','left','left_up','no','recurrence-events' 130 | '60-69','ge40','15-19','0-2','no','2','right','left_low','no','no-recurrence-events' 131 | '40-49','premeno','30-34','0-2','no','2','left','right_low','no','no-recurrence-events' 132 | '20-29','premeno','35-39','0-2','no','2','right','right_up','no','no-recurrence-events' 133 | '40-49','premeno','30-34','0-2','no','3','right','right_up','no','recurrence-events' 134 | '40-49','premeno','25-29','0-2','no','2','right','left_low','no','recurrence-events' 135 | '30-39','premeno','30-34','0-2','no','3','left','left_low','no','no-recurrence-events' 136 | '30-39','premeno','15-19','0-2','no','1','right','left_low','no','recurrence-events' 137 | '50-59','ge40','0-4','0-2','no','1','right','central','no','no-recurrence-events' 138 | '50-59','ge40','0-4','0-2','no','1','left','left_low','no','no-recurrence-events' 139 | '60-69','ge40','50-54','0-2','no','3','right','left_up','no','recurrence-events' 140 | '50-59','premeno','30-34','0-2','no','1','left','central','no','no-recurrence-events' 141 | '60-69','ge40','20-24','24-26','yes','3','left','left_low','yes','recurrence-events' 142 | '40-49','premeno','25-29','0-2','no','2','left','left_up','no','no-recurrence-events' 143 | '40-49','premeno','30-34','3-5','no','2','right','left_up','no','recurrence-events' 144 | '50-59','premeno','20-24','3-5','yes','2','left','left_low','no','no-recurrence-events' 145 | '50-59','ge40','15-19','0-2','yes','2','left','central','yes','no-recurrence-events' 146 | '50-59','premeno','10-14','0-2','no','3','left','left_low','no','no-recurrence-events' 147 | '30-39','premeno','30-34','9-11','no','2','right','left_up','yes','recurrence-events' 148 | '60-69','ge40','10-14','0-2','no','1','left','left_low','no','no-recurrence-events' 149 | '40-49','premeno','40-44','0-2','no','2','right','left_low','no','no-recurrence-events' 150 | '50-59','ge40','30-34','9-11',nan,'3','left','left_up','yes','no-recurrence-events' 151 | '40-49','premeno','50-54','0-2','no','2','right','left_low','yes','recurrence-events' 152 | '50-59','ge40','15-19','0-2','no','2','right','right_up','no','no-recurrence-events' 153 | '50-59','ge40','40-44','3-5','yes','2','left','left_low','no','no-recurrence-events' 154 | '30-39','premeno','25-29','3-5','yes','3','left','left_low','yes','recurrence-events' 155 | '60-69','ge40','10-14','0-2','no','2','left','left_low','no','no-recurrence-events' 156 | '60-69','lt40','10-14','0-2','no','1','left','right_up','no','no-recurrence-events' 157 | '30-39','premeno','30-34','0-2','no','2','left','left_up','no','recurrence-events' 158 | '30-39','premeno','20-24','3-5','yes','2','left','left_low','no','recurrence-events' 159 | '50-59','ge40','10-14','0-2','no','1','right','left_up','no','no-recurrence-events' 160 | '60-69','ge40','25-29','0-2','no','3','right','left_up','no','no-recurrence-events' 161 | '50-59','ge40','25-29','3-5','yes','3','right','left_up','no','no-recurrence-events' 162 | '40-49','premeno','30-34','6-8','no','2','left','left_up','no','no-recurrence-events' 163 | '60-69','ge40','50-54','0-2','no','2','left','left_low','no','no-recurrence-events' 164 | '50-59','premeno','30-34','0-2','no','3','left','left_low','no','no-recurrence-events' 165 | '40-49','ge40','20-24','3-5','no','3','right','left_low','yes','recurrence-events' 166 | '50-59','ge40','30-34','6-8','yes','2','left','right_low','yes','recurrence-events' 167 | '60-69','ge40','25-29','3-5','no','2','right','right_up','no','recurrence-events' 168 | '40-49','premeno','20-24','0-2','no','2','left','central','no','no-recurrence-events' 169 | '40-49','premeno','20-24','0-2','no','2','left','left_up','no','no-recurrence-events' 170 | '40-49','premeno','50-54','0-2','no','2','left','left_low','no','no-recurrence-events' 171 | '50-59','ge40','20-24','0-2','no','2','right','central','no','recurrence-events' 172 | '50-59','ge40','30-34','3-5','no','3','right','left_up','no','recurrence-events' 173 | '40-49','ge40','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 174 | '50-59','premeno','25-29','0-2','no','1','right','left_up','no','recurrence-events' 175 | '40-49','premeno','40-44','3-5','yes','3','right','left_up','yes','no-recurrence-events' 176 | '40-49','premeno','20-24','0-2','no','2','right','left_up','no','no-recurrence-events' 177 | '40-49','premeno','20-24','3-5','no','2','right','left_up','no','no-recurrence-events' 178 | '40-49','premeno','25-29','9-11','yes','3','right','left_up','no','recurrence-events' 179 | '40-49','premeno','25-29','0-2','no','2','right','left_low','no','recurrence-events' 180 | '40-49','premeno','20-24','0-2','no','1','right','right_up','no','no-recurrence-events' 181 | '30-39','premeno','40-44','0-2','no','2','right','right_up','no','no-recurrence-events' 182 | '60-69','ge40','10-14','6-8','yes','3','left','left_up','yes','recurrence-events' 183 | '40-49','premeno','35-39','0-2','no','1','left','left_low','no','no-recurrence-events' 184 | '50-59','ge40','30-34','3-5','no','3','left','left_low','no','recurrence-events' 185 | '40-49','premeno','5-9','0-2','no','1','left','left_low','yes','no-recurrence-events' 186 | '60-69','ge40','15-19','0-2','no','1','left','right_low','no','no-recurrence-events' 187 | '40-49','premeno','30-34','0-2','no','3','right','right_up','no','no-recurrence-events' 188 | '40-49','premeno','25-29','0-2','no','3','left','left_up','no','recurrence-events' 189 | '50-59','ge40','5-9','0-2','no','2','right','right_up','no','no-recurrence-events' 190 | '50-59','premeno','25-29','0-2','no','2','right','right_low','no','no-recurrence-events' 191 | '50-59','premeno','25-29','0-2','no','2','left','right_up','no','recurrence-events' 192 | '40-49','premeno','10-14','0-2','no','2','left','left_low','yes','no-recurrence-events' 193 | '60-69','ge40','35-39','6-8','yes','3','left','left_low','no','recurrence-events' 194 | '60-69','ge40','50-54','0-2','no','2','right','left_up','yes','no-recurrence-events' 195 | '40-49','premeno','25-29','0-2','no','2','right','left_up','no','no-recurrence-events' 196 | '30-39','premeno','20-24','3-5','no','2','right','central','no','no-recurrence-events' 197 | '30-39','premeno','30-34','0-2','no','1','right','left_up','no','recurrence-events' 198 | '60-69','lt40','30-34','0-2','no','1','left','left_low','no','no-recurrence-events' 199 | '40-49','premeno','15-19','12-14','no','3','right','right_low','yes','no-recurrence-events' 200 | '60-69','ge40','20-24','0-2','no','3','right','left_low','no','recurrence-events' 201 | '30-39','premeno','5-9','0-2','no','2','left','right_low','no','no-recurrence-events' 202 | '40-49','premeno','30-34','0-2','no','3','left','left_up','no','no-recurrence-events' 203 | '60-69','ge40','30-34','0-2','no','3','left','left_low','no','no-recurrence-events' 204 | '40-49','premeno','25-29','0-2','no','1','right','right_low','no','no-recurrence-events' 205 | '40-49','premeno','25-29','0-2','no','1','left','right_low','no','no-recurrence-events' 206 | '60-69','ge40','40-44','3-5','yes','3','right','left_low','no','recurrence-events' 207 | '50-59','ge40','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 208 | '50-59','premeno','30-34','0-2','no','3','right','left_up','yes','recurrence-events' 209 | '40-49','ge40','30-34','3-5','no','3','left','left_low','no','recurrence-events' 210 | '40-49','premeno','25-29','0-2','no','1','right','left_low','yes','no-recurrence-events' 211 | '40-49','ge40','25-29','12-14','yes','3','left','right_low','yes','recurrence-events' 212 | '40-49','premeno','40-44','0-2','no','1','left','left_low','no','recurrence-events' 213 | '40-49','premeno','20-24','0-2','no','2','left','left_low','no','no-recurrence-events' 214 | '50-59','ge40','25-29','0-2','no','1','left','right_low','no','no-recurrence-events' 215 | '40-49','premeno','20-24','0-2','no','2','right','left_up','no','no-recurrence-events' 216 | '70-79','ge40','40-44','0-2','no','1','right','left_up','no','no-recurrence-events' 217 | '60-69','ge40','25-29','0-2','no','3','left','left_up','no','recurrence-events' 218 | '50-59','premeno','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 219 | '60-69','ge40','45-49','0-2','no','1','right','right_up','yes','recurrence-events' 220 | '50-59','ge40','20-24','0-2','yes','2','right','left_up','no','no-recurrence-events' 221 | '50-59','ge40','25-29','0-2','no','1','left','left_low','no','no-recurrence-events' 222 | '50-59','ge40','20-24','0-2','no','3','left','left_up','no','no-recurrence-events' 223 | '40-49','premeno','20-24','3-5','no','2','right','left_low','no','no-recurrence-events' 224 | '50-59','ge40','35-39','0-2','no','2','left','left_up','no','no-recurrence-events' 225 | '30-39','premeno','20-24','0-2','no','3','left','left_up','yes','recurrence-events' 226 | '60-69','ge40','30-34','0-2','no','1','right','left_up','no','no-recurrence-events' 227 | '60-69','ge40','25-29','0-2','no','3','right','left_low','no','no-recurrence-events' 228 | '40-49','ge40','30-34','0-2','no','2','left','left_up','yes','no-recurrence-events' 229 | '30-39','premeno','25-29','0-2','no','2','left','left_low','no','no-recurrence-events' 230 | '40-49','premeno','20-24','0-2','no','2','left','left_low','no','recurrence-events' 231 | '30-39','premeno','20-24','0-2','no','2','left','right_low','no','no-recurrence-events' 232 | '40-49','premeno','10-14','0-2','no','2','right','left_low','no','no-recurrence-events' 233 | '50-59','premeno','15-19','0-2','no','2','right','right_low','no','no-recurrence-events' 234 | '50-59','premeno','25-29','0-2','no','1','right','left_up','no','no-recurrence-events' 235 | '60-69','ge40','20-24','0-2','no','2','right','left_up','no','no-recurrence-events' 236 | '60-69','ge40','40-44','0-2','no','2','right','left_low','no','recurrence-events' 237 | '30-39','lt40','15-19','0-2','no','3','right','left_up','no','no-recurrence-events' 238 | '40-49','premeno','30-34','12-14','yes','3','left','left_up','yes','recurrence-events' 239 | '60-69','ge40','30-34','0-2','yes','2','right','right_up','yes','recurrence-events' 240 | '50-59','ge40','40-44','6-8','yes','3','left','left_low','yes','recurrence-events' 241 | '50-59','ge40','30-34','0-2','no','3','left',nan,'no','recurrence-events' 242 | '70-79','ge40','10-14','0-2','no','2','left','central','no','no-recurrence-events' 243 | '30-39','premeno','40-44','0-2','no','2','left','left_low','yes','no-recurrence-events' 244 | '40-49','premeno','30-34','0-2','no','2','right','right_low','no','no-recurrence-events' 245 | '40-49','premeno','30-34','0-2','no','1','left','left_low','no','no-recurrence-events' 246 | '60-69','ge40','15-19','0-2','no','2','left','left_low','no','no-recurrence-events' 247 | '40-49','premeno','10-14','0-2','no','2','left','left_low','no','no-recurrence-events' 248 | '60-69','ge40','20-24','0-2','no','1','left','left_low','no','no-recurrence-events' 249 | '50-59','ge40','10-14','0-2','no','1','left','left_up','no','no-recurrence-events' 250 | '50-59','premeno','25-29','0-2','no','1','left','left_low','no','no-recurrence-events' 251 | '50-59','ge40','30-34','9-11','yes','3','left','right_low','yes','recurrence-events' 252 | '50-59','ge40','10-14','0-2','no','2','left','left_low','no','no-recurrence-events' 253 | '40-49','premeno','30-34','0-2','no','1','left','right_up','no','no-recurrence-events' 254 | '70-79','ge40','0-4','0-2','no','1','left','right_low','no','no-recurrence-events' 255 | '40-49','premeno','25-29','0-2','no','3','right','left_up','yes','no-recurrence-events' 256 | '50-59','premeno','25-29','0-2','no','3','right','left_low','yes','recurrence-events' 257 | '50-59','ge40','40-44','0-2','no','2','left','left_low','no','no-recurrence-events' 258 | '60-69','ge40','25-29','0-2','no','3','left','right_low','yes','recurrence-events' 259 | '40-49','premeno','30-34','3-5','yes','2','right','left_low','no','no-recurrence-events' 260 | '50-59','ge40','20-24','0-2','no','2','left','left_up','no','recurrence-events' 261 | '70-79','ge40','20-24','0-2','no','3','left','left_up','no','no-recurrence-events' 262 | '30-39','premeno','25-29','0-2','no','1','left','central','no','no-recurrence-events' 263 | '60-69','ge40','30-34','0-2','no','2','left','left_low','no','no-recurrence-events' 264 | '40-49','premeno','20-24','3-5','yes','2','right','right_up','yes','recurrence-events' 265 | '50-59','ge40','30-34','9-11',nan,'3','left','left_low','yes','no-recurrence-events' 266 | '50-59','ge40','0-4','0-2','no','2','left','central','no','no-recurrence-events' 267 | '40-49','premeno','20-24','0-2','no','3','right','left_low','yes','no-recurrence-events' 268 | '30-39','premeno','35-39','0-2','no','3','left','left_low','no','recurrence-events' 269 | '60-69','ge40','30-34','0-2','no','1','left','left_up','no','no-recurrence-events' 270 | '60-69','ge40','20-24','0-2','no','1','left','left_low','no','no-recurrence-events' 271 | '50-59','ge40','25-29','6-8','no','3','left','left_low','yes','recurrence-events' 272 | '50-59','premeno','35-39','15-17','yes','3','right','right_up','no','recurrence-events' 273 | '30-39','premeno','20-24','3-5','yes','2','right','left_up','yes','no-recurrence-events' 274 | '40-49','premeno','20-24','6-8','no','2','right','left_low','yes','no-recurrence-events' 275 | '50-59','ge40','35-39','0-2','no','3','left','left_low','no','no-recurrence-events' 276 | '50-59','premeno','35-39','0-2','no','2','right','left_up','no','no-recurrence-events' 277 | '40-49','premeno','25-29','0-2','no','2','left','left_up','yes','no-recurrence-events' 278 | '40-49','premeno','35-39','0-2','no','2','right','right_up','no','no-recurrence-events' 279 | '50-59','premeno','30-34','3-5','yes','2','left','left_low','yes','no-recurrence-events' 280 | '40-49','premeno','20-24','0-2','no','2','right','right_up','no','no-recurrence-events' 281 | '60-69','ge40','15-19','0-2','no','3','right','left_up','yes','no-recurrence-events' 282 | '50-59','ge40','30-34','6-8','yes','2','left','left_low','no','no-recurrence-events' 283 | '50-59','premeno','25-29','3-5','yes','2','left','left_low','yes','no-recurrence-events' 284 | '30-39','premeno','30-34','6-8','yes','2','right','right_up','no','no-recurrence-events' 285 | '50-59','premeno','15-19','0-2','no','2','right','left_low','no','no-recurrence-events' 286 | '50-59','ge40','40-44','0-2','no','3','left','right_up','no','no-recurrence-events' -------------------------------------------------------------------------------- /data/titanic_test.csv: -------------------------------------------------------------------------------- 1 | PassengerId,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked 2 | 892,3,"Kelly, Mr. James",male,34.5,0,0,330911,7.8292,,Q 3 | 893,3,"Wilkes, Mrs. James (Ellen Needs)",female,47,1,0,363272,7,,S 4 | 894,2,"Myles, Mr. Thomas Francis",male,62,0,0,240276,9.6875,,Q 5 | 895,3,"Wirz, Mr. Albert",male,27,0,0,315154,8.6625,,S 6 | 896,3,"Hirvonen, Mrs. Alexander (Helga E Lindqvist)",female,22,1,1,3101298,12.2875,,S 7 | 897,3,"Svensson, Mr. Johan Cervin",male,14,0,0,7538,9.225,,S 8 | 898,3,"Connolly, Miss. Kate",female,30,0,0,330972,7.6292,,Q 9 | 899,2,"Caldwell, Mr. Albert Francis",male,26,1,1,248738,29,,S 10 | 900,3,"Abrahim, Mrs. Joseph (Sophie Halaut Easu)",female,18,0,0,2657,7.2292,,C 11 | 901,3,"Davies, Mr. John Samuel",male,21,2,0,A/4 48871,24.15,,S 12 | 902,3,"Ilieff, Mr. Ylio",male,,0,0,349220,7.8958,,S 13 | 903,1,"Jones, Mr. Charles Cresson",male,46,0,0,694,26,,S 14 | 904,1,"Snyder, Mrs. John Pillsbury (Nelle Stevenson)",female,23,1,0,21228,82.2667,B45,S 15 | 905,2,"Howard, Mr. Benjamin",male,63,1,0,24065,26,,S 16 | 906,1,"Chaffee, Mrs. Herbert Fuller (Carrie Constance Toogood)",female,47,1,0,W.E.P. 5734,61.175,E31,S 17 | 907,2,"del Carlo, Mrs. Sebastiano (Argenia Genovesi)",female,24,1,0,SC/PARIS 2167,27.7208,,C 18 | 908,2,"Keane, Mr. Daniel",male,35,0,0,233734,12.35,,Q 19 | 909,3,"Assaf, Mr. Gerios",male,21,0,0,2692,7.225,,C 20 | 910,3,"Ilmakangas, Miss. Ida Livija",female,27,1,0,STON/O2. 3101270,7.925,,S 21 | 911,3,"Assaf Khalil, Mrs. Mariana (Miriam"")""",female,45,0,0,2696,7.225,,C 22 | 912,1,"Rothschild, Mr. Martin",male,55,1,0,PC 17603,59.4,,C 23 | 913,3,"Olsen, Master. Artur Karl",male,9,0,1,C 17368,3.1708,,S 24 | 914,1,"Flegenheim, Mrs. Alfred (Antoinette)",female,,0,0,PC 17598,31.6833,,S 25 | 915,1,"Williams, Mr. Richard Norris II",male,21,0,1,PC 17597,61.3792,,C 26 | 916,1,"Ryerson, Mrs. Arthur Larned (Emily Maria Borie)",female,48,1,3,PC 17608,262.375,B57 B59 B63 B66,C 27 | 917,3,"Robins, Mr. Alexander A",male,50,1,0,A/5. 3337,14.5,,S 28 | 918,1,"Ostby, Miss. Helene Ragnhild",female,22,0,1,113509,61.9792,B36,C 29 | 919,3,"Daher, Mr. Shedid",male,22.5,0,0,2698,7.225,,C 30 | 920,1,"Brady, Mr. John Bertram",male,41,0,0,113054,30.5,A21,S 31 | 921,3,"Samaan, Mr. Elias",male,,2,0,2662,21.6792,,C 32 | 922,2,"Louch, Mr. Charles Alexander",male,50,1,0,SC/AH 3085,26,,S 33 | 923,2,"Jefferys, Mr. Clifford Thomas",male,24,2,0,C.A. 31029,31.5,,S 34 | 924,3,"Dean, Mrs. Bertram (Eva Georgetta Light)",female,33,1,2,C.A. 2315,20.575,,S 35 | 925,3,"Johnston, Mrs. Andrew G (Elizabeth Lily"" Watson)""",female,,1,2,W./C. 6607,23.45,,S 36 | 926,1,"Mock, Mr. Philipp Edmund",male,30,1,0,13236,57.75,C78,C 37 | 927,3,"Katavelas, Mr. Vassilios (Catavelas Vassilios"")""",male,18.5,0,0,2682,7.2292,,C 38 | 928,3,"Roth, Miss. Sarah A",female,,0,0,342712,8.05,,S 39 | 929,3,"Cacic, Miss. Manda",female,21,0,0,315087,8.6625,,S 40 | 930,3,"Sap, Mr. Julius",male,25,0,0,345768,9.5,,S 41 | 931,3,"Hee, Mr. Ling",male,,0,0,1601,56.4958,,S 42 | 932,3,"Karun, Mr. Franz",male,39,0,1,349256,13.4167,,C 43 | 933,1,"Franklin, Mr. Thomas Parham",male,,0,0,113778,26.55,D34,S 44 | 934,3,"Goldsmith, Mr. Nathan",male,41,0,0,SOTON/O.Q. 3101263,7.85,,S 45 | 935,2,"Corbett, Mrs. Walter H (Irene Colvin)",female,30,0,0,237249,13,,S 46 | 936,1,"Kimball, Mrs. Edwin Nelson Jr (Gertrude Parsons)",female,45,1,0,11753,52.5542,D19,S 47 | 937,3,"Peltomaki, Mr. Nikolai Johannes",male,25,0,0,STON/O 2. 3101291,7.925,,S 48 | 938,1,"Chevre, Mr. Paul Romaine",male,45,0,0,PC 17594,29.7,A9,C 49 | 939,3,"Shaughnessy, Mr. Patrick",male,,0,0,370374,7.75,,Q 50 | 940,1,"Bucknell, Mrs. William Robert (Emma Eliza Ward)",female,60,0,0,11813,76.2917,D15,C 51 | 941,3,"Coutts, Mrs. William (Winnie Minnie"" Treanor)""",female,36,0,2,C.A. 37671,15.9,,S 52 | 942,1,"Smith, Mr. Lucien Philip",male,24,1,0,13695,60,C31,S 53 | 943,2,"Pulbaum, Mr. Franz",male,27,0,0,SC/PARIS 2168,15.0333,,C 54 | 944,2,"Hocking, Miss. Ellen Nellie""""",female,20,2,1,29105,23,,S 55 | 945,1,"Fortune, Miss. Ethel Flora",female,28,3,2,19950,263,C23 C25 C27,S 56 | 946,2,"Mangiavacchi, Mr. Serafino Emilio",male,,0,0,SC/A.3 2861,15.5792,,C 57 | 947,3,"Rice, Master. Albert",male,10,4,1,382652,29.125,,Q 58 | 948,3,"Cor, Mr. Bartol",male,35,0,0,349230,7.8958,,S 59 | 949,3,"Abelseth, Mr. Olaus Jorgensen",male,25,0,0,348122,7.65,F G63,S 60 | 950,3,"Davison, Mr. Thomas Henry",male,,1,0,386525,16.1,,S 61 | 951,1,"Chaudanson, Miss. Victorine",female,36,0,0,PC 17608,262.375,B61,C 62 | 952,3,"Dika, Mr. Mirko",male,17,0,0,349232,7.8958,,S 63 | 953,2,"McCrae, Mr. Arthur Gordon",male,32,0,0,237216,13.5,,S 64 | 954,3,"Bjorklund, Mr. Ernst Herbert",male,18,0,0,347090,7.75,,S 65 | 955,3,"Bradley, Miss. Bridget Delia",female,22,0,0,334914,7.725,,Q 66 | 956,1,"Ryerson, Master. John Borie",male,13,2,2,PC 17608,262.375,B57 B59 B63 B66,C 67 | 957,2,"Corey, Mrs. Percy C (Mary Phyllis Elizabeth Miller)",female,,0,0,F.C.C. 13534,21,,S 68 | 958,3,"Burns, Miss. Mary Delia",female,18,0,0,330963,7.8792,,Q 69 | 959,1,"Moore, Mr. Clarence Bloomfield",male,47,0,0,113796,42.4,,S 70 | 960,1,"Tucker, Mr. Gilbert Milligan Jr",male,31,0,0,2543,28.5375,C53,C 71 | 961,1,"Fortune, Mrs. Mark (Mary McDougald)",female,60,1,4,19950,263,C23 C25 C27,S 72 | 962,3,"Mulvihill, Miss. Bertha E",female,24,0,0,382653,7.75,,Q 73 | 963,3,"Minkoff, Mr. Lazar",male,21,0,0,349211,7.8958,,S 74 | 964,3,"Nieminen, Miss. Manta Josefina",female,29,0,0,3101297,7.925,,S 75 | 965,1,"Ovies y Rodriguez, Mr. Servando",male,28.5,0,0,PC 17562,27.7208,D43,C 76 | 966,1,"Geiger, Miss. Amalie",female,35,0,0,113503,211.5,C130,C 77 | 967,1,"Keeping, Mr. Edwin",male,32.5,0,0,113503,211.5,C132,C 78 | 968,3,"Miles, Mr. Frank",male,,0,0,359306,8.05,,S 79 | 969,1,"Cornell, Mrs. Robert Clifford (Malvina Helen Lamson)",female,55,2,0,11770,25.7,C101,S 80 | 970,2,"Aldworth, Mr. Charles Augustus",male,30,0,0,248744,13,,S 81 | 971,3,"Doyle, Miss. Elizabeth",female,24,0,0,368702,7.75,,Q 82 | 972,3,"Boulos, Master. Akar",male,6,1,1,2678,15.2458,,C 83 | 973,1,"Straus, Mr. Isidor",male,67,1,0,PC 17483,221.7792,C55 C57,S 84 | 974,1,"Case, Mr. Howard Brown",male,49,0,0,19924,26,,S 85 | 975,3,"Demetri, Mr. Marinko",male,,0,0,349238,7.8958,,S 86 | 976,2,"Lamb, Mr. John Joseph",male,,0,0,240261,10.7083,,Q 87 | 977,3,"Khalil, Mr. Betros",male,,1,0,2660,14.4542,,C 88 | 978,3,"Barry, Miss. Julia",female,27,0,0,330844,7.8792,,Q 89 | 979,3,"Badman, Miss. Emily Louisa",female,18,0,0,A/4 31416,8.05,,S 90 | 980,3,"O'Donoghue, Ms. Bridget",female,,0,0,364856,7.75,,Q 91 | 981,2,"Wells, Master. Ralph Lester",male,2,1,1,29103,23,,S 92 | 982,3,"Dyker, Mrs. Adolf Fredrik (Anna Elisabeth Judith Andersson)",female,22,1,0,347072,13.9,,S 93 | 983,3,"Pedersen, Mr. Olaf",male,,0,0,345498,7.775,,S 94 | 984,1,"Davidson, Mrs. Thornton (Orian Hays)",female,27,1,2,F.C. 12750,52,B71,S 95 | 985,3,"Guest, Mr. Robert",male,,0,0,376563,8.05,,S 96 | 986,1,"Birnbaum, Mr. Jakob",male,25,0,0,13905,26,,C 97 | 987,3,"Tenglin, Mr. Gunnar Isidor",male,25,0,0,350033,7.7958,,S 98 | 988,1,"Cavendish, Mrs. Tyrell William (Julia Florence Siegel)",female,76,1,0,19877,78.85,C46,S 99 | 989,3,"Makinen, Mr. Kalle Edvard",male,29,0,0,STON/O 2. 3101268,7.925,,S 100 | 990,3,"Braf, Miss. Elin Ester Maria",female,20,0,0,347471,7.8542,,S 101 | 991,3,"Nancarrow, Mr. William Henry",male,33,0,0,A./5. 3338,8.05,,S 102 | 992,1,"Stengel, Mrs. Charles Emil Henry (Annie May Morris)",female,43,1,0,11778,55.4417,C116,C 103 | 993,2,"Weisz, Mr. Leopold",male,27,1,0,228414,26,,S 104 | 994,3,"Foley, Mr. William",male,,0,0,365235,7.75,,Q 105 | 995,3,"Johansson Palmquist, Mr. Oskar Leander",male,26,0,0,347070,7.775,,S 106 | 996,3,"Thomas, Mrs. Alexander (Thamine Thelma"")""",female,16,1,1,2625,8.5167,,C 107 | 997,3,"Holthen, Mr. Johan Martin",male,28,0,0,C 4001,22.525,,S 108 | 998,3,"Buckley, Mr. Daniel",male,21,0,0,330920,7.8208,,Q 109 | 999,3,"Ryan, Mr. Edward",male,,0,0,383162,7.75,,Q 110 | 1000,3,"Willer, Mr. Aaron (Abi Weller"")""",male,,0,0,3410,8.7125,,S 111 | 1001,2,"Swane, Mr. George",male,18.5,0,0,248734,13,F,S 112 | 1002,2,"Stanton, Mr. Samuel Ward",male,41,0,0,237734,15.0458,,C 113 | 1003,3,"Shine, Miss. Ellen Natalia",female,,0,0,330968,7.7792,,Q 114 | 1004,1,"Evans, Miss. Edith Corse",female,36,0,0,PC 17531,31.6792,A29,C 115 | 1005,3,"Buckley, Miss. Katherine",female,18.5,0,0,329944,7.2833,,Q 116 | 1006,1,"Straus, Mrs. Isidor (Rosalie Ida Blun)",female,63,1,0,PC 17483,221.7792,C55 C57,S 117 | 1007,3,"Chronopoulos, Mr. Demetrios",male,18,1,0,2680,14.4542,,C 118 | 1008,3,"Thomas, Mr. John",male,,0,0,2681,6.4375,,C 119 | 1009,3,"Sandstrom, Miss. Beatrice Irene",female,1,1,1,PP 9549,16.7,G6,S 120 | 1010,1,"Beattie, Mr. Thomson",male,36,0,0,13050,75.2417,C6,C 121 | 1011,2,"Chapman, Mrs. John Henry (Sara Elizabeth Lawry)",female,29,1,0,SC/AH 29037,26,,S 122 | 1012,2,"Watt, Miss. Bertha J",female,12,0,0,C.A. 33595,15.75,,S 123 | 1013,3,"Kiernan, Mr. John",male,,1,0,367227,7.75,,Q 124 | 1014,1,"Schabert, Mrs. Paul (Emma Mock)",female,35,1,0,13236,57.75,C28,C 125 | 1015,3,"Carver, Mr. Alfred John",male,28,0,0,392095,7.25,,S 126 | 1016,3,"Kennedy, Mr. John",male,,0,0,368783,7.75,,Q 127 | 1017,3,"Cribb, Miss. Laura Alice",female,17,0,1,371362,16.1,,S 128 | 1018,3,"Brobeck, Mr. Karl Rudolf",male,22,0,0,350045,7.7958,,S 129 | 1019,3,"McCoy, Miss. Alicia",female,,2,0,367226,23.25,,Q 130 | 1020,2,"Bowenur, Mr. Solomon",male,42,0,0,211535,13,,S 131 | 1021,3,"Petersen, Mr. Marius",male,24,0,0,342441,8.05,,S 132 | 1022,3,"Spinner, Mr. Henry John",male,32,0,0,STON/OQ. 369943,8.05,,S 133 | 1023,1,"Gracie, Col. Archibald IV",male,53,0,0,113780,28.5,C51,C 134 | 1024,3,"Lefebre, Mrs. Frank (Frances)",female,,0,4,4133,25.4667,,S 135 | 1025,3,"Thomas, Mr. Charles P",male,,1,0,2621,6.4375,,C 136 | 1026,3,"Dintcheff, Mr. Valtcho",male,43,0,0,349226,7.8958,,S 137 | 1027,3,"Carlsson, Mr. Carl Robert",male,24,0,0,350409,7.8542,,S 138 | 1028,3,"Zakarian, Mr. Mapriededer",male,26.5,0,0,2656,7.225,,C 139 | 1029,2,"Schmidt, Mr. August",male,26,0,0,248659,13,,S 140 | 1030,3,"Drapkin, Miss. Jennie",female,23,0,0,SOTON/OQ 392083,8.05,,S 141 | 1031,3,"Goodwin, Mr. Charles Frederick",male,40,1,6,CA 2144,46.9,,S 142 | 1032,3,"Goodwin, Miss. Jessie Allis",female,10,5,2,CA 2144,46.9,,S 143 | 1033,1,"Daniels, Miss. Sarah",female,33,0,0,113781,151.55,,S 144 | 1034,1,"Ryerson, Mr. Arthur Larned",male,61,1,3,PC 17608,262.375,B57 B59 B63 B66,C 145 | 1035,2,"Beauchamp, Mr. Henry James",male,28,0,0,244358,26,,S 146 | 1036,1,"Lindeberg-Lind, Mr. Erik Gustaf (Mr Edward Lingrey"")""",male,42,0,0,17475,26.55,,S 147 | 1037,3,"Vander Planke, Mr. Julius",male,31,3,0,345763,18,,S 148 | 1038,1,"Hilliard, Mr. Herbert Henry",male,,0,0,17463,51.8625,E46,S 149 | 1039,3,"Davies, Mr. Evan",male,22,0,0,SC/A4 23568,8.05,,S 150 | 1040,1,"Crafton, Mr. John Bertram",male,,0,0,113791,26.55,,S 151 | 1041,2,"Lahtinen, Rev. William",male,30,1,1,250651,26,,S 152 | 1042,1,"Earnshaw, Mrs. Boulton (Olive Potter)",female,23,0,1,11767,83.1583,C54,C 153 | 1043,3,"Matinoff, Mr. Nicola",male,,0,0,349255,7.8958,,C 154 | 1044,3,"Storey, Mr. Thomas",male,60.5,0,0,3701,,,S 155 | 1045,3,"Klasen, Mrs. (Hulda Kristina Eugenia Lofqvist)",female,36,0,2,350405,12.1833,,S 156 | 1046,3,"Asplund, Master. Filip Oscar",male,13,4,2,347077,31.3875,,S 157 | 1047,3,"Duquemin, Mr. Joseph",male,24,0,0,S.O./P.P. 752,7.55,,S 158 | 1048,1,"Bird, Miss. Ellen",female,29,0,0,PC 17483,221.7792,C97,S 159 | 1049,3,"Lundin, Miss. Olga Elida",female,23,0,0,347469,7.8542,,S 160 | 1050,1,"Borebank, Mr. John James",male,42,0,0,110489,26.55,D22,S 161 | 1051,3,"Peacock, Mrs. Benjamin (Edith Nile)",female,26,0,2,SOTON/O.Q. 3101315,13.775,,S 162 | 1052,3,"Smyth, Miss. Julia",female,,0,0,335432,7.7333,,Q 163 | 1053,3,"Touma, Master. Georges Youssef",male,7,1,1,2650,15.2458,,C 164 | 1054,2,"Wright, Miss. Marion",female,26,0,0,220844,13.5,,S 165 | 1055,3,"Pearce, Mr. Ernest",male,,0,0,343271,7,,S 166 | 1056,2,"Peruschitz, Rev. Joseph Maria",male,41,0,0,237393,13,,S 167 | 1057,3,"Kink-Heilmann, Mrs. Anton (Luise Heilmann)",female,26,1,1,315153,22.025,,S 168 | 1058,1,"Brandeis, Mr. Emil",male,48,0,0,PC 17591,50.4958,B10,C 169 | 1059,3,"Ford, Mr. Edward Watson",male,18,2,2,W./C. 6608,34.375,,S 170 | 1060,1,"Cassebeer, Mrs. Henry Arthur Jr (Eleanor Genevieve Fosdick)",female,,0,0,17770,27.7208,,C 171 | 1061,3,"Hellstrom, Miss. Hilda Maria",female,22,0,0,7548,8.9625,,S 172 | 1062,3,"Lithman, Mr. Simon",male,,0,0,S.O./P.P. 251,7.55,,S 173 | 1063,3,"Zakarian, Mr. Ortin",male,27,0,0,2670,7.225,,C 174 | 1064,3,"Dyker, Mr. Adolf Fredrik",male,23,1,0,347072,13.9,,S 175 | 1065,3,"Torfa, Mr. Assad",male,,0,0,2673,7.2292,,C 176 | 1066,3,"Asplund, Mr. Carl Oscar Vilhelm Gustafsson",male,40,1,5,347077,31.3875,,S 177 | 1067,2,"Brown, Miss. Edith Eileen",female,15,0,2,29750,39,,S 178 | 1068,2,"Sincock, Miss. Maude",female,20,0,0,C.A. 33112,36.75,,S 179 | 1069,1,"Stengel, Mr. Charles Emil Henry",male,54,1,0,11778,55.4417,C116,C 180 | 1070,2,"Becker, Mrs. Allen Oliver (Nellie E Baumgardner)",female,36,0,3,230136,39,F4,S 181 | 1071,1,"Compton, Mrs. Alexander Taylor (Mary Eliza Ingersoll)",female,64,0,2,PC 17756,83.1583,E45,C 182 | 1072,2,"McCrie, Mr. James Matthew",male,30,0,0,233478,13,,S 183 | 1073,1,"Compton, Mr. Alexander Taylor Jr",male,37,1,1,PC 17756,83.1583,E52,C 184 | 1074,1,"Marvin, Mrs. Daniel Warner (Mary Graham Carmichael Farquarson)",female,18,1,0,113773,53.1,D30,S 185 | 1075,3,"Lane, Mr. Patrick",male,,0,0,7935,7.75,,Q 186 | 1076,1,"Douglas, Mrs. Frederick Charles (Mary Helene Baxter)",female,27,1,1,PC 17558,247.5208,B58 B60,C 187 | 1077,2,"Maybery, Mr. Frank Hubert",male,40,0,0,239059,16,,S 188 | 1078,2,"Phillips, Miss. Alice Frances Louisa",female,21,0,1,S.O./P.P. 2,21,,S 189 | 1079,3,"Davies, Mr. Joseph",male,17,2,0,A/4 48873,8.05,,S 190 | 1080,3,"Sage, Miss. Ada",female,,8,2,CA. 2343,69.55,,S 191 | 1081,2,"Veal, Mr. James",male,40,0,0,28221,13,,S 192 | 1082,2,"Angle, Mr. William A",male,34,1,0,226875,26,,S 193 | 1083,1,"Salomon, Mr. Abraham L",male,,0,0,111163,26,,S 194 | 1084,3,"van Billiard, Master. Walter John",male,11.5,1,1,A/5. 851,14.5,,S 195 | 1085,2,"Lingane, Mr. John",male,61,0,0,235509,12.35,,Q 196 | 1086,2,"Drew, Master. Marshall Brines",male,8,0,2,28220,32.5,,S 197 | 1087,3,"Karlsson, Mr. Julius Konrad Eugen",male,33,0,0,347465,7.8542,,S 198 | 1088,1,"Spedden, Master. Robert Douglas",male,6,0,2,16966,134.5,E34,C 199 | 1089,3,"Nilsson, Miss. Berta Olivia",female,18,0,0,347066,7.775,,S 200 | 1090,2,"Baimbrigge, Mr. Charles Robert",male,23,0,0,C.A. 31030,10.5,,S 201 | 1091,3,"Rasmussen, Mrs. (Lena Jacobsen Solvang)",female,,0,0,65305,8.1125,,S 202 | 1092,3,"Murphy, Miss. Nora",female,,0,0,36568,15.5,,Q 203 | 1093,3,"Danbom, Master. Gilbert Sigvard Emanuel",male,0.33,0,2,347080,14.4,,S 204 | 1094,1,"Astor, Col. John Jacob",male,47,1,0,PC 17757,227.525,C62 C64,C 205 | 1095,2,"Quick, Miss. Winifred Vera",female,8,1,1,26360,26,,S 206 | 1096,2,"Andrew, Mr. Frank Thomas",male,25,0,0,C.A. 34050,10.5,,S 207 | 1097,1,"Omont, Mr. Alfred Fernand",male,,0,0,F.C. 12998,25.7417,,C 208 | 1098,3,"McGowan, Miss. Katherine",female,35,0,0,9232,7.75,,Q 209 | 1099,2,"Collett, Mr. Sidney C Stuart",male,24,0,0,28034,10.5,,S 210 | 1100,1,"Rosenbaum, Miss. Edith Louise",female,33,0,0,PC 17613,27.7208,A11,C 211 | 1101,3,"Delalic, Mr. Redjo",male,25,0,0,349250,7.8958,,S 212 | 1102,3,"Andersen, Mr. Albert Karvin",male,32,0,0,C 4001,22.525,,S 213 | 1103,3,"Finoli, Mr. Luigi",male,,0,0,SOTON/O.Q. 3101308,7.05,,S 214 | 1104,2,"Deacon, Mr. Percy William",male,17,0,0,S.O.C. 14879,73.5,,S 215 | 1105,2,"Howard, Mrs. Benjamin (Ellen Truelove Arman)",female,60,1,0,24065,26,,S 216 | 1106,3,"Andersson, Miss. Ida Augusta Margareta",female,38,4,2,347091,7.775,,S 217 | 1107,1,"Head, Mr. Christopher",male,42,0,0,113038,42.5,B11,S 218 | 1108,3,"Mahon, Miss. Bridget Delia",female,,0,0,330924,7.8792,,Q 219 | 1109,1,"Wick, Mr. George Dennick",male,57,1,1,36928,164.8667,,S 220 | 1110,1,"Widener, Mrs. George Dunton (Eleanor Elkins)",female,50,1,1,113503,211.5,C80,C 221 | 1111,3,"Thomson, Mr. Alexander Morrison",male,,0,0,32302,8.05,,S 222 | 1112,2,"Duran y More, Miss. Florentina",female,30,1,0,SC/PARIS 2148,13.8583,,C 223 | 1113,3,"Reynolds, Mr. Harold J",male,21,0,0,342684,8.05,,S 224 | 1114,2,"Cook, Mrs. (Selena Rogers)",female,22,0,0,W./C. 14266,10.5,F33,S 225 | 1115,3,"Karlsson, Mr. Einar Gervasius",male,21,0,0,350053,7.7958,,S 226 | 1116,1,"Candee, Mrs. Edward (Helen Churchill Hungerford)",female,53,0,0,PC 17606,27.4458,,C 227 | 1117,3,"Moubarek, Mrs. George (Omine Amenia"" Alexander)""",female,,0,2,2661,15.2458,,C 228 | 1118,3,"Asplund, Mr. Johan Charles",male,23,0,0,350054,7.7958,,S 229 | 1119,3,"McNeill, Miss. Bridget",female,,0,0,370368,7.75,,Q 230 | 1120,3,"Everett, Mr. Thomas James",male,40.5,0,0,C.A. 6212,15.1,,S 231 | 1121,2,"Hocking, Mr. Samuel James Metcalfe",male,36,0,0,242963,13,,S 232 | 1122,2,"Sweet, Mr. George Frederick",male,14,0,0,220845,65,,S 233 | 1123,1,"Willard, Miss. Constance",female,21,0,0,113795,26.55,,S 234 | 1124,3,"Wiklund, Mr. Karl Johan",male,21,1,0,3101266,6.4958,,S 235 | 1125,3,"Linehan, Mr. Michael",male,,0,0,330971,7.8792,,Q 236 | 1126,1,"Cumings, Mr. John Bradley",male,39,1,0,PC 17599,71.2833,C85,C 237 | 1127,3,"Vendel, Mr. Olof Edvin",male,20,0,0,350416,7.8542,,S 238 | 1128,1,"Warren, Mr. Frank Manley",male,64,1,0,110813,75.25,D37,C 239 | 1129,3,"Baccos, Mr. Raffull",male,20,0,0,2679,7.225,,C 240 | 1130,2,"Hiltunen, Miss. Marta",female,18,1,1,250650,13,,S 241 | 1131,1,"Douglas, Mrs. Walter Donald (Mahala Dutton)",female,48,1,0,PC 17761,106.425,C86,C 242 | 1132,1,"Lindstrom, Mrs. Carl Johan (Sigrid Posse)",female,55,0,0,112377,27.7208,,C 243 | 1133,2,"Christy, Mrs. (Alice Frances)",female,45,0,2,237789,30,,S 244 | 1134,1,"Spedden, Mr. Frederic Oakley",male,45,1,1,16966,134.5,E34,C 245 | 1135,3,"Hyman, Mr. Abraham",male,,0,0,3470,7.8875,,S 246 | 1136,3,"Johnston, Master. William Arthur Willie""""",male,,1,2,W./C. 6607,23.45,,S 247 | 1137,1,"Kenyon, Mr. Frederick R",male,41,1,0,17464,51.8625,D21,S 248 | 1138,2,"Karnes, Mrs. J Frank (Claire Bennett)",female,22,0,0,F.C.C. 13534,21,,S 249 | 1139,2,"Drew, Mr. James Vivian",male,42,1,1,28220,32.5,,S 250 | 1140,2,"Hold, Mrs. Stephen (Annie Margaret Hill)",female,29,1,0,26707,26,,S 251 | 1141,3,"Khalil, Mrs. Betros (Zahie Maria"" Elias)""",female,,1,0,2660,14.4542,,C 252 | 1142,2,"West, Miss. Barbara J",female,0.92,1,2,C.A. 34651,27.75,,S 253 | 1143,3,"Abrahamsson, Mr. Abraham August Johannes",male,20,0,0,SOTON/O2 3101284,7.925,,S 254 | 1144,1,"Clark, Mr. Walter Miller",male,27,1,0,13508,136.7792,C89,C 255 | 1145,3,"Salander, Mr. Karl Johan",male,24,0,0,7266,9.325,,S 256 | 1146,3,"Wenzel, Mr. Linhart",male,32.5,0,0,345775,9.5,,S 257 | 1147,3,"MacKay, Mr. George William",male,,0,0,C.A. 42795,7.55,,S 258 | 1148,3,"Mahon, Mr. John",male,,0,0,AQ/4 3130,7.75,,Q 259 | 1149,3,"Niklasson, Mr. Samuel",male,28,0,0,363611,8.05,,S 260 | 1150,2,"Bentham, Miss. Lilian W",female,19,0,0,28404,13,,S 261 | 1151,3,"Midtsjo, Mr. Karl Albert",male,21,0,0,345501,7.775,,S 262 | 1152,3,"de Messemaeker, Mr. Guillaume Joseph",male,36.5,1,0,345572,17.4,,S 263 | 1153,3,"Nilsson, Mr. August Ferdinand",male,21,0,0,350410,7.8542,,S 264 | 1154,2,"Wells, Mrs. Arthur Henry (Addie"" Dart Trevaskis)""",female,29,0,2,29103,23,,S 265 | 1155,3,"Klasen, Miss. Gertrud Emilia",female,1,1,1,350405,12.1833,,S 266 | 1156,2,"Portaluppi, Mr. Emilio Ilario Giuseppe",male,30,0,0,C.A. 34644,12.7375,,C 267 | 1157,3,"Lyntakoff, Mr. Stanko",male,,0,0,349235,7.8958,,S 268 | 1158,1,"Chisholm, Mr. Roderick Robert Crispin",male,,0,0,112051,0,,S 269 | 1159,3,"Warren, Mr. Charles William",male,,0,0,C.A. 49867,7.55,,S 270 | 1160,3,"Howard, Miss. May Elizabeth",female,,0,0,A. 2. 39186,8.05,,S 271 | 1161,3,"Pokrnic, Mr. Mate",male,17,0,0,315095,8.6625,,S 272 | 1162,1,"McCaffry, Mr. Thomas Francis",male,46,0,0,13050,75.2417,C6,C 273 | 1163,3,"Fox, Mr. Patrick",male,,0,0,368573,7.75,,Q 274 | 1164,1,"Clark, Mrs. Walter Miller (Virginia McDowell)",female,26,1,0,13508,136.7792,C89,C 275 | 1165,3,"Lennon, Miss. Mary",female,,1,0,370371,15.5,,Q 276 | 1166,3,"Saade, Mr. Jean Nassr",male,,0,0,2676,7.225,,C 277 | 1167,2,"Bryhl, Miss. Dagmar Jenny Ingeborg ",female,20,1,0,236853,26,,S 278 | 1168,2,"Parker, Mr. Clifford Richard",male,28,0,0,SC 14888,10.5,,S 279 | 1169,2,"Faunthorpe, Mr. Harry",male,40,1,0,2926,26,,S 280 | 1170,2,"Ware, Mr. John James",male,30,1,0,CA 31352,21,,S 281 | 1171,2,"Oxenham, Mr. Percy Thomas",male,22,0,0,W./C. 14260,10.5,,S 282 | 1172,3,"Oreskovic, Miss. Jelka",female,23,0,0,315085,8.6625,,S 283 | 1173,3,"Peacock, Master. Alfred Edward",male,0.75,1,1,SOTON/O.Q. 3101315,13.775,,S 284 | 1174,3,"Fleming, Miss. Honora",female,,0,0,364859,7.75,,Q 285 | 1175,3,"Touma, Miss. Maria Youssef",female,9,1,1,2650,15.2458,,C 286 | 1176,3,"Rosblom, Miss. Salli Helena",female,2,1,1,370129,20.2125,,S 287 | 1177,3,"Dennis, Mr. William",male,36,0,0,A/5 21175,7.25,,S 288 | 1178,3,"Franklin, Mr. Charles (Charles Fardon)",male,,0,0,SOTON/O.Q. 3101314,7.25,,S 289 | 1179,1,"Snyder, Mr. John Pillsbury",male,24,1,0,21228,82.2667,B45,S 290 | 1180,3,"Mardirosian, Mr. Sarkis",male,,0,0,2655,7.2292,F E46,C 291 | 1181,3,"Ford, Mr. Arthur",male,,0,0,A/5 1478,8.05,,S 292 | 1182,1,"Rheims, Mr. George Alexander Lucien",male,,0,0,PC 17607,39.6,,S 293 | 1183,3,"Daly, Miss. Margaret Marcella Maggie""""",female,30,0,0,382650,6.95,,Q 294 | 1184,3,"Nasr, Mr. Mustafa",male,,0,0,2652,7.2292,,C 295 | 1185,1,"Dodge, Dr. Washington",male,53,1,1,33638,81.8583,A34,S 296 | 1186,3,"Wittevrongel, Mr. Camille",male,36,0,0,345771,9.5,,S 297 | 1187,3,"Angheloff, Mr. Minko",male,26,0,0,349202,7.8958,,S 298 | 1188,2,"Laroche, Miss. Louise",female,1,1,2,SC/Paris 2123,41.5792,,C 299 | 1189,3,"Samaan, Mr. Hanna",male,,2,0,2662,21.6792,,C 300 | 1190,1,"Loring, Mr. Joseph Holland",male,30,0,0,113801,45.5,,S 301 | 1191,3,"Johansson, Mr. Nils",male,29,0,0,347467,7.8542,,S 302 | 1192,3,"Olsson, Mr. Oscar Wilhelm",male,32,0,0,347079,7.775,,S 303 | 1193,2,"Malachard, Mr. Noel",male,,0,0,237735,15.0458,D,C 304 | 1194,2,"Phillips, Mr. Escott Robert",male,43,0,1,S.O./P.P. 2,21,,S 305 | 1195,3,"Pokrnic, Mr. Tome",male,24,0,0,315092,8.6625,,S 306 | 1196,3,"McCarthy, Miss. Catherine Katie""""",female,,0,0,383123,7.75,,Q 307 | 1197,1,"Crosby, Mrs. Edward Gifford (Catherine Elizabeth Halstead)",female,64,1,1,112901,26.55,B26,S 308 | 1198,1,"Allison, Mr. Hudson Joshua Creighton",male,30,1,2,113781,151.55,C22 C26,S 309 | 1199,3,"Aks, Master. Philip Frank",male,0.83,0,1,392091,9.35,,S 310 | 1200,1,"Hays, Mr. Charles Melville",male,55,1,1,12749,93.5,B69,S 311 | 1201,3,"Hansen, Mrs. Claus Peter (Jennie L Howard)",female,45,1,0,350026,14.1083,,S 312 | 1202,3,"Cacic, Mr. Jego Grga",male,18,0,0,315091,8.6625,,S 313 | 1203,3,"Vartanian, Mr. David",male,22,0,0,2658,7.225,,C 314 | 1204,3,"Sadowitz, Mr. Harry",male,,0,0,LP 1588,7.575,,S 315 | 1205,3,"Carr, Miss. Jeannie",female,37,0,0,368364,7.75,,Q 316 | 1206,1,"White, Mrs. John Stuart (Ella Holmes)",female,55,0,0,PC 17760,135.6333,C32,C 317 | 1207,3,"Hagardon, Miss. Kate",female,17,0,0,AQ/3. 30631,7.7333,,Q 318 | 1208,1,"Spencer, Mr. William Augustus",male,57,1,0,PC 17569,146.5208,B78,C 319 | 1209,2,"Rogers, Mr. Reginald Harry",male,19,0,0,28004,10.5,,S 320 | 1210,3,"Jonsson, Mr. Nils Hilding",male,27,0,0,350408,7.8542,,S 321 | 1211,2,"Jefferys, Mr. Ernest Wilfred",male,22,2,0,C.A. 31029,31.5,,S 322 | 1212,3,"Andersson, Mr. Johan Samuel",male,26,0,0,347075,7.775,,S 323 | 1213,3,"Krekorian, Mr. Neshan",male,25,0,0,2654,7.2292,F E57,C 324 | 1214,2,"Nesson, Mr. Israel",male,26,0,0,244368,13,F2,S 325 | 1215,1,"Rowe, Mr. Alfred G",male,33,0,0,113790,26.55,,S 326 | 1216,1,"Kreuchen, Miss. Emilie",female,39,0,0,24160,211.3375,,S 327 | 1217,3,"Assam, Mr. Ali",male,23,0,0,SOTON/O.Q. 3101309,7.05,,S 328 | 1218,2,"Becker, Miss. Ruth Elizabeth",female,12,2,1,230136,39,F4,S 329 | 1219,1,"Rosenshine, Mr. George (Mr George Thorne"")""",male,46,0,0,PC 17585,79.2,,C 330 | 1220,2,"Clarke, Mr. Charles Valentine",male,29,1,0,2003,26,,S 331 | 1221,2,"Enander, Mr. Ingvar",male,21,0,0,236854,13,,S 332 | 1222,2,"Davies, Mrs. John Morgan (Elizabeth Agnes Mary White) ",female,48,0,2,C.A. 33112,36.75,,S 333 | 1223,1,"Dulles, Mr. William Crothers",male,39,0,0,PC 17580,29.7,A18,C 334 | 1224,3,"Thomas, Mr. Tannous",male,,0,0,2684,7.225,,C 335 | 1225,3,"Nakid, Mrs. Said (Waika Mary"" Mowad)""",female,19,1,1,2653,15.7417,,C 336 | 1226,3,"Cor, Mr. Ivan",male,27,0,0,349229,7.8958,,S 337 | 1227,1,"Maguire, Mr. John Edward",male,30,0,0,110469,26,C106,S 338 | 1228,2,"de Brito, Mr. Jose Joaquim",male,32,0,0,244360,13,,S 339 | 1229,3,"Elias, Mr. Joseph",male,39,0,2,2675,7.2292,,C 340 | 1230,2,"Denbury, Mr. Herbert",male,25,0,0,C.A. 31029,31.5,,S 341 | 1231,3,"Betros, Master. Seman",male,,0,0,2622,7.2292,,C 342 | 1232,2,"Fillbrook, Mr. Joseph Charles",male,18,0,0,C.A. 15185,10.5,,S 343 | 1233,3,"Lundstrom, Mr. Thure Edvin",male,32,0,0,350403,7.5792,,S 344 | 1234,3,"Sage, Mr. John George",male,,1,9,CA. 2343,69.55,,S 345 | 1235,1,"Cardeza, Mrs. James Warburton Martinez (Charlotte Wardle Drake)",female,58,0,1,PC 17755,512.3292,B51 B53 B55,C 346 | 1236,3,"van Billiard, Master. James William",male,,1,1,A/5. 851,14.5,,S 347 | 1237,3,"Abelseth, Miss. Karen Marie",female,16,0,0,348125,7.65,,S 348 | 1238,2,"Botsford, Mr. William Hull",male,26,0,0,237670,13,,S 349 | 1239,3,"Whabee, Mrs. George Joseph (Shawneene Abi-Saab)",female,38,0,0,2688,7.2292,,C 350 | 1240,2,"Giles, Mr. Ralph",male,24,0,0,248726,13.5,,S 351 | 1241,2,"Walcroft, Miss. Nellie",female,31,0,0,F.C.C. 13528,21,,S 352 | 1242,1,"Greenfield, Mrs. Leo David (Blanche Strouse)",female,45,0,1,PC 17759,63.3583,D10 D12,C 353 | 1243,2,"Stokes, Mr. Philip Joseph",male,25,0,0,F.C.C. 13540,10.5,,S 354 | 1244,2,"Dibden, Mr. William",male,18,0,0,S.O.C. 14879,73.5,,S 355 | 1245,2,"Herman, Mr. Samuel",male,49,1,2,220845,65,,S 356 | 1246,3,"Dean, Miss. Elizabeth Gladys Millvina""""",female,0.17,1,2,C.A. 2315,20.575,,S 357 | 1247,1,"Julian, Mr. Henry Forbes",male,50,0,0,113044,26,E60,S 358 | 1248,1,"Brown, Mrs. John Murray (Caroline Lane Lamson)",female,59,2,0,11769,51.4792,C101,S 359 | 1249,3,"Lockyer, Mr. Edward",male,,0,0,1222,7.8792,,S 360 | 1250,3,"O'Keefe, Mr. Patrick",male,,0,0,368402,7.75,,Q 361 | 1251,3,"Lindell, Mrs. Edvard Bengtsson (Elin Gerda Persson)",female,30,1,0,349910,15.55,,S 362 | 1252,3,"Sage, Master. William Henry",male,14.5,8,2,CA. 2343,69.55,,S 363 | 1253,2,"Mallet, Mrs. Albert (Antoinette Magnin)",female,24,1,1,S.C./PARIS 2079,37.0042,,C 364 | 1254,2,"Ware, Mrs. John James (Florence Louise Long)",female,31,0,0,CA 31352,21,,S 365 | 1255,3,"Strilic, Mr. Ivan",male,27,0,0,315083,8.6625,,S 366 | 1256,1,"Harder, Mrs. George Achilles (Dorothy Annan)",female,25,1,0,11765,55.4417,E50,C 367 | 1257,3,"Sage, Mrs. John (Annie Bullen)",female,,1,9,CA. 2343,69.55,,S 368 | 1258,3,"Caram, Mr. Joseph",male,,1,0,2689,14.4583,,C 369 | 1259,3,"Riihivouri, Miss. Susanna Juhantytar Sanni""""",female,22,0,0,3101295,39.6875,,S 370 | 1260,1,"Gibson, Mrs. Leonard (Pauline C Boeson)",female,45,0,1,112378,59.4,,C 371 | 1261,2,"Pallas y Castello, Mr. Emilio",male,29,0,0,SC/PARIS 2147,13.8583,,C 372 | 1262,2,"Giles, Mr. Edgar",male,21,1,0,28133,11.5,,S 373 | 1263,1,"Wilson, Miss. Helen Alice",female,31,0,0,16966,134.5,E39 E41,C 374 | 1264,1,"Ismay, Mr. Joseph Bruce",male,49,0,0,112058,0,B52 B54 B56,S 375 | 1265,2,"Harbeck, Mr. William H",male,44,0,0,248746,13,,S 376 | 1266,1,"Dodge, Mrs. Washington (Ruth Vidaver)",female,54,1,1,33638,81.8583,A34,S 377 | 1267,1,"Bowen, Miss. Grace Scott",female,45,0,0,PC 17608,262.375,,C 378 | 1268,3,"Kink, Miss. Maria",female,22,2,0,315152,8.6625,,S 379 | 1269,2,"Cotterill, Mr. Henry Harry""""",male,21,0,0,29107,11.5,,S 380 | 1270,1,"Hipkins, Mr. William Edward",male,55,0,0,680,50,C39,S 381 | 1271,3,"Asplund, Master. Carl Edgar",male,5,4,2,347077,31.3875,,S 382 | 1272,3,"O'Connor, Mr. Patrick",male,,0,0,366713,7.75,,Q 383 | 1273,3,"Foley, Mr. Joseph",male,26,0,0,330910,7.8792,,Q 384 | 1274,3,"Risien, Mrs. Samuel (Emma)",female,,0,0,364498,14.5,,S 385 | 1275,3,"McNamee, Mrs. Neal (Eileen O'Leary)",female,19,1,0,376566,16.1,,S 386 | 1276,2,"Wheeler, Mr. Edwin Frederick""""",male,,0,0,SC/PARIS 2159,12.875,,S 387 | 1277,2,"Herman, Miss. Kate",female,24,1,2,220845,65,,S 388 | 1278,3,"Aronsson, Mr. Ernst Axel Algot",male,24,0,0,349911,7.775,,S 389 | 1279,2,"Ashby, Mr. John",male,57,0,0,244346,13,,S 390 | 1280,3,"Canavan, Mr. Patrick",male,21,0,0,364858,7.75,,Q 391 | 1281,3,"Palsson, Master. Paul Folke",male,6,3,1,349909,21.075,,S 392 | 1282,1,"Payne, Mr. Vivian Ponsonby",male,23,0,0,12749,93.5,B24,S 393 | 1283,1,"Lines, Mrs. Ernest H (Elizabeth Lindsey James)",female,51,0,1,PC 17592,39.4,D28,S 394 | 1284,3,"Abbott, Master. Eugene Joseph",male,13,0,2,C.A. 2673,20.25,,S 395 | 1285,2,"Gilbert, Mr. William",male,47,0,0,C.A. 30769,10.5,,S 396 | 1286,3,"Kink-Heilmann, Mr. Anton",male,29,3,1,315153,22.025,,S 397 | 1287,1,"Smith, Mrs. Lucien Philip (Mary Eloise Hughes)",female,18,1,0,13695,60,C31,S 398 | 1288,3,"Colbert, Mr. Patrick",male,24,0,0,371109,7.25,,Q 399 | 1289,1,"Frolicher-Stehli, Mrs. Maxmillian (Margaretha Emerentia Stehli)",female,48,1,1,13567,79.2,B41,C 400 | 1290,3,"Larsson-Rondberg, Mr. Edvard A",male,22,0,0,347065,7.775,,S 401 | 1291,3,"Conlon, Mr. Thomas Henry",male,31,0,0,21332,7.7333,,Q 402 | 1292,1,"Bonnell, Miss. Caroline",female,30,0,0,36928,164.8667,C7,S 403 | 1293,2,"Gale, Mr. Harry",male,38,1,0,28664,21,,S 404 | 1294,1,"Gibson, Miss. Dorothy Winifred",female,22,0,1,112378,59.4,,C 405 | 1295,1,"Carrau, Mr. Jose Pedro",male,17,0,0,113059,47.1,,S 406 | 1296,1,"Frauenthal, Mr. Isaac Gerald",male,43,1,0,17765,27.7208,D40,C 407 | 1297,2,"Nourney, Mr. Alfred (Baron von Drachstedt"")""",male,20,0,0,SC/PARIS 2166,13.8625,D38,C 408 | 1298,2,"Ware, Mr. William Jeffery",male,23,1,0,28666,10.5,,S 409 | 1299,1,"Widener, Mr. George Dunton",male,50,1,1,113503,211.5,C80,C 410 | 1300,3,"Riordan, Miss. Johanna Hannah""""",female,,0,0,334915,7.7208,,Q 411 | 1301,3,"Peacock, Miss. Treasteall",female,3,1,1,SOTON/O.Q. 3101315,13.775,,S 412 | 1302,3,"Naughton, Miss. Hannah",female,,0,0,365237,7.75,,Q 413 | 1303,1,"Minahan, Mrs. William Edward (Lillian E Thorpe)",female,37,1,0,19928,90,C78,Q 414 | 1304,3,"Henriksson, Miss. Jenny Lovisa",female,28,0,0,347086,7.775,,S 415 | 1305,3,"Spector, Mr. Woolf",male,,0,0,A.5. 3236,8.05,,S 416 | 1306,1,"Oliva y Ocana, Dona. Fermina",female,39,0,0,PC 17758,108.9,C105,C 417 | 1307,3,"Saether, Mr. Simon Sivertsen",male,38.5,0,0,SOTON/O.Q. 3101262,7.25,,S 418 | 1308,3,"Ware, Mr. Frederick",male,,0,0,359309,8.05,,S 419 | 1309,3,"Peter, Master. Michael J",male,,1,1,2668,22.3583,,C 420 | -------------------------------------------------------------------------------- /7_fully_connected_nn/0_intro_to_pytorch.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "
\n", 8 | "\n", 9 | " \n", 10 | " \n", 13 | " \n", 16 | " \n", 17 | "
\n", 11 | " \n", 12 | " \n", 14 | " \n", 15 | "
\n", 18 | "
\n", 19 | "\n", 20 | "\n", 21 | "This notebook is created by Amir Mardan. For any feedback or suggestion, please contact me via email, (mardan.amir.h@gmail.com).\n", 22 | "\n" 23 | ] 24 | }, 25 | { 26 | "cell_type": "markdown", 27 | "metadata": {}, 28 | "source": [ 29 | "\n", 30 | "# PyTorch\n", 31 | "\n", 32 | "PyTorch is another powerful open-source and end-to-end platform for building machine learning models and numerical modeling.\n", 33 | "Being end-to-end, we can perform all required steps of machine learning using PyTorch.\n", 34 | "\n", 35 | "This notebook will cover the following topics:\n", 36 | "\n", 37 | "- [1. Creating a Tensor](#Tensor)\n", 38 | "- [2 . Numerical Operations In PyTorch](#Operations)\n", 39 | " - [2.1 In-place Operations](#inplace)\n", 40 | " - [2.2 Conditional Operators](#conditional)\n", 41 | "- [3. Slicing, Shape, and Size](#slicing)\n", 42 | "- [4. Concatenation and Splitting](#concatenation)\n", 43 | "- [5. Tensor Operations and Gradients](#Gradients)\n", 44 | " " 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": 1, 50 | "metadata": {}, 51 | "outputs": [], 52 | "source": [ 53 | "import torch\n" 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "metadata": {}, 59 | "source": [ 60 | "\n", 61 | "## 1 . Creating a Tensor\n" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "metadata": {}, 67 | "source": [ 68 | "The fundamental data abstraction in PyTorch is `Tensor` object, which is the alternative of `ndarray` in NumPy." 69 | ] 70 | }, 71 | { 72 | "cell_type": "code", 73 | "execution_count": 2, 74 | "metadata": {}, 75 | "outputs": [ 76 | { 77 | "data": { 78 | "text/plain": [ 79 | "tensor([[0., 0.],\n", 80 | " [0., 0.],\n", 81 | " [0., 0.]])" 82 | ] 83 | }, 84 | "execution_count": 2, 85 | "metadata": {}, 86 | "output_type": "execute_result" 87 | } 88 | ], 89 | "source": [ 90 | "uninitialized = torch.Tensor(3, 2)\n", 91 | "\n", 92 | "uninitialized" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 3, 98 | "metadata": {}, 99 | "outputs": [ 100 | { 101 | "data": { 102 | "text/plain": [ 103 | "tensor([[4.8156, 3.7266],\n", 104 | " [2.3189, 3.4254],\n", 105 | " [2.6958, 3.1957]])" 106 | ] 107 | }, 108 | "execution_count": 3, 109 | "metadata": {}, 110 | "output_type": "execute_result" 111 | } 112 | ], 113 | "source": [ 114 | "rand_tensor = 2 + 3 * torch.rand(3, 2)\n", 115 | "rand_tensor" 116 | ] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "execution_count": 4, 121 | "metadata": {}, 122 | "outputs": [ 123 | { 124 | "data": { 125 | "text/plain": [ 126 | "tensor([[1., 1.],\n", 127 | " [1., 1.],\n", 128 | " [1., 1.]])" 129 | ] 130 | }, 131 | "execution_count": 4, 132 | "metadata": {}, 133 | "output_type": "execute_result" 134 | } 135 | ], 136 | "source": [ 137 | "ones_tensor = torch.ones(3, 2)\n", 138 | "ones_tensor" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 5, 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "data": { 148 | "text/plain": [ 149 | "tensor([[0., 0.],\n", 150 | " [0., 0.],\n", 151 | " [0., 0.]])" 152 | ] 153 | }, 154 | "execution_count": 5, 155 | "metadata": {}, 156 | "output_type": "execute_result" 157 | } 158 | ], 159 | "source": [ 160 | "zeros_tensor = torch.zeros(3, 2)\n", 161 | "zeros_tensor" 162 | ] 163 | }, 164 | { 165 | "cell_type": "code", 166 | "execution_count": 6, 167 | "metadata": {}, 168 | "outputs": [ 169 | { 170 | "data": { 171 | "text/plain": [ 172 | "tensor([1., 2.])" 173 | ] 174 | }, 175 | "execution_count": 6, 176 | "metadata": {}, 177 | "output_type": "execute_result" 178 | } 179 | ], 180 | "source": [ 181 | "torch.tensor([1,2.])" 182 | ] 183 | }, 184 | { 185 | "cell_type": "code", 186 | "execution_count": 7, 187 | "metadata": {}, 188 | "outputs": [ 189 | { 190 | "data": { 191 | "text/plain": [ 192 | "tensor([1, 2], dtype=torch.int32)" 193 | ] 194 | }, 195 | "execution_count": 7, 196 | "metadata": {}, 197 | "output_type": "execute_result" 198 | } 199 | ], 200 | "source": [ 201 | "torch.IntTensor([1, 2])" 202 | ] 203 | }, 204 | { 205 | "cell_type": "markdown", 206 | "metadata": {}, 207 | "source": [ 208 | "Torch defines 10 tensor types with CPU and GPU variants which can be found [here](https://pytorch.org/docs/master/tensors.html)" 209 | ] 210 | }, 211 | { 212 | "cell_type": "markdown", 213 | "metadata": {}, 214 | "source": [ 215 | "\n", 216 | "## 2 . Numerical Operations In PyTorch\n" 217 | ] 218 | }, 219 | { 220 | "cell_type": "code", 221 | "execution_count": 8, 222 | "metadata": {}, 223 | "outputs": [ 224 | { 225 | "data": { 226 | "text/plain": [ 227 | "tensor([[1., 1.],\n", 228 | " [1., 1.],\n", 229 | " [1., 1.]])" 230 | ] 231 | }, 232 | "execution_count": 8, 233 | "metadata": {}, 234 | "output_type": "execute_result" 235 | } 236 | ], 237 | "source": [ 238 | "x = torch.ones(3, 2)\n", 239 | "x" 240 | ] 241 | }, 242 | { 243 | "cell_type": "code", 244 | "execution_count": 9, 245 | "metadata": {}, 246 | "outputs": [ 247 | { 248 | "data": { 249 | "text/plain": [ 250 | "tensor([[3.5460, 2.1881],\n", 251 | " [2.5328, 3.8709],\n", 252 | " [1.0225, 1.3291]])" 253 | ] 254 | }, 255 | "execution_count": 9, 256 | "metadata": {}, 257 | "output_type": "execute_result" 258 | } 259 | ], 260 | "source": [ 261 | "y = 4 * torch.rand(x.shape)\n", 262 | "y" 263 | ] 264 | }, 265 | { 266 | "cell_type": "code", 267 | "execution_count": 10, 268 | "metadata": {}, 269 | "outputs": [ 270 | { 271 | "data": { 272 | "text/plain": [ 273 | "tensor([[3.3617, 1.2843, 3.6951],\n", 274 | " [0.6709, 1.1147, 2.8594]])" 275 | ] 276 | }, 277 | "execution_count": 10, 278 | "metadata": {}, 279 | "output_type": "execute_result" 280 | } 281 | ], 282 | "source": [ 283 | "z = 5 * torch.rand(2, 3)\n", 284 | "z" 285 | ] 286 | }, 287 | { 288 | "cell_type": "markdown", 289 | "metadata": {}, 290 | "source": [ 291 | "**Summation**" 292 | ] 293 | }, 294 | { 295 | "cell_type": "code", 296 | "execution_count": 11, 297 | "metadata": {}, 298 | "outputs": [ 299 | { 300 | "data": { 301 | "text/plain": [ 302 | "tensor([[4.5460, 3.1881],\n", 303 | " [3.5328, 4.8709],\n", 304 | " [2.0225, 2.3291]])" 305 | ] 306 | }, 307 | "execution_count": 11, 308 | "metadata": {}, 309 | "output_type": "execute_result" 310 | } 311 | ], 312 | "source": [ 313 | "x + y" 314 | ] 315 | }, 316 | { 317 | "cell_type": "code", 318 | "execution_count": 12, 319 | "metadata": {}, 320 | "outputs": [ 321 | { 322 | "data": { 323 | "text/plain": [ 324 | "tensor([[4.5460, 3.1881],\n", 325 | " [3.5328, 4.8709],\n", 326 | " [2.0225, 2.3291]])" 327 | ] 328 | }, 329 | "execution_count": 12, 330 | "metadata": {}, 331 | "output_type": "execute_result" 332 | } 333 | ], 334 | "source": [ 335 | "x.add(y)" 336 | ] 337 | }, 338 | { 339 | "cell_type": "markdown", 340 | "metadata": {}, 341 | "source": [ 342 | "**Multiplication**" 343 | ] 344 | }, 345 | { 346 | "cell_type": "code", 347 | "execution_count": 13, 348 | "metadata": {}, 349 | "outputs": [ 350 | { 351 | "data": { 352 | "text/plain": [ 353 | "tensor([[3.5460, 2.1881],\n", 354 | " [2.5328, 3.8709],\n", 355 | " [1.0225, 1.3291]])" 356 | ] 357 | }, 358 | "execution_count": 13, 359 | "metadata": {}, 360 | "output_type": "execute_result" 361 | } 362 | ], 363 | "source": [ 364 | "x * y" 365 | ] 366 | }, 367 | { 368 | "cell_type": "code", 369 | "execution_count": 14, 370 | "metadata": {}, 371 | "outputs": [ 372 | { 373 | "data": { 374 | "text/plain": [ 375 | "tensor([[3.5460, 2.1881],\n", 376 | " [2.5328, 3.8709],\n", 377 | " [1.0225, 1.3291]])" 378 | ] 379 | }, 380 | "execution_count": 14, 381 | "metadata": {}, 382 | "output_type": "execute_result" 383 | } 384 | ], 385 | "source": [ 386 | "x.mul(y)" 387 | ] 388 | }, 389 | { 390 | "cell_type": "markdown", 391 | "metadata": {}, 392 | "source": [ 393 | "**Matrix multiplication**" 394 | ] 395 | }, 396 | { 397 | "cell_type": "code", 398 | "execution_count": 15, 399 | "metadata": {}, 400 | "outputs": [ 401 | { 402 | "data": { 403 | "text/plain": [ 404 | "tensor([[17.4213, 9.3923, 25.9139],\n", 405 | " [15.1442, 9.9667, 26.9818],\n", 406 | " [ 8.3616, 5.1937, 14.1330]])" 407 | ] 408 | }, 409 | "execution_count": 15, 410 | "metadata": {}, 411 | "output_type": "execute_result" 412 | } 413 | ], 414 | "source": [ 415 | "(x + y) @ z" 416 | ] 417 | }, 418 | { 419 | "cell_type": "code", 420 | "execution_count": 16, 421 | "metadata": {}, 422 | "outputs": [ 423 | { 424 | "data": { 425 | "text/plain": [ 426 | "tensor([[17.4213, 9.3923, 25.9139],\n", 427 | " [15.1442, 9.9667, 26.9818],\n", 428 | " [ 8.3616, 5.1937, 14.1330]])" 429 | ] 430 | }, 431 | "execution_count": 16, 432 | "metadata": {}, 433 | "output_type": "execute_result" 434 | } 435 | ], 436 | "source": [ 437 | "(x + y).matmul(z)" 438 | ] 439 | }, 440 | { 441 | "cell_type": "markdown", 442 | "metadata": {}, 443 | "source": [ 444 | "\n", 445 | "### 2.1 In-place Operations\n" 446 | ] 447 | }, 448 | { 449 | "cell_type": "markdown", 450 | "metadata": {}, 451 | "source": [ 452 | "By adding an underscore to some methods, we can make the operations in place. For example, `tensor1.add(tensor2)` is an out-place operation while `tensor1.add_(tensor2)` is in place." 453 | ] 454 | }, 455 | { 456 | "cell_type": "code", 457 | "execution_count": 17, 458 | "metadata": {}, 459 | "outputs": [ 460 | { 461 | "data": { 462 | "text/plain": [ 463 | "tensor([[1., 1.],\n", 464 | " [1., 1.],\n", 465 | " [1., 1.]])" 466 | ] 467 | }, 468 | "execution_count": 17, 469 | "metadata": {}, 470 | "output_type": "execute_result" 471 | } 472 | ], 473 | "source": [ 474 | "x" 475 | ] 476 | }, 477 | { 478 | "cell_type": "code", 479 | "execution_count": 18, 480 | "metadata": {}, 481 | "outputs": [ 482 | { 483 | "data": { 484 | "text/plain": [ 485 | "tensor([[3.5460, 2.1881],\n", 486 | " [2.5328, 3.8709],\n", 487 | " [1.0225, 1.3291]])" 488 | ] 489 | }, 490 | "execution_count": 18, 491 | "metadata": {}, 492 | "output_type": "execute_result" 493 | } 494 | ], 495 | "source": [ 496 | "y " 497 | ] 498 | }, 499 | { 500 | "cell_type": "code", 501 | "execution_count": 19, 502 | "metadata": {}, 503 | "outputs": [ 504 | { 505 | "data": { 506 | "text/plain": [ 507 | "tensor([[4.5460, 3.1881],\n", 508 | " [3.5328, 4.8709],\n", 509 | " [2.0225, 2.3291]])" 510 | ] 511 | }, 512 | "execution_count": 19, 513 | "metadata": {}, 514 | "output_type": "execute_result" 515 | } 516 | ], 517 | "source": [ 518 | "x1 = x.add(y)\n", 519 | "x1" 520 | ] 521 | }, 522 | { 523 | "cell_type": "code", 524 | "execution_count": 20, 525 | "metadata": {}, 526 | "outputs": [ 527 | { 528 | "data": { 529 | "text/plain": [ 530 | "tensor([[1., 1.],\n", 531 | " [1., 1.],\n", 532 | " [1., 1.]])" 533 | ] 534 | }, 535 | "execution_count": 20, 536 | "metadata": {}, 537 | "output_type": "execute_result" 538 | } 539 | ], 540 | "source": [ 541 | "x" 542 | ] 543 | }, 544 | { 545 | "cell_type": "code", 546 | "execution_count": 21, 547 | "metadata": {}, 548 | "outputs": [ 549 | { 550 | "data": { 551 | "text/plain": [ 552 | "tensor([[4.5460, 3.1881],\n", 553 | " [3.5328, 4.8709],\n", 554 | " [2.0225, 2.3291]])" 555 | ] 556 | }, 557 | "execution_count": 21, 558 | "metadata": {}, 559 | "output_type": "execute_result" 560 | } 561 | ], 562 | "source": [ 563 | "x2 = x.add_(y)\n", 564 | "x2\n" 565 | ] 566 | }, 567 | { 568 | "cell_type": "code", 569 | "execution_count": 22, 570 | "metadata": {}, 571 | "outputs": [ 572 | { 573 | "data": { 574 | "text/plain": [ 575 | "tensor([[4.5460, 3.1881],\n", 576 | " [3.5328, 4.8709],\n", 577 | " [2.0225, 2.3291]])" 578 | ] 579 | }, 580 | "execution_count": 22, 581 | "metadata": {}, 582 | "output_type": "execute_result" 583 | } 584 | ], 585 | "source": [ 586 | "x" 587 | ] 588 | }, 589 | { 590 | "cell_type": "markdown", 591 | "metadata": {}, 592 | "source": [ 593 | "\n", 594 | "### 2.2 Conditional Operators\n" 595 | ] 596 | }, 597 | { 598 | "cell_type": "code", 599 | "execution_count": 23, 600 | "metadata": {}, 601 | "outputs": [ 602 | { 603 | "data": { 604 | "text/plain": [ 605 | "tensor([[True, True],\n", 606 | " [True, True],\n", 607 | " [True, True]])" 608 | ] 609 | }, 610 | "execution_count": 23, 611 | "metadata": {}, 612 | "output_type": "execute_result" 613 | } 614 | ], 615 | "source": [ 616 | "x > y" 617 | ] 618 | }, 619 | { 620 | "cell_type": "code", 621 | "execution_count": 24, 622 | "metadata": {}, 623 | "outputs": [ 624 | { 625 | "data": { 626 | "text/plain": [ 627 | "tensor([[False, False],\n", 628 | " [False, False],\n", 629 | " [False, False]])" 630 | ] 631 | }, 632 | "execution_count": 24, 633 | "metadata": {}, 634 | "output_type": "execute_result" 635 | } 636 | ], 637 | "source": [ 638 | "x < y" 639 | ] 640 | }, 641 | { 642 | "cell_type": "code", 643 | "execution_count": 25, 644 | "metadata": {}, 645 | "outputs": [ 646 | { 647 | "data": { 648 | "text/plain": [ 649 | "tensor([[True, True],\n", 650 | " [True, True],\n", 651 | " [True, True]])" 652 | ] 653 | }, 654 | "execution_count": 25, 655 | "metadata": {}, 656 | "output_type": "execute_result" 657 | } 658 | ], 659 | "source": [ 660 | "y >= torch.rand(3, 2)" 661 | ] 662 | }, 663 | { 664 | "cell_type": "markdown", 665 | "metadata": {}, 666 | "source": [ 667 | "\n", 668 | "## 3. Slicing, Shape, and Size" 669 | ] 670 | }, 671 | { 672 | "cell_type": "code", 673 | "execution_count": 26, 674 | "metadata": {}, 675 | "outputs": [ 676 | { 677 | "data": { 678 | "text/plain": [ 679 | "tensor([[3.5460, 2.1881],\n", 680 | " [2.5328, 3.8709],\n", 681 | " [1.0225, 1.3291]])" 682 | ] 683 | }, 684 | "execution_count": 26, 685 | "metadata": {}, 686 | "output_type": "execute_result" 687 | } 688 | ], 689 | "source": [ 690 | "y" 691 | ] 692 | }, 693 | { 694 | "cell_type": "code", 695 | "execution_count": 27, 696 | "metadata": {}, 697 | "outputs": [ 698 | { 699 | "data": { 700 | "text/plain": [ 701 | "tensor(3.5460)" 702 | ] 703 | }, 704 | "execution_count": 27, 705 | "metadata": {}, 706 | "output_type": "execute_result" 707 | } 708 | ], 709 | "source": [ 710 | "y[0, 0]" 711 | ] 712 | }, 713 | { 714 | "cell_type": "code", 715 | "execution_count": 28, 716 | "metadata": {}, 717 | "outputs": [ 718 | { 719 | "data": { 720 | "text/plain": [ 721 | "tensor([3.5460, 2.5328])" 722 | ] 723 | }, 724 | "execution_count": 28, 725 | "metadata": {}, 726 | "output_type": "execute_result" 727 | } 728 | ], 729 | "source": [ 730 | "y[:2, 0]" 731 | ] 732 | }, 733 | { 734 | "cell_type": "code", 735 | "execution_count": 29, 736 | "metadata": {}, 737 | "outputs": [ 738 | { 739 | "data": { 740 | "text/plain": [ 741 | "torch.Size([3, 2])" 742 | ] 743 | }, 744 | "execution_count": 29, 745 | "metadata": {}, 746 | "output_type": "execute_result" 747 | } 748 | ], 749 | "source": [ 750 | "y.shape" 751 | ] 752 | }, 753 | { 754 | "cell_type": "code", 755 | "execution_count": 30, 756 | "metadata": {}, 757 | "outputs": [ 758 | { 759 | "data": { 760 | "text/plain": [ 761 | "torch.Size([3, 2])" 762 | ] 763 | }, 764 | "execution_count": 30, 765 | "metadata": {}, 766 | "output_type": "execute_result" 767 | } 768 | ], 769 | "source": [ 770 | "y.size()" 771 | ] 772 | }, 773 | { 774 | "cell_type": "code", 775 | "execution_count": 31, 776 | "metadata": {}, 777 | "outputs": [ 778 | { 779 | "data": { 780 | "text/plain": [ 781 | "tensor([[3.5460, 2.5328, 1.0225],\n", 782 | " [2.1881, 3.8709, 1.3291]])" 783 | ] 784 | }, 785 | "execution_count": 31, 786 | "metadata": {}, 787 | "output_type": "execute_result" 788 | } 789 | ], 790 | "source": [ 791 | "# Transpose \n", 792 | "\n", 793 | "y.T" 794 | ] 795 | }, 796 | { 797 | "cell_type": "markdown", 798 | "metadata": {}, 799 | "source": [ 800 | "\n", 801 | "## 4. Concatenation and Splitting" 802 | ] 803 | }, 804 | { 805 | "cell_type": "code", 806 | "execution_count": 32, 807 | "metadata": {}, 808 | "outputs": [ 809 | { 810 | "data": { 811 | "text/plain": [ 812 | "tensor([[3.5460, 2.1881],\n", 813 | " [2.5328, 3.8709],\n", 814 | " [1.0225, 1.3291],\n", 815 | " [4.5460, 3.1881],\n", 816 | " [3.5328, 4.8709],\n", 817 | " [2.0225, 2.3291]])" 818 | ] 819 | }, 820 | "execution_count": 32, 821 | "metadata": {}, 822 | "output_type": "execute_result" 823 | } 824 | ], 825 | "source": [ 826 | "# Concatenation\n", 827 | "\n", 828 | "torch.cat((y, x), dim=0)" 829 | ] 830 | }, 831 | { 832 | "cell_type": "code", 833 | "execution_count": 33, 834 | "metadata": {}, 835 | "outputs": [ 836 | { 837 | "data": { 838 | "text/plain": [ 839 | "tensor([[3.5460, 2.1881, 4.5460, 3.1881],\n", 840 | " [2.5328, 3.8709, 3.5328, 4.8709],\n", 841 | " [1.0225, 1.3291, 2.0225, 2.3291]])" 842 | ] 843 | }, 844 | "execution_count": 33, 845 | "metadata": {}, 846 | "output_type": "execute_result" 847 | } 848 | ], 849 | "source": [ 850 | "torch.cat((y, x), dim=1)" 851 | ] 852 | }, 853 | { 854 | "cell_type": "markdown", 855 | "metadata": {}, 856 | "source": [ 857 | "By stacking, we create a new dimension." 858 | ] 859 | }, 860 | { 861 | "cell_type": "code", 862 | "execution_count": 34, 863 | "metadata": {}, 864 | "outputs": [ 865 | { 866 | "data": { 867 | "text/plain": [ 868 | "torch.Size([2, 3, 2])" 869 | ] 870 | }, 871 | "execution_count": 34, 872 | "metadata": {}, 873 | "output_type": "execute_result" 874 | } 875 | ], 876 | "source": [ 877 | "stacked = torch.stack((y, x))\n", 878 | "stacked.shape" 879 | ] 880 | }, 881 | { 882 | "cell_type": "markdown", 883 | "metadata": {}, 884 | "source": [ 885 | "`split` splits the tensor to your desired size." 886 | ] 887 | }, 888 | { 889 | "cell_type": "code", 890 | "execution_count": 35, 891 | "metadata": {}, 892 | "outputs": [ 893 | { 894 | "data": { 895 | "text/plain": [ 896 | "(tensor([[4.5460, 3.1881]]),\n", 897 | " tensor([[3.5328, 4.8709]]),\n", 898 | " tensor([[2.0225, 2.3291]]))" 899 | ] 900 | }, 901 | "execution_count": 35, 902 | "metadata": {}, 903 | "output_type": "execute_result" 904 | } 905 | ], 906 | "source": [ 907 | "# Spliting\n", 908 | "\n", 909 | "torch.split(x, 1)" 910 | ] 911 | }, 912 | { 913 | "cell_type": "markdown", 914 | "metadata": {}, 915 | "source": [ 916 | "`chunk` splits the tensor into as many chunks as you want." 917 | ] 918 | }, 919 | { 920 | "cell_type": "code", 921 | "execution_count": 36, 922 | "metadata": {}, 923 | "outputs": [ 924 | { 925 | "data": { 926 | "text/plain": [ 927 | "(tensor([[4.5460, 3.1881],\n", 928 | " [3.5328, 4.8709]]),\n", 929 | " tensor([[2.0225, 2.3291]]))" 930 | ] 931 | }, 932 | "execution_count": 36, 933 | "metadata": {}, 934 | "output_type": "execute_result" 935 | } 936 | ], 937 | "source": [ 938 | "torch.chunk(x, 2)" 939 | ] 940 | }, 941 | { 942 | "cell_type": "markdown", 943 | "metadata": {}, 944 | "source": [ 945 | "To remove the dimensions with the size of 1, you can use `squeeze`." 946 | ] 947 | }, 948 | { 949 | "cell_type": "code", 950 | "execution_count": 37, 951 | "metadata": {}, 952 | "outputs": [ 953 | { 954 | "data": { 955 | "text/plain": [ 956 | "torch.Size([3, 4, 1])" 957 | ] 958 | }, 959 | "execution_count": 37, 960 | "metadata": {}, 961 | "output_type": "execute_result" 962 | } 963 | ], 964 | "source": [ 965 | "x_unsqueeze = torch.rand(3, 4, 1)\n", 966 | "x_unsqueeze.shape" 967 | ] 968 | }, 969 | { 970 | "cell_type": "code", 971 | "execution_count": 38, 972 | "metadata": {}, 973 | "outputs": [ 974 | { 975 | "data": { 976 | "text/plain": [ 977 | "torch.Size([3, 4])" 978 | ] 979 | }, 980 | "execution_count": 38, 981 | "metadata": {}, 982 | "output_type": "execute_result" 983 | } 984 | ], 985 | "source": [ 986 | "x_unsqueeze.squeeze().shape" 987 | ] 988 | }, 989 | { 990 | "cell_type": "markdown", 991 | "metadata": {}, 992 | "source": [ 993 | "You can return that dimension using `unsqueeze`." 994 | ] 995 | }, 996 | { 997 | "cell_type": "code", 998 | "execution_count": 39, 999 | "metadata": {}, 1000 | "outputs": [ 1001 | { 1002 | "data": { 1003 | "text/plain": [ 1004 | "torch.Size([3, 4, 1])" 1005 | ] 1006 | }, 1007 | "execution_count": 39, 1008 | "metadata": {}, 1009 | "output_type": "execute_result" 1010 | } 1011 | ], 1012 | "source": [ 1013 | "x_unsqueeze.squeeze().unsqueeze(dim=2).shape" 1014 | ] 1015 | }, 1016 | { 1017 | "cell_type": "code", 1018 | "execution_count": 40, 1019 | "metadata": {}, 1020 | "outputs": [ 1021 | { 1022 | "data": { 1023 | "text/plain": [ 1024 | "torch.Size([3, 1, 4])" 1025 | ] 1026 | }, 1027 | "execution_count": 40, 1028 | "metadata": {}, 1029 | "output_type": "execute_result" 1030 | } 1031 | ], 1032 | "source": [ 1033 | "x_unsqueeze = torch.rand(3, 1, 4)\n", 1034 | "x_unsqueeze.shape" 1035 | ] 1036 | }, 1037 | { 1038 | "cell_type": "code", 1039 | "execution_count": 41, 1040 | "metadata": {}, 1041 | "outputs": [ 1042 | { 1043 | "data": { 1044 | "text/plain": [ 1045 | "torch.Size([3, 4])" 1046 | ] 1047 | }, 1048 | "execution_count": 41, 1049 | "metadata": {}, 1050 | "output_type": "execute_result" 1051 | } 1052 | ], 1053 | "source": [ 1054 | "x_unsqueeze.squeeze().shape" 1055 | ] 1056 | }, 1057 | { 1058 | "cell_type": "markdown", 1059 | "metadata": {}, 1060 | "source": [ 1061 | "We can convert a PyTroch tensor to NumPy array." 1062 | ] 1063 | }, 1064 | { 1065 | "cell_type": "code", 1066 | "execution_count": 42, 1067 | "metadata": {}, 1068 | "outputs": [ 1069 | { 1070 | "data": { 1071 | "text/plain": [ 1072 | "array([[4.5460067, 3.1881428],\n", 1073 | " [3.5328345, 4.8708553],\n", 1074 | " [2.0224898, 2.3290946]], dtype=float32)" 1075 | ] 1076 | }, 1077 | "execution_count": 42, 1078 | "metadata": {}, 1079 | "output_type": "execute_result" 1080 | } 1081 | ], 1082 | "source": [ 1083 | "x.numpy()" 1084 | ] 1085 | }, 1086 | { 1087 | "cell_type": "markdown", 1088 | "metadata": {}, 1089 | "source": [ 1090 | "\n", 1091 | "## 5. Tensor Operations and Gradients\n", 1092 | "\n", 1093 | "We can calculate the gradient of a function with respect to its variable easily by first specifying the gradient of which variable is required,\n", 1094 | "\n", 1095 | "```Python\n", 1096 | "requires_grad=True\n", 1097 | "``` \n", 1098 | "and then call the backward attribute on the output of the function." 1099 | ] 1100 | }, 1101 | { 1102 | "cell_type": "code", 1103 | "execution_count": 43, 1104 | "metadata": {}, 1105 | "outputs": [ 1106 | { 1107 | "data": { 1108 | "text/plain": [ 1109 | "torch.float32" 1110 | ] 1111 | }, 1112 | "execution_count": 43, 1113 | "metadata": {}, 1114 | "output_type": "execute_result" 1115 | } 1116 | ], 1117 | "source": [ 1118 | "x = torch.tensor(2.)\n", 1119 | "w = torch.tensor(4., requires_grad=True)\n", 1120 | "b = torch.tensor(10., requires_grad=True)\n", 1121 | "\n", 1122 | "x.dtype\n" 1123 | ] 1124 | }, 1125 | { 1126 | "cell_type": "code", 1127 | "execution_count": 44, 1128 | "metadata": {}, 1129 | "outputs": [], 1130 | "source": [ 1131 | "y = w * x + b" 1132 | ] 1133 | }, 1134 | { 1135 | "cell_type": "code", 1136 | "execution_count": 45, 1137 | "metadata": {}, 1138 | "outputs": [], 1139 | "source": [ 1140 | "# compute the gradient\n", 1141 | "\n", 1142 | "y.backward()" 1143 | ] 1144 | }, 1145 | { 1146 | "cell_type": "markdown", 1147 | "metadata": {}, 1148 | "source": [ 1149 | "Now, the gradient of the output with respect to all parameters is available.\n" 1150 | ] 1151 | }, 1152 | { 1153 | "cell_type": "markdown", 1154 | "metadata": {}, 1155 | "source": [ 1156 | "Note: We haven't specified that `x` requires gradient, so the $\\frac{\\partial y}{\\partial x}$ is None." 1157 | ] 1158 | }, 1159 | { 1160 | "cell_type": "code", 1161 | "execution_count": 46, 1162 | "metadata": {}, 1163 | "outputs": [ 1164 | { 1165 | "name": "stdout", 1166 | "output_type": "stream", 1167 | "text": [ 1168 | "dy/dx: None\n", 1169 | "dy/dw: tensor(2.)\n", 1170 | "dy/db: tensor(1.)\n" 1171 | ] 1172 | } 1173 | ], 1174 | "source": [ 1175 | "# Display gradients\n", 1176 | "print('dy/dx:', x.grad)\n", 1177 | "print('dy/dw:', w.grad)\n", 1178 | "print('dy/db:', b.grad)" 1179 | ] 1180 | }, 1181 | { 1182 | "cell_type": "markdown", 1183 | "metadata": {}, 1184 | "source": [ 1185 | "### [TOP ☝️](#top)\n" 1186 | ] 1187 | } 1188 | ], 1189 | "metadata": { 1190 | "kernelspec": { 1191 | "display_name": "Python 3 (ipykernel)", 1192 | "language": "python", 1193 | "name": "python3" 1194 | }, 1195 | "language_info": { 1196 | "codemirror_mode": { 1197 | "name": "ipython", 1198 | "version": 3 1199 | }, 1200 | "file_extension": ".py", 1201 | "mimetype": "text/x-python", 1202 | "name": "python", 1203 | "nbconvert_exporter": "python", 1204 | "pygments_lexer": "ipython3", 1205 | "version": "3.10.5" 1206 | }, 1207 | "vscode": { 1208 | "interpreter": { 1209 | "hash": "0b65604215852e458e3f3cc24ccc4d6a94b61ae730ad463c2afe285200822288" 1210 | } 1211 | } 1212 | }, 1213 | "nbformat": 4, 1214 | "nbformat_minor": 2 1215 | } 1216 | -------------------------------------------------------------------------------- /7_fully_connected_nn/1_simpe_NN_with_pytorch.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": {}, 7 | "source": [ 8 | "
\n", 9 | "\n", 10 | " \n", 11 | " \n", 14 | " \n", 17 | " \n", 18 | "
\n", 12 | " \n", 13 | " \n", 15 | " \n", 16 | "
\n", 19 | "
\n", 20 | "\n", 21 | "\n", 22 | "This notebook is created by Amir Mardan. For any feedback or suggestion, please contact me via email, (mardan.amir.h@gmail.com).\n", 23 | "\n" 24 | ] 25 | }, 26 | { 27 | "cell_type": "markdown", 28 | "metadata": {}, 29 | "source": [ 30 | "\n", 31 | "# A Simple Neural Network with PyTorch\n", 32 | "\n", 33 | "In this notebook, we create a very simple linear regression using PyTorch to predict the value of houses in an available dataset.\n", 34 | "\n", 35 | "This notebook will cover the following topics:\n", 36 | "\n", 37 | "- [1. Data Loading](#data_loading)\n", 38 | "- [2 . Data Preprocessing](#cleaning)\n", 39 | "- [3. Network Designing](#network)\n", 40 | "- [4. Network Initialization and Hyperparameters](#hyper_parameters)\n", 41 | "- [5. Training](#Train)\n", 42 | "- [6. Loss Visualization](#loss)\n", 43 | " " 44 | ] 45 | }, 46 | { 47 | "cell_type": "markdown", 48 | "metadata": {}, 49 | "source": [ 50 | "\n", 51 | "## 1. Data Loading" 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": 1, 57 | "metadata": {}, 58 | "outputs": [ 59 | { 60 | "data": { 61 | "text/html": [ 62 | "
\n", 63 | "\n", 76 | "\n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | "
longitudelatitudehousing_median_agetotal_roomstotal_bedroomspopulationhouseholdsmedian_incomemedian_house_valueocean_proximity
0-122.2337.8841.0880.0129.0322.0126.08.3252452600.0NEAR BAY
1-122.2237.8621.07099.01106.02401.01138.08.3014358500.0NEAR BAY
2-122.2437.8552.01467.0190.0496.0177.07.2574352100.0NEAR BAY
3-122.2537.8552.01274.0235.0558.0219.05.6431341300.0NEAR BAY
4-122.2537.8552.01627.0280.0565.0259.03.8462342200.0NEAR BAY
\n", 160 | "
" 161 | ], 162 | "text/plain": [ 163 | " longitude latitude housing_median_age total_rooms total_bedrooms \\\n", 164 | "0 -122.23 37.88 41.0 880.0 129.0 \n", 165 | "1 -122.22 37.86 21.0 7099.0 1106.0 \n", 166 | "2 -122.24 37.85 52.0 1467.0 190.0 \n", 167 | "3 -122.25 37.85 52.0 1274.0 235.0 \n", 168 | "4 -122.25 37.85 52.0 1627.0 280.0 \n", 169 | "\n", 170 | " population households median_income median_house_value ocean_proximity \n", 171 | "0 322.0 126.0 8.3252 452600.0 NEAR BAY \n", 172 | "1 2401.0 1138.0 8.3014 358500.0 NEAR BAY \n", 173 | "2 496.0 177.0 7.2574 352100.0 NEAR BAY \n", 174 | "3 558.0 219.0 5.6431 341300.0 NEAR BAY \n", 175 | "4 565.0 259.0 3.8462 342200.0 NEAR BAY " 176 | ] 177 | }, 178 | "execution_count": 1, 179 | "metadata": {}, 180 | "output_type": "execute_result" 181 | } 182 | ], 183 | "source": [ 184 | "import pandas as pd\n", 185 | "\n", 186 | "url = (r'https://raw.githubusercontent.com/AmirMardan/ml_course/main/data/cal_housing.csv')\n", 187 | "df = pd.read_csv(url)\n", 188 | "\n", 189 | "\n", 190 | "df.head()" 191 | ] 192 | }, 193 | { 194 | "cell_type": "markdown", 195 | "metadata": {}, 196 | "source": [ 197 | "\n", 198 | "## 2. Data Preprocessing" 199 | ] 200 | }, 201 | { 202 | "cell_type": "markdown", 203 | "metadata": {}, 204 | "source": [ 205 | "We first separate the training and validation data" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 2, 211 | "metadata": {}, 212 | "outputs": [], 213 | "source": [ 214 | "from sklearn.model_selection import train_test_split\n", 215 | "\n", 216 | "train_set, test_set = train_test_split(df,\n", 217 | " test_size=0.1,\n", 218 | " shuffle=True,\n", 219 | " random_state=1)\n", 220 | "\n" 221 | ] 222 | }, 223 | { 224 | "cell_type": "markdown", 225 | "metadata": {}, 226 | "source": [ 227 | "We separate the label (house value) from the features for both training and validation sets." 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": 3, 233 | "metadata": {}, 234 | "outputs": [], 235 | "source": [ 236 | "train_label = train_set['median_house_value']\n", 237 | "\n", 238 | "train_set.drop(columns='median_house_value', \n", 239 | " inplace=True)\n", 240 | "\n", 241 | "test_label = test_set['median_house_value']\n", 242 | "\n", 243 | "test_set.drop(columns='median_house_value', \n", 244 | " inplace=True)\n", 245 | "\n", 246 | "train_num = train_set.select_dtypes(['float64'])\n", 247 | "train_cat = train_set.select_dtypes(['object'])" 248 | ] 249 | }, 250 | { 251 | "cell_type": "markdown", 252 | "metadata": {}, 253 | "source": [ 254 | "We create imputer for both numerical and categorical data to preprocess them." 255 | ] 256 | }, 257 | { 258 | "cell_type": "code", 259 | "execution_count": 4, 260 | "metadata": {}, 261 | "outputs": [ 262 | { 263 | "name": "stderr", 264 | "output_type": "stream", 265 | "text": [ 266 | "/Users/amir/repos/venv/AI/lib/python3.10/site-packages/sklearn/preprocessing/_encoders.py:868: FutureWarning: `sparse` was renamed to `sparse_output` in version 1.2 and will be removed in 1.4. `sparse_output` is ignored unless you leave `sparse` to its default value.\n", 267 | " warnings.warn(\n" 268 | ] 269 | }, 270 | { 271 | "data": { 272 | "text/plain": [ 273 | "(18576, 13)" 274 | ] 275 | }, 276 | "execution_count": 4, 277 | "metadata": {}, 278 | "output_type": "execute_result" 279 | } 280 | ], 281 | "source": [ 282 | "from sklearn.impute import SimpleImputer\n", 283 | "from sklearn.preprocessing import OneHotEncoder\n", 284 | "from sklearn.preprocessing import StandardScaler\n", 285 | "from sklearn.pipeline import Pipeline\n", 286 | "from sklearn.compose import ColumnTransformer\n", 287 | "\n", 288 | "num_features = list(train_num)\n", 289 | "cat_features = list(train_cat)\n", 290 | "\n", 291 | "num_pipeline = Pipeline([ \n", 292 | " ('imputer', SimpleImputer(strategy='median')),\n", 293 | " ('std_scaler', StandardScaler()),\n", 294 | " ])\n", 295 | "\n", 296 | "\n", 297 | "cat_pipeline = Pipeline([ \n", 298 | " ('encoder', OneHotEncoder(sparse=False))\n", 299 | " ])\n", 300 | "\n", 301 | "\n", 302 | "final_pipeline = ColumnTransformer([\n", 303 | " ('num', num_pipeline, num_features),\n", 304 | " ('cat', cat_pipeline, cat_features)\n", 305 | " ])\n", 306 | "\n", 307 | "final_pipeline.fit(train_set)\n", 308 | "processed_training_data = final_pipeline.transform(train_set)\n", 309 | "\n", 310 | "processed_training_data.shape\n" 311 | ] 312 | }, 313 | { 314 | "cell_type": "markdown", 315 | "metadata": {}, 316 | "source": [ 317 | "Now, it is time to create our neural network model." 318 | ] 319 | }, 320 | { 321 | "cell_type": "code", 322 | "execution_count": 5, 323 | "metadata": {}, 324 | "outputs": [], 325 | "source": [ 326 | "import torch\n", 327 | "from torch.autograd import Variable\n", 328 | "import torch.nn as nn\n", 329 | "import numpy as np\n", 330 | "\n", 331 | "import matplotlib.pyplot as plt\n" 332 | ] 333 | }, 334 | { 335 | "cell_type": "markdown", 336 | "metadata": {}, 337 | "source": [ 338 | "\n", 339 | "## 3. Network Designing" 340 | ] 341 | }, 342 | { 343 | "cell_type": "markdown", 344 | "metadata": {}, 345 | "source": [ 346 | "The used network is actually a linear regression model.\n", 347 | "So, we use module `nn.Linear` to create this model." 348 | ] 349 | }, 350 | { 351 | "cell_type": "code", 352 | "execution_count": 6, 353 | "metadata": {}, 354 | "outputs": [], 355 | "source": [ 356 | "class LinearRegression(nn.Module):\n", 357 | " def __init__(self, input_size, output_size):\n", 358 | " super(LinearRegression, self).__init__()\n", 359 | " self.linear0 = nn.Linear(input_size, output_size)\n", 360 | " \n", 361 | " \n", 362 | " def forward(self, x):\n", 363 | " x = self.linear0(x)\n", 364 | " return x" 365 | ] 366 | }, 367 | { 368 | "cell_type": "markdown", 369 | "metadata": {}, 370 | "source": [ 371 | "Here we convert the datasets to PyTorch tensor." 372 | ] 373 | }, 374 | { 375 | "cell_type": "code", 376 | "execution_count": 7, 377 | "metadata": {}, 378 | "outputs": [ 379 | { 380 | "name": "stdout", 381 | "output_type": "stream", 382 | "text": [ 383 | "torch.Size([18576, 13]) torch.Size([18576, 1])\n" 384 | ] 385 | } 386 | ], 387 | "source": [ 388 | "X = torch.tensor(processed_training_data.astype(np.float32))\n", 389 | "y = torch.tensor(train_label.to_numpy(np.float32).reshape(-1, 1))\n", 390 | "\n", 391 | "print(X.shape, y.shape)" 392 | ] 393 | }, 394 | { 395 | "cell_type": "markdown", 396 | "metadata": {}, 397 | "source": [ 398 | "We create the linear regression object and define the desired loss function which is mean squared error.\n", 399 | "```Python\n", 400 | "mse = nn.MSELoss()\n", 401 | "```\n", 402 | "To minimize this loss, we need an optimization algorithm. \n", 403 | "For this notebook, I used stochastic gradient descent as\n", 404 | "```Python\n", 405 | "optimizer = torch.optim.SGD(lin_model.parameters(), lr=learning_rate)\n", 406 | "```\n", 407 | "which gets the trainable parameters (`lin_model.parameters()`) and defined learning rate.\n" 408 | ] 409 | }, 410 | { 411 | "cell_type": "markdown", 412 | "metadata": {}, 413 | "source": [ 414 | "\n", 415 | "## 4. Network Initialization and Hyperparameters" 416 | ] 417 | }, 418 | { 419 | "cell_type": "code", 420 | "execution_count": 8, 421 | "metadata": {}, 422 | "outputs": [], 423 | "source": [ 424 | "input_size = processed_training_data.shape[1]\n", 425 | "output_size = 1\n", 426 | "\n", 427 | "lin_model = LinearRegression(input_size, output_size)\n", 428 | "\n", 429 | "mse = nn.MSELoss()\n", 430 | "\n", 431 | "learning_rate = 0.02\n", 432 | "optimizer = torch.optim.SGD(lin_model.parameters(), lr=learning_rate)\n", 433 | "\n", 434 | "iteration_number = 501" 435 | ] 436 | }, 437 | { 438 | "cell_type": "markdown", 439 | "metadata": {}, 440 | "source": [ 441 | "\n", 442 | "## 5. Training" 443 | ] 444 | }, 445 | { 446 | "cell_type": "markdown", 447 | "metadata": {}, 448 | "source": [ 449 | "In the next step, we can train the network through an iterative procedure where the trainable parameters get adjusted in each iteration to minimize the loss." 450 | ] 451 | }, 452 | { 453 | "cell_type": "code", 454 | "execution_count": 9, 455 | "metadata": {}, 456 | "outputs": [ 457 | { 458 | "name": "stdout", 459 | "output_type": "stream", 460 | "text": [ 461 | "Epoch 0, loss 237133.375\n", 462 | "Epoch 50, loss 77233.546875\n", 463 | "Epoch 100, loss 72246.59375\n", 464 | "Epoch 150, loss 70687.875\n", 465 | "Epoch 200, loss 69894.9921875\n", 466 | "Epoch 250, loss 69477.046875\n", 467 | "Epoch 300, loss 69248.5546875\n", 468 | "Epoch 350, loss 69117.140625\n", 469 | "Epoch 400, loss 69036.59375\n", 470 | "Epoch 450, loss 68983.6640625\n", 471 | "Epoch 500, loss 68946.4375\n" 472 | ] 473 | } 474 | ], 475 | "source": [ 476 | "loss_list = []\n", 477 | "\n", 478 | "\n", 479 | "\n", 480 | "for iteration in range(iteration_number):\n", 481 | " optimizer.zero_grad()\n", 482 | " \n", 483 | " results= lin_model(X)\n", 484 | " \n", 485 | " loss = mse(results, y)\n", 486 | " \n", 487 | " loss.backward()\n", 488 | " \n", 489 | " optimizer.step()\n", 490 | " \n", 491 | " loss_list.append(np.sqrt(loss.data))\n", 492 | " \n", 493 | " if (iteration % 50 == 0):\n", 494 | " print(f'Epoch {iteration}, loss {np.sqrt(loss.data)}')" 495 | ] 496 | }, 497 | { 498 | "cell_type": "markdown", 499 | "metadata": {}, 500 | "source": [ 501 | "\n", 502 | "## 5. Loss Visualization" 503 | ] 504 | }, 505 | { 506 | "cell_type": "markdown", 507 | "metadata": {}, 508 | "source": [ 509 | "Let's visualize the loss by plotting the convergence curve." 510 | ] 511 | }, 512 | { 513 | "cell_type": "code", 514 | "execution_count": 10, 515 | "metadata": {}, 516 | "outputs": [ 517 | { 518 | "data": { 519 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlUAAAGwCAYAAACAZ5AeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABVN0lEQVR4nO3deXhTVf4/8PdNmqRrugDdoLRVkJ2ySa0Li5QWZJSKg4qMIjIyaKsCisp8kaWoLA6rdmT8qaCjDsjMgAqIRBBQKUUKHQSlAwxQtE2RpU0XmqbN+f2R5tLQQktJbtr0/XqePDT3nJx78qkM7zn35EYSQggQERER0Q1RuXsCRERERJ6AoYqIiIjICRiqiIiIiJyAoYqIiIjICRiqiIiIiJyAoYqIiIjICRiqiIiIiJzAy90TaE2sVivy8/MREBAASZLcPR0iIiJqBCEESkpKEBkZCZXq6utRDFUKys/PR1RUlLunQURERE1w5swZdOjQ4artDFUKCggIAGD7pej1eqeNa7FYsG3bNiQlJUGj0ThtXKqLtVYG66wM1lkZrLMyXFlnk8mEqKgo+d/xq2GoUpD9kp9er3d6qPL19YVer+dfWBdjrZXBOiuDdVYG66wMJerc0NYdblQn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4uWXXxaSJIlt27YJIVhjV6r96T8hWGtneP7558XOnTvFyZMnxffffy8SExNF27ZtxdmzZ4UQza/GDFUe4M033xQdO3YUWq1WDBw4UOzdu9fdU2pRvvnmGwGgzmPChAlCCNttFV555RURFhYmdDqdGDZsmMjNzXUY4/z582LcuHHC399f6PV6MXHiRFFSUuKGd9N81VdjAGL16tVyn0uXLomnn35aBAcHC19fX3H//feLgoICh3FOnTolRo4cKXx8fETbtm3F888/LywWi8Lvpvl64oknRHR0tNBqtaJdu3Zi2LBhcqASgjV2pStDFWt94x566CEREREhtFqtaN++vXjooYfE8ePH5fbmVmNJCCGcv/5FRERE1LpwTxURERGREzBUERERETkBQxURERGREzBUERERETkBQxURERGREzBUERERETkBQxURERGREzBUERERETkBQxURtSinTp2CJEnIyclx91RkR48exW233QZvb2/06dPH3dO5LjExMVi+fLm7p0HkERiqiOi6PP7445AkCQsXLnQ4vnHjRkiS5KZZudecOXPg5+eH3Nxchy93re3xxx9HSkqK/HzIkCGYOnWqMhMEsGbNGgQFBdU5/sMPP2Dy5MmKzYPIkzFUEdF18/b2xqJFi3Dx4kV3T8VpKisrm/zaEydO4M4770R0dDTatGnjxFk17EbmDQDt2rWDr6+vk2ZD1LoxVBHRdUtMTER4eDgWLFhw1T5z586tcyls+fLliImJkZ/bV29ef/11hIWFISgoCOnp6aiqqsKMGTMQEhKCDh06YPXq1XXGP3r0KG6//XZ4e3ujZ8+e2LVrl0P74cOHMXLkSPj7+yMsLAyPPvoozp07J7cPGTIEaWlpmDp1Ktq2bYvk5OR634fVakV6ejo6dOgAnU6HPn36YOvWrXK7JEnIzs5Geno6JEnC3Llzr1G5y+97165dWLFiBSRJgiRJOHXq1A3Ne+nSpejVqxf8/PwQFRWFp59+GqWlpQCAnTt3YuLEiSguLpbPZ5/nlZf/8vLyMHr0aPj7+0Ov1+PBBx9EYWGh3G7/vf79739HTEwMAgMD8fDDD6OkpETu889//hO9evWCj48P2rRpg8TERJSVlTVYF6KWjqGKiK6bWq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IiIjICf4/AYeUwpaF5CsAAAAASUVORK5CYII=", 520 | "text/plain": [ 521 | "
" 522 | ] 523 | }, 524 | "metadata": {}, 525 | "output_type": "display_data" 526 | } 527 | ], 528 | "source": [ 529 | "plt.plot(range(iteration_number),loss_list)\n", 530 | "plt.xlabel(\"Number of Iterations\")\n", 531 | "plt.ylabel(\"Loss\")\n", 532 | "plt.grid()\n", 533 | "plt.show()" 534 | ] 535 | }, 536 | { 537 | "cell_type": "markdown", 538 | "metadata": {}, 539 | "source": [ 540 | "As is shown, the final loss is still large, but the network has converged.\n", 541 | "For now, the network can predict the price with 75000 error!!\n", 542 | "So, further studies are required to increase the accuracy of the results.\n", 543 | "To increase the accuracy more accurate data preprocessing is required.\n", 544 | "More complex network and adding more training data can also helps." 545 | ] 546 | }, 547 | { 548 | "cell_type": "markdown", 549 | "metadata": {}, 550 | "source": [ 551 | "### [TOP ☝️](#top)\n" 552 | ] 553 | } 554 | ], 555 | "metadata": { 556 | "kernelspec": { 557 | "display_name": "Python 3 (ipykernel)", 558 | "language": "python", 559 | "name": "python3" 560 | }, 561 | "language_info": { 562 | "codemirror_mode": { 563 | "name": "ipython", 564 | "version": 3 565 | }, 566 | "file_extension": ".py", 567 | "mimetype": "text/x-python", 568 | "name": "python", 569 | "nbconvert_exporter": "python", 570 | "pygments_lexer": "ipython3", 571 | "version": "3.10.8" 572 | }, 573 | "vscode": { 574 | "interpreter": { 575 | "hash": "0b65604215852e458e3f3cc24ccc4d6a94b61ae730ad463c2afe285200822288" 576 | } 577 | } 578 | }, 579 | "nbformat": 4, 580 | "nbformat_minor": 2 581 | } 582 | --------------------------------------------------------------------------------