├── .gitignore
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── data
├── harrypotter.txt
├── news.csv
├── spiral.csv
├── surnames.csv
├── titanic.csv
├── tumors.csv
└── tumors_reduced.csv
├── images
├── attention1.jpg
├── attention2.jpg
├── batchnorm.png
├── birnn.png
├── char_embeddings.png
├── cnn.png
├── cnn_cv.png
├── cnn_text.png
├── cnn_text1.png
├── cnn_text2.png
├── cnn_text3.png
├── colab.png
├── commit.png
├── conditioned_rnn1.png
├── conditioned_rnn2.png
├── conv.gif
├── copy_to_drive.png
├── download_ipynb.png
├── dropout.png
├── dtree.jpg
├── forest.png
├── gates.png
├── layernorm.png
├── linear.png
├── logistic.jpg
├── logo.png
├── matrix.png
├── metrics.jpg
├── mlp.png
├── models1.png
├── models2.png
├── numpy.png
├── nutshell.png
├── pandas.png
├── pool.jpeg
├── python.png
├── pytorch.png
├── rnn.png
├── rnn2.png
├── seq2seq.jpeg
├── skipgram.png
├── tensorboard.png
└── upload.png
├── notebooks
├── 00_Notebooks.ipynb
├── 01_Python.ipynb
├── 02_NumPy.ipynb
├── 03_Pandas.ipynb
├── 04_Linear_Regression.ipynb
├── 05_Logistic_Regression.ipynb
├── 06_Random_Forests.ipynb
├── 07_PyTorch.ipynb
├── 08_Multilayer_Perceptron.ipynb
├── 09_Data_and_Models.ipynb
├── 10_Object_Oriented_ML.ipynb
├── 11_Convolutional_Neural_Networks.ipynb
├── 12_Embeddings.ipynb
├── 13_Recurrent_Neural_Networks.ipynb
├── 14_Advanced_RNNs.ipynb
├── 15_Computer_Vision.ipynb
└── blank_notebook.ipynb
└── requirements.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | # Mac files
2 | *.DS_Store
3 |
4 | # Byte-compiled / optimized / DLL files
5 | __pycache__/
6 | *.py[cod]
7 | *$py.class
8 |
9 | # C extensions
10 | *.so
11 |
12 | # Data
13 | *.rdb
14 | *.pem
15 | *.m4v
16 | *.key
17 | *.mov
18 | *.pages
19 |
20 | # Distribution / packaging
21 | .Python
22 | venv/
23 | build/
24 | develop-eggs/
25 | dist/
26 | downloads/
27 | eggs/
28 | .eggs/
29 | lib/
30 | lib64/
31 | parts/
32 | sdist/
33 | var/
34 | *.egg-info/
35 | .installed.cfg
36 | *.egg
37 | *.pyc
38 |
39 | # PyInstaller
40 | *.manifest
41 | *.spec
42 |
43 | # Installer logs
44 | pip-log.txt
45 | pip-delete-this-directory.txt
46 |
47 | # Unit test / coverage reports
48 | htmlcov/
49 | .tox/
50 | .coverage
51 | .coverage.*
52 | .cache
53 | nosetests.xml
54 | coverage.xml
55 | *,cover
56 | .hypothesis/
57 |
58 | # Translations
59 | *.mo
60 | *.pot
61 |
62 | # Django stuff:
63 | *.log
64 | local_settings.py
65 |
66 | # Flask instance folder
67 | instance/
68 | .webassets-cache
69 |
70 | # Scrapy stuff:
71 | .scrapy
72 |
73 | # Sphinx documentation
74 | docs/_build/
75 |
76 | # PyBuilder
77 | target/
78 |
79 | # IPython Notebook
80 | .ipynb_checkpoints
81 |
82 | # pyenv
83 | .python-version
84 |
85 | # celery beat schedule file
86 | celerybeat-schedule
87 |
88 | # dotenv
89 | .env
90 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # @GokuMohandas is the code owner for
2 | # practicalAI and should review any PRs
3 | * @GokuMohandas
4 |
5 | data/ @GokuMohandas
6 | images/ @GokuMohandas
7 | notebooks/ @GokuMohandas
8 | .gitignore @GokuMohandas
9 | CODE_OF_CONDUCT.md @GokuMohandas
10 | CODEOWNERS @GokuMohandas
11 | LICENSE @GokuMohandas
12 | README.md @GokuMohandas
13 | requirements.txt @GokuMohandas
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # practicalAI Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting Goku Mohandas at gokumd@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html]
72 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Goku Mohandas
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #
2 |
3 | [](https://github.com/GokuMohandas/practicalAI#notebooks)
4 | [](https://mybinder.org/v2/gh/GokuMohandas/practicalAI/master)
5 | [](https://www.kesci.com/home/column/5c20e4c5916b6200104eea63)
6 | [](https://github.com/GokuMohandas/practicalAI/blob/master/LICENSE)
7 | [](https://twitter.com/GokuMohandas)
8 |
9 | 🎥 - Video lessons coming soon!
10 |
11 | Empowering you to use machine learning to get valuable insights from data.
12 | - 🔥 Implement basic ML algorithms and deep neural networks with PyTorch.
13 | - 🖥️ Run everything on the browser without any set up using Google Colab.
14 | - 📦 Learn object-oriented ML to code for products, not just tutorials.
15 |
16 | ## Notebooks
17 | |Basics|Deep Learning|Advanced|Topics|
18 | |-|-|-|-|
19 | | 📓 [Notebooks](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/00_Notebooks.ipynb)|🔥 [PyTorch](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/07_PyTorch.ipynb)|📚 [Advanced RNNs](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/14_Advanced_RNNs.ipynb)|📸 [Computer Vision](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/15_Computer_Vision.ipynb)|
20 | | 🐍 [Python](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/01_Python.ipynb)|🎛️ [Multilayer Perceptrons](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/08_Multilayer_Perceptron.ipynb)|🏎️ Highway and Residual Networks|⏰ Time Series Analysis|
21 | |🔢 [NumPy](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/02_NumPy.ipynb)|🔎 [Data & Models](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/09_Data_and_Models.ipynb)|🔮 Autoencoders|🏘️ Topic Modeling|
22 | | 🐼 [Pandas](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/03_Pandas.ipynb) |📦 [Object-Oriented ML](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/10_Object_Oriented_ML.ipynb)|🎭 Generative Adversarial Networks|🛒 Recommendation Systems|
23 | |📈 [Linear Regression](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/04_Linear_Regression.ipynb)|🖼️ [Convolutional Neural Networks](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/11_Convolutional_Neural_Networks.ipynb)|🐝 Transformer Networks|🗣️ Pretrained Language Modeling|
24 | |📊 [Logistic Regression](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/05_Logistic_Regression.ipynb)|📝 [Embeddings](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/12_Embeddings.ipynb)||🤷 Multitask Learning|
25 | |🌳 [Random Forests](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/06_Random_Forests.ipynb)|📗 [Recurrent Neural Networks](https://colab.research.google.com/github/GokuMohandas/practicalAI/blob/master/notebooks/13_Recurrent_Neural_Networks.ipynb)||🎯 One-shot Learning|
26 | |💥 Clustering|||🍒 Reinforcement Learning|
27 |
28 | ## Running the notebooks
29 | 1. Access the notebooks in the [`notebooks`](https://github.com/GokuMohandas/practicalAI/tree/master/notebooks) directory in this repo.
30 | 2. You can run these notebook on Google Colab (recommended) or on your local machine.
31 | 3. Click on a notebook and replace `https://github.com/` with `https://colab.research.google.com/github/` in the notebook URL or use this [Chrome extension](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) to do it with one click.
32 | 4. Sign into your Google account.
33 | 5. Click the `COPY TO DRIVE` button on the toolbar. This will open the notebook on a new tab.
34 |
35 |
36 |
37 | 5. Rename this new notebook by removing the `Copy of` part in the title.
38 | 6. Run the code, make changes, etc. and it's all automatically saved to you personal Google Drive.
39 |
40 | 🇨🇳 - If you are from China or another country where Google is blocked, checkout the links above to the other free services like [Jupyter Binder](https://mybinder.org/v2/gh/GokuMohandas/practicalAI/master). Also check out [Kesci](https://www.kesci.com/home/column/5c20e4c5916b6200104eea63) for the content in Chinese.
41 |
42 |
43 | ## Contributing to notebooks
44 | 1. Make your changes and download the Google colab notebook as an `.ipynb` file.
45 |
46 |
47 |
48 | 2. Go to https://github.com/GokuMohandas/practicalAI/tree/master/notebooks
49 | 3. Click on `Upload files`.
50 |
51 |
52 |
53 | 5. Upload the `.ipynb` file.
54 | 6. Write a detailed commit title and message.
55 | 7. Name your branch appropriately.
56 | 8. Click on `Propose changes`.
57 |
58 |
59 |
--------------------------------------------------------------------------------
/data/harrypotter.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/data/harrypotter.txt
--------------------------------------------------------------------------------
/data/tumors.csv:
--------------------------------------------------------------------------------
1 | leukocyte_count,blood_pressure,tumor
2 | 13.472968615888934,15.250393221933804,1
3 | 10.805510382493194,14.109675762663219,1
4 | 13.834052991147676,15.793920360902117,1
5 | 9.572811104830294,17.87328623966971,1
6 | 7.633667402156339,16.598559450376403,1
7 | 12.795533735896369,16.02132978336539,1
8 | 12.885376627994722,15.402248380446517,1
9 | 16.048326789717287,16.05970076648615,1
10 | 13.486376581660265,14.69190089995238,1
11 | 9.438946688645377,17.223709429576157,1
12 | 17.462393051356024,14.81863166931274,0
13 | 10.068626068706553,16.52057158613907,1
14 | 11.648341351899882,14.479663398057777,1
15 | 14.086318373320138,15.631652906839443,1
16 | 13.259578010299819,14.489631873281114,1
17 | 18.036615049366674,15.697719902470261,0
18 | 19.137337702298947,15.40874327569786,0
19 | 11.034546682020165,16.00729602734063,1
20 | 17.826128136930397,14.609331206734222,0
21 | 14.398803335285885,16.607347810249387,1
22 | 13.434940255122578,14.68431623236101,1
23 | 17.318532193814036,15.390311209899862,0
24 | 13.567902824989588,15.076382803264158,1
25 | 13.175192942422065,16.392252263408366,1
26 | 10.473926146400782,15.637052253737158,1
27 | 12.692060815849107,16.462445795842807,1
28 | 14.112450567148722,14.95544910498313,1
29 | 13.398552505499946,14.691955772552332,1
30 | 9.847692288755463,15.883228005259264,1
31 | 13.856256796644164,17.056462424785508,1
32 | 16.843199341094817,16.779321158713646,1
33 | 16.5957935094616,15.522164961157216,0
34 | 18.345093972537562,14.25516162614503,0
35 | 16.137448827694687,14.121867615835452,0
36 | 15.734422720294369,14.7929542037309,0
37 | 15.632705840492598,16.116478767606843,1
38 | 17.158823830676496,17.4735919490241,1
39 | 15.282325881297202,16.650729197271772,1
40 | 9.001079227411402,15.38234897833978,1
41 | 17.478463483830808,15.346093070396366,0
42 | 12.31993954777143,15.320901395754625,1
43 | 11.769786171318131,16.091259132083817,1
44 | 16.244341404006708,17.18458348941072,1
45 | 12.478419174463752,15.035097151605722,1
46 | 9.29152401270429,14.036631700160232,1
47 | 11.986271423702519,16.521595475308303,1
48 | 17.744408446296852,13.930996927270137,0
49 | 11.964918427252346,15.75148300033544,1
50 | 14.30872414027196,14.772997143147991,1
51 | 15.91272289784201,17.404774857143938,1
52 | 14.834932673465302,14.922486365020008,1
53 | 15.671345225572788,15.641246117153555,1
54 | 16.149755723035888,14.49605505878715,0
55 | 19.21390165689227,14.604255885187957,0
56 | 19.51041417352468,14.952694270637275,0
57 | 16.32384923674385,14.8490275995191,0
58 | 10.312527953689168,14.302595543175256,1
59 | 19.20664619122436,14.806607354103672,0
60 | 11.344103622692646,15.068414844894882,1
61 | 20.59651163981557,14.53267696480051,0
62 | 9.672522604235462,14.097902344376429,1
63 | 20.1088188560725,16.003879282184148,0
64 | 11.937543841643045,15.746718253765348,1
65 | 17.461846229897198,16.46325547863779,0
66 | 12.551827625929635,14.985502395303573,1
67 | 14.960508111181428,17.484441857770396,1
68 | 21.274749445796925,14.898310551344027,0
69 | 15.129533611288771,15.494387061156255,1
70 | 14.594539743413602,15.354221526394605,1
71 | 13.910117958906142,14.114261984561814,1
72 | 17.855787408239205,14.369247343609215,0
73 | 9.81353276280258,15.31755081350501,1
74 | 13.99472859125678,15.72487800312882,1
75 | 16.60112314385515,15.526174564820865,0
76 | 15.853195441691648,13.533828848758478,0
77 | 17.0243141211745,14.938095158980767,0
78 | 20.511445205413278,16.336878940548235,0
79 | 11.206587401970673,16.025155525259027,1
80 | 18.617026072307013,15.391931821045624,0
81 | 13.514017544572567,14.66901851735461,1
82 | 14.375704336771141,16.45042944748655,1
83 | 13.2740732152953,14.94001525480975,1
84 | 17.4785767858645,15.075842934423507,0
85 | 12.829270798185995,17.337387803426164,1
86 | 16.425967263076277,14.045905678010591,0
87 | 18.218196319373853,16.283950751039377,0
88 | 12.533177776213368,14.912641771020517,1
89 | 13.955809296929,14.849901159454463,1
90 | 17.953225674155693,15.648104817837519,0
91 | 14.520159720049564,16.75620302777258,1
92 | 11.771974443630166,14.309895183529605,1
93 | 13.49338562462634,17.699428109698943,1
94 | 11.463155799422202,18.247223471848915,1
95 | 9.550819565537934,14.244182342530221,1
96 | 13.578509586104694,16.981410240715846,1
97 | 17.57882148928763,17.218937258623882,1
98 | 15.187822771695142,15.160994746796518,1
99 | 14.995974063471367,13.509315984354858,0
100 | 12.08862049657492,15.046285472605744,1
101 | 14.703630125265825,15.016684308109532,1
102 | 15.128373827897782,16.448635535121763,1
103 | 15.573719784974651,14.135744863162264,0
104 | 13.903105945427123,14.683705178469046,1
105 | 18.96516645843836,15.83006402245448,0
106 | 15.854104500176392,15.000674682948935,0
107 | 21.267145860027412,15.31147643235454,0
108 | 19.45959783268582,16.193688274736715,0
109 | 13.140405544577073,14.908245331622489,1
110 | 13.920708996701858,16.413060694208152,1
111 | 15.710937999427445,15.994731868948293,1
112 | 17.12739706589668,15.163336052710028,0
113 | 17.557333099591666,15.14709524206824,0
114 | 12.083288194557136,14.967680722681287,1
115 | 17.26225734019677,15.188942908858348,0
116 | 15.226048820662582,16.46934647100658,1
117 | 15.936428949972615,14.36407293738822,0
118 | 19.60558575643113,14.293490733532728,0
119 | 16.24077549632679,15.732557964209189,1
120 | 14.881783021374662,16.28600938034311,1
121 | 12.878292220357327,15.602327115208283,1
122 | 19.526668306232775,15.70411599639553,0
123 | 21.11489072435497,16.102150624216637,0
124 | 17.836825695468512,15.63972889354465,0
125 | 18.581601966970915,15.475376579419672,0
126 | 15.655370875453542,15.158633997251703,1
127 | 15.441763433496494,15.913624228138653,1
128 | 18.904042331831203,14.482434206731062,0
129 | 14.953644888753278,15.96295527611286,1
130 | 15.81950886873007,16.428949016838494,1
131 | 19.851334161241393,14.245063575855587,0
132 | 14.923303010527318,16.156537459060402,1
133 | 14.688559995760782,13.4421193273106,0
134 | 12.213537826683128,14.883268100598642,1
135 | 15.074648496303473,13.718833905345315,0
136 | 17.4883223224777,16.28298672214856,0
137 | 18.94826617218869,16.51699180466198,0
138 | 16.604525481360092,12.158263602970996,0
139 | 15.646210695825665,13.543139594249205,0
140 | 11.617979001912389,15.094659699170855,1
141 | 14.888835423357735,13.925219840763816,0
142 | 18.776650239534753,14.613686182398142,0
143 | 19.23928716103041,15.908783069435957,0
144 | 19.41220243252875,15.089686304271822,0
145 | 18.692651513032324,14.289601621208504,0
146 | 19.991435118562855,14.205391673699733,0
147 | 18.363270180335608,15.029254874298687,0
148 | 17.079192801506313,15.323172645668429,0
149 | 15.10309069740411,15.291237565099669,1
150 | 17.508198158948176,15.773942079841166,0
151 | 15.183364000763472,15.650800712926,1
152 | 17.573299657016314,14.291488887670017,0
153 | 9.916983781894771,16.44803934367966,1
154 | 16.370442645929295,15.797742553078594,0
155 | 15.02570853081206,16.247450602202413,1
156 | 15.582577012975397,16.678050470617432,1
157 | 17.632578575666017,15.869585128920164,0
158 | 14.411002896183483,13.148424572134036,0
159 | 16.255936704081588,15.132611859218887,0
160 | 10.694324318798767,16.34122581571295,1
161 | 19.48161747468298,15.625090621507594,0
162 | 12.867935633980025,16.355407867063917,1
163 | 6.981598570534064,15.322173714174722,1
164 | 10.737119665979485,14.844421586507066,1
165 | 9.840449805798457,16.434717198055445,1
166 | 12.419275248466775,16.598801456087525,1
167 | 19.737042683184367,13.67935057694513,0
168 | 11.350685534009557,15.79186611627074,1
169 | 16.42078006402748,15.445148091170205,0
170 | 13.593327074211471,15.922367323727475,1
171 | 19.15130145307868,15.225159799585201,0
172 | 12.24307550200971,17.57619555636495,1
173 | 17.199498331801397,14.321889925976805,0
174 | 13.283345752140884,14.475078836162371,1
175 | 12.52148487171261,14.970808483187405,1
176 | 8.55257950598476,14.365121869602284,1
177 | 14.432497993987882,14.301608141558134,1
178 | 10.482656710894013,14.627895080697202,1
179 | 11.848710133205294,16.294745353212242,1
180 | 16.899857841264488,15.003623987566408,0
181 | 15.570468136344825,13.774843724822688,0
182 | 13.417376726157817,15.213805104815224,1
183 | 11.240331926202808,15.58813875172288,1
184 | 11.253406157732872,15.94820374722334,1
185 | 19.0127034621042,14.830361779678269,0
186 | 16.67032827719148,15.858951608950907,0
187 | 12.373383853330255,15.480650994977669,1
188 | 11.099771600411744,15.217296829226134,1
189 | 17.646526875231448,14.976548469081477,0
190 | 13.250981716080148,14.571584817925325,1
191 | 17.09662145557334,15.012458875426363,0
192 | 18.295551807979017,15.047242592283043,0
193 | 11.985918108734948,17.54515648839909,1
194 | 16.967577355348663,14.311798104394171,0
195 | 18.887186027027823,15.669864218780553,0
196 | 21.227704894831348,13.924925762527826,0
197 | 15.719557732075861,15.847488127904866,1
198 | 9.284434128808943,15.25557262876228,1
199 | 15.64973527438068,16.100078259497124,1
200 | 14.72258126726634,15.865385966913497,1
201 | 18.636528430244958,14.830287061445697,0
202 | 16.56625219720652,15.580210627210928,0
203 | 14.733417719043773,16.627480039117458,1
204 | 14.522638050975118,15.884338670572536,1
205 | 20.055882299022844,14.353279076652175,0
206 | 17.248514842239363,14.251073932748767,0
207 | 11.121752720320318,14.473495497600165,1
208 | 16.79454202862219,15.295081787135985,0
209 | 12.024237028364873,14.95441020223216,1
210 | 13.917521259400852,15.54897904012595,1
211 | 15.061249422583403,13.90980097000537,0
212 | 17.41143747390338,12.144353864475036,0
213 | 10.989743614748281,15.03263867448283,1
214 | 15.733972184463239,14.225094335345792,0
215 | 15.435850559870685,15.357708629401447,1
216 | 16.835544404459576,15.40791288932119,0
217 | 19.36355127544965,14.94520889593403,0
218 | 8.214407962356177,14.057150378774098,1
219 | 14.570367404397855,14.95792189769522,1
220 | 15.948874032980438,17.8383330068291,1
221 | 16.83953919674184,15.120095439840362,0
222 | 16.076464120501324,16.600481602254312,1
223 | 14.468817921763312,15.937259734541279,1
224 | 15.276286059454893,14.103201440136475,0
225 | 12.648974038435405,14.955288180219496,1
226 | 9.520071419939882,14.862791688156682,1
227 | 12.444765508552686,15.101514492894811,1
228 | 19.019331028794447,14.834595976499333,0
229 | 15.906943456597894,14.285154976999054,0
230 | 16.970399385706646,14.206793070047016,0
231 | 18.34567783161557,13.38117665048032,0
232 | 13.610569015257965,17.311706650354882,1
233 | 13.622751032177886,17.677531514774536,1
234 | 10.675387614374543,16.440117363379493,1
235 | 13.143585242543475,14.385889633238701,1
236 | 12.800618577325451,15.36942384317354,1
237 | 13.283595261700285,15.56934129627319,1
238 | 16.41386225068835,16.289765265351527,1
239 | 12.69710143854795,16.043672213027484,1
240 | 12.256927307015706,15.029602111754954,1
241 | 10.869162783773731,16.61243230751075,1
242 | 13.017489022456797,15.737785192977176,1
243 | 16.429848231899904,16.985849957092583,1
244 | 11.859756054559902,15.790189976799441,1
245 | 7.86825471644298,16.2127217375159,1
246 | 17.54854798164229,15.240103312598388,0
247 | 18.011357026800233,15.50704398848678,0
248 | 14.908070971349995,15.09622026212635,1
249 | 12.080669102471754,15.994405931356352,1
250 | 11.637453915933094,15.24816938867256,1
251 | 9.789964445272656,15.310660974145724,1
252 | 16.93327600287215,16.669703382513358,1
253 | 11.518162970985259,17.344457998863902,1
254 | 13.556383587789995,15.358709543313042,1
255 | 14.206124518471414,15.207028394310704,1
256 | 15.048261911710597,15.277617637460583,1
257 | 17.78688029845756,17.50385699000958,1
258 | 14.220789881072834,14.816800795725722,1
259 | 10.021082332140573,15.769791642389347,1
260 | 11.495664782976023,14.345425249276857,1
261 | 10.283036194931093,15.584865206092328,1
262 | 14.927377656777693,15.253261882628887,1
263 | 12.852007133160154,15.913194820142714,1
264 | 12.556401781727974,15.770530581521596,1
265 | 12.518333489126363,16.638401992882457,1
266 | 15.881967291225202,16.008924538013268,1
267 | 16.82998724714185,14.047312227841944,0
268 | 17.45568600817567,12.3847737503546,0
269 | 12.487826942553728,13.872671223653134,1
270 | 12.91538515158519,15.199039180638328,1
271 | 14.786659692919441,14.765166841075075,1
272 | 12.153783837807904,18.33164100684804,1
273 | 10.928707839203689,15.308438825595063,1
274 | 10.604330718647205,15.664112286337847,1
275 | 17.648898735244195,17.364910881666813,1
276 | 10.949190858298932,15.403369581101435,1
277 | 15.142710925544359,14.137213950282808,0
278 | 14.412259156481612,15.941645985751988,1
279 | 8.834109346140215,15.185140393049792,1
280 | 13.104569484133846,14.833848743471744,1
281 | 9.931937678298222,14.685836152532355,1
282 | 12.368682794027059,16.658550021337703,1
283 | 18.070265496497044,15.897211400427247,0
284 | 14.44403198880236,15.806495419427526,1
285 | 17.780756073870574,14.251281005632128,0
286 | 8.994994621310774,16.364627717297868,1
287 | 16.751375263714245,17.215771854799932,1
288 | 12.91176009388807,15.892499474352642,1
289 | 18.55155695713512,14.241766102826286,0
290 | 12.072272463653581,14.646148278834348,1
291 | 16.645950714491562,14.54428976580573,0
292 | 12.469844611630625,15.477894868774403,1
293 | 18.183232589373933,14.827762640862229,0
294 | 15.423043445779848,16.5207382227645,1
295 | 11.073288593200424,15.765668910415622,1
296 | 21.96745870683285,15.33273379463343,0
297 | 13.359117816456482,14.32568029738226,1
298 | 11.04632003090673,16.35528303273453,1
299 | 18.07436143911311,15.10775094892968,0
300 | 17.0548608968692,14.373786490774869,0
301 | 12.000339222606488,16.273758796862346,1
302 | 15.359578745998776,15.437166150998536,1
303 | 19.113259395046214,15.449089353324705,0
304 | 15.369099600375693,14.589367758324288,0
305 | 19.03218308797355,15.735354159549638,0
306 | 16.519486352351098,14.23264239326558,0
307 | 12.959260640888461,15.896218479841444,1
308 | 18.284666834873622,15.940293186771223,0
309 | 17.920342935336866,17.244330385870807,0
310 | 16.17345836782407,16.844875203985676,1
311 | 13.490355373686501,15.578362881815497,1
312 | 16.915807519005828,14.08991155467373,0
313 | 15.074355774226781,15.709051941344313,1
314 | 17.84728738180293,15.949659483546506,0
315 | 13.213198027660882,14.929766178652853,1
316 | 12.527765301246687,15.896772878874845,1
317 | 18.609122037856395,15.246568408956614,0
318 | 12.708126550526835,16.02370077975006,1
319 | 15.632308067215044,14.391747102492998,0
320 | 21.22213711836492,14.242718176978173,0
321 | 16.32364382377055,13.708458035750816,0
322 | 13.271832988920247,15.238723575287857,1
323 | 16.405276359454074,16.78889699219049,1
324 | 17.52782661228051,15.970560131420767,0
325 | 4.201800958477197,14.304839917086747,1
326 | 14.152081708381928,14.26833667286621,1
327 | 19.533403895051066,15.219665059510424,0
328 | 18.667991030885318,14.418799064291182,0
329 | 15.640336408265831,16.573371384745222,1
330 | 18.978340303094708,15.698047743596415,0
331 | 19.20923347161644,16.42695205986969,0
332 | 16.390729624194506,14.419258015841443,0
333 | 16.196971485693343,13.212790371309842,0
334 | 16.723626000399257,12.365783473739938,0
335 | 17.74295835980201,14.925906583542227,0
336 | 10.185835310804203,15.230225355647283,1
337 | 18.60715951290544,16.785183964799877,0
338 | 15.902466513732959,15.408893402752675,1
339 | 16.062756948519365,15.082032707335175,0
340 | 13.690894105531468,15.536279498324205,1
341 | 17.657135059570642,16.23374781806288,0
342 | 14.176325939670079,14.655906044411593,1
343 | 18.543033243129376,13.948474445273852,0
344 | 15.659960205719546,14.701776945238151,0
345 | 20.35579463640567,16.974463734468557,0
346 | 10.725544284697097,14.725802616127984,1
347 | 14.845547163324653,16.010261970258675,1
348 | 17.653676307491306,15.448898429104416,0
349 | 11.780365041149459,14.940509053851244,1
350 | 15.026406348349266,13.454134086675925,0
351 | 13.49820857006678,14.832061843620968,1
352 | 16.64334612899788,13.71176095609501,0
353 | 14.116263951940702,15.413208187935739,1
354 | 18.489777047829186,13.664753309930965,0
355 | 15.187721643755527,14.73826430499922,1
356 | 17.31155388419491,16.18110089139477,0
357 | 6.018592243444331,15.346652083433305,1
358 | 14.537614529943117,15.943337905321862,1
359 | 17.946809962088707,15.608453491878228,0
360 | 15.397127520989809,17.599818038448962,1
361 | 18.129531226584543,14.770003120551467,0
362 | 20.26262837192094,15.7978376138695,0
363 | 11.92115561707828,16.226342656067928,1
364 | 17.717369613248273,14.475777507873392,0
365 | 13.977986835914137,16.513264466219606,1
366 | 18.4928868601248,15.748817119823695,0
367 | 14.480363334988223,17.684855732393107,1
368 | 12.030190905438054,15.907816841983296,1
369 | 11.313071849705132,16.323401321741727,1
370 | 9.892338801068423,15.22204087225568,1
371 | 18.759224843571623,13.70665180986938,0
372 | 16.48031148792053,12.922813045967175,0
373 | 14.069171708780669,15.100055802794332,1
374 | 15.145460183546193,16.768207546755214,1
375 | 16.8252028989644,15.10809782246327,0
376 | 11.384577378165776,17.376401802773362,1
377 | 13.970188382224784,16.930794964008324,1
378 | 20.2229441336003,15.614931699526702,0
379 | 12.669980442482998,16.066329838570496,1
380 | 21.397780970346513,15.53205646938323,0
381 | 8.420848548405777,16.63637208225977,1
382 | 18.23545357610537,15.462284134346156,0
383 | 13.327363651852142,15.84132832452199,1
384 | 15.233197170663356,13.250173720351142,0
385 | 12.566817141208109,15.93967379609639,1
386 | 18.4092427025124,15.190971605308208,0
387 | 14.681745129224163,14.496735405244937,1
388 | 11.506620396513338,15.980307987351601,1
389 | 18.309297538279754,14.526870017404535,0
390 | 9.628504579463579,14.9134332023922,1
391 | 19.285571258776315,16.276502765164178,0
392 | 14.511394611094534,16.035541175435057,1
393 | 15.331191318749351,16.076133898649825,1
394 | 16.982672583445428,13.23263324297191,0
395 | 18.162335245344586,14.014598306994364,0
396 | 14.543383846447993,15.56682023719105,1
397 | 15.61660784300848,16.498571959972836,1
398 | 17.49049127813995,14.618758438226287,0
399 | 13.937546314628909,14.937940440541656,1
400 | 14.613181737330013,16.348382528748157,1
401 | 12.051451516698483,16.953226838132895,1
402 | 16.79917933285475,15.260360897974007,0
403 | 14.533142468248682,14.989234674639345,1
404 | 13.208503234860894,15.331154443710364,1
405 | 15.0444498654969,15.162691642235263,1
406 | 10.764513029371594,16.068074068035052,1
407 | 16.51916750245296,14.031274132866855,0
408 | 17.207743185230534,16.221021462758486,0
409 | 11.653335359913548,16.183069284730326,1
410 | 15.707926647114965,13.15982641267209,0
411 | 10.281464854040335,14.827697392071006,1
412 | 11.912878343453752,14.881422829267159,1
413 | 15.613526232104938,13.359264779665896,0
414 | 13.580477912298935,18.29277871791872,1
415 | 16.962950218404153,14.740883535145187,0
416 | 14.088080253506371,15.57695753514566,1
417 | 11.017002775839224,15.649103688418949,1
418 | 14.407809723108292,13.906711163884616,1
419 | 16.48163755096283,14.955614687791135,0
420 | 15.643884932583571,13.801949460993999,0
421 | 13.319708307934805,16.22999591164129,1
422 | 19.522082034068582,13.824456399421926,0
423 | 9.975835882845185,15.465792034401773,1
424 | 11.83447062474752,15.409907647768835,1
425 | 12.110951954123,14.928284954458952,1
426 | 18.979159869084135,15.399131673042264,0
427 | 19.270878391315875,16.740151490012543,0
428 | 14.005291836887668,15.264783763261601,1
429 | 13.87411837788453,15.912589122230543,1
430 | 14.377975578048618,16.00413561571144,1
431 | 18.975361952733255,15.187236883201587,0
432 | 11.702085809410287,15.619253633324123,1
433 | 14.78517834557584,16.052552875666336,1
434 | 20.003315529988257,15.41052670294742,0
435 | 14.867684622800386,15.70755715125428,1
436 | 11.800507397297432,16.527091896756357,1
437 | 18.69941624306763,14.053828281859003,0
438 | 15.609077486659837,13.651668572505264,0
439 | 10.93492527121912,14.826321978798713,1
440 | 14.509367023273466,15.89222413189701,1
441 | 13.960414200048486,14.74619631667007,1
442 | 20.46503094462532,14.697505432528839,0
443 | 17.922913902960705,16.338879476467454,0
444 | 12.380135170121243,15.137247846840493,1
445 | 20.2191016249498,13.447960666650522,0
446 | 19.114302921366477,16.06094252777512,0
447 | 13.367974441991338,15.741789949878164,1
448 | 16.046388006509506,15.224714705014508,1
449 | 14.23102411759796,16.776482380018543,1
450 | 21.339698281165862,13.154842057819316,0
451 | 11.66498489014074,14.365263433575398,1
452 | 15.996964022399856,14.953148207557035,0
453 | 17.18434026499196,13.870265729734628,0
454 | 17.89806351888551,13.30088102459631,0
455 | 13.857608005738815,15.523027951788327,1
456 | 14.06780919249416,15.803091481130743,1
457 | 14.341460805308989,14.102940679042264,1
458 | 16.795185912149933,14.434741226346999,0
459 | 8.383661939011064,14.356183909202464,1
460 | 16.988734039406655,13.879348602202514,0
461 | 9.410626669700704,15.666199349729219,1
462 | 14.078462670794533,11.73621682692608,0
463 | 12.9917736389889,17.11916857591582,1
464 | 19.81741561130222,15.430621953737646,0
465 | 15.647633046419394,14.56841908530899,0
466 | 11.293458017451115,14.144201773878555,1
467 | 16.965895037570697,15.011416585938372,0
468 | 16.30819154663775,15.639110769767699,0
469 | 16.133160454680457,16.472622504054357,1
470 | 14.68629549354706,16.308183207359342,1
471 | 22.01479357217393,15.757760880658918,0
472 | 8.169618289909021,13.607248600098394,1
473 | 13.391751841333953,15.80680541479367,1
474 | 10.217694756962487,16.757029432035058,1
475 | 18.05478004633968,14.01540861876059,0
476 | 14.644379657165567,15.017149771340387,1
477 | 14.247345928937406,16.925996695642393,1
478 | 13.403624057970529,15.822389464572565,1
479 | 16.40937204106424,15.345748885039521,1
480 | 9.286304441231401,14.755934683032507,1
481 | 12.317573832638008,15.941191405017852,1
482 | 15.577535464984276,17.14931876345284,1
483 | 16.794911726059055,17.989528183769842,1
484 | 13.98467645343877,15.337867213904083,1
485 | 15.814838498689678,13.26099519464884,0
486 | 14.970656896257674,16.180713645368748,1
487 | 20.04655149170253,16.668786478061154,0
488 | 15.967084699924058,15.142839584672066,1
489 | 17.254052879028475,14.088329641202947,0
490 | 18.036308109839144,15.260251455936903,0
491 | 16.974731675270927,14.864839724070423,0
492 | 16.148517360692118,13.335052980351676,0
493 | 19.758512238253225,13.82453598124359,0
494 | 14.376043855372867,15.469357105630927,1
495 | 15.042921097009964,14.866556135056317,1
496 | 16.38515999047816,14.616681819319666,0
497 | 13.330686149154516,14.846013264149748,1
498 | 19.137434946867753,14.127177102204211,0
499 | 12.721055414652048,15.988296871070382,1
500 | 12.193472465931926,16.232919376149354,1
501 | 15.836529569145137,13.624542409527537,0
502 | 19.86478096329943,14.36045857712269,0
503 | 11.680067789454652,15.518714330124068,1
504 | 13.846408621549159,15.26881718631998,1
505 | 12.046654168573447,14.835819571197314,1
506 | 12.943970408086763,15.469128212931539,1
507 | 12.590845321020986,14.428667358802228,1
508 | 17.72740061123607,12.793034806946832,0
509 | 16.2974307106882,14.767804799138556,0
510 | 8.016551849663005,16.720235736933745,1
511 | 12.268874467029784,17.488789084713797,1
512 | 10.592304695594386,15.073508243981456,1
513 | 13.120270966814434,16.01469151801198,1
514 | 15.568983341025998,13.820904098338957,0
515 | 13.438520005124495,15.291510647322688,1
516 | 16.340170142087352,14.403220553325864,0
517 | 17.816918913355458,13.098065537004695,0
518 | 13.27736700558299,14.29987665903141,1
519 | 13.534613893443082,16.188279583102197,1
520 | 15.370460833022594,15.068377775639647,1
521 | 19.737742832328657,15.010567910523633,0
522 | 16.67837625923969,14.562583800375524,0
523 | 14.338940397927816,15.54152978181889,1
524 | 15.193972631857969,14.08155598627307,0
525 | 15.526725962827795,14.160406527343765,0
526 | 13.817823059386583,14.146843832593422,1
527 | 15.042994512371745,15.9626549071051,1
528 | 15.757141716240488,17.23034077275384,1
529 | 14.16678044100479,13.548844807073717,0
530 | 14.213515666206666,15.534521677257999,1
531 | 18.18912586888455,17.179532231496047,0
532 | 8.50792976177802,16.533320804725868,1
533 | 12.119425790081527,15.409678476869454,1
534 | 15.944037214778689,16.438646820339518,1
535 | 17.11400920012155,17.53226507844995,1
536 | 22.44833554307058,16.58824288439752,0
537 | 18.07151375741458,15.200842539856074,0
538 | 19.558013529063533,15.058649281924422,0
539 | 15.702096952969725,16.024165141025883,1
540 | 14.75902054688718,16.51108442288046,1
541 | 12.357084325284589,15.643819894634357,1
542 | 18.86580438000858,15.312598663586545,0
543 | 16.08735599223481,14.943774489875517,0
544 | 10.126180630841377,17.914794011161444,1
545 | 17.113550226101122,16.002973481213527,0
546 | 15.666886663082348,16.532944868663684,1
547 | 13.51682379268223,15.455063491709852,1
548 | 13.84524157491767,14.797715179851213,1
549 | 18.946420182202306,13.442952222187575,0
550 | 18.737388810917402,15.250818092390778,0
551 | 15.855335842016835,15.64423709928407,1
552 | 13.430120699534749,17.099513415814563,1
553 | 16.06497826448683,16.728564456718924,1
554 | 17.13990821598479,15.422743192551268,0
555 | 15.01274205206554,14.386410173290066,1
556 | 10.699528393894226,15.756494995383658,1
557 | 10.731595044439427,16.896789299130454,1
558 | 13.53869754936635,14.66487120680751,1
559 | 18.23405550274542,15.013891723328705,0
560 | 15.137508218195432,15.670399218671372,1
561 | 9.009235253110255,14.169686447962041,1
562 | 11.242512376916359,16.152668312081293,1
563 | 15.431343221656842,16.164607504013123,1
564 | 13.645807364807295,14.53916805608185,1
565 | 18.34191060047492,16.464352827431924,0
566 | 20.05210839397513,14.309243147473008,0
567 | 17.880527426829257,14.47857843200603,0
568 | 18.435944981277018,15.991808977319222,0
569 | 11.273356853170915,16.510944632821243,1
570 | 12.1432651595544,14.118333100273729,1
571 | 13.275702348827288,17.267599823733015,1
572 | 13.223981582865747,15.127257740791558,1
573 | 15.508162839351593,17.217163587979442,1
574 | 13.362201788818668,17.253323391806397,1
575 | 19.39640263171559,12.562097252950476,0
576 | 10.375499100678283,16.64926245532941,1
577 | 18.82524311964627,15.738829432598596,0
578 | 18.457881190556208,14.476513251893387,0
579 | 13.487110869756961,14.783344685153113,1
580 | 15.938888223254732,16.145411393726953,1
581 | 12.945018642740441,15.905578776166829,1
582 | 18.86427500998614,14.560556742812839,0
583 | 16.05372998589505,14.014491498703137,0
584 | 17.471035740270942,14.17497059681543,0
585 | 13.33231004072956,16.802118963664896,1
586 | 15.189014878976636,13.546724024042373,0
587 | 16.750396410698425,13.94346670756168,0
588 | 21.041911436727446,16.952044428215785,0
589 | 13.141641527960669,13.93934169739448,1
590 | 19.603070770006504,14.63896453933206,0
591 | 13.781155107606697,13.566283080353593,1
592 | 15.531018949356534,15.442182293374277,1
593 | 14.120837482150273,15.214526444868206,1
594 | 18.64443381956309,14.699483436776383,0
595 | 17.49354117772193,15.666688221906233,0
596 | 16.002699863276543,15.283568919203619,1
597 | 18.764093677219087,15.314370454946863,0
598 | 12.706988763358392,15.432767356941639,1
599 | 15.737730610920734,16.41223332783076,1
600 | 17.645810016355284,15.060690302365023,0
601 | 13.2365551351064,15.95021286849193,1
602 | 16.34939240866287,15.026479572446535,0
603 | 15.412974609701005,15.207081303869337,1
604 | 18.622256466489436,14.72385030790165,0
605 | 11.80679308841145,16.552412394573306,1
606 | 16.381221385806253,13.480319845030333,0
607 | 16.81426231824213,15.022155254944622,0
608 | 13.051652511873781,15.966934573753429,1
609 | 19.32958814573156,13.704814887560616,0
610 | 18.573300338958784,15.2567028605504,0
611 | 13.70438429458472,15.65375606466674,1
612 | 19.06677664788432,14.553902623578699,0
613 | 15.64761856854494,17.269091472658353,1
614 | 20.11087819016459,15.419250819942349,0
615 | 13.312314022204099,16.042950770543662,1
616 | 15.267901468554765,14.339433686218646,0
617 | 12.322364986090497,15.805357406768652,1
618 | 17.7627437619758,12.784182302029283,0
619 | 21.44477299179926,15.59553089190723,0
620 | 12.169860943130562,13.642088080300903,1
621 | 11.883861150990704,15.368951621571387,1
622 | 15.361235403601464,17.123298132450515,1
623 | 17.13527260175028,13.833003245043253,0
624 | 10.600758183839051,15.444195012219813,1
625 | 12.237329856692552,15.575098807763634,1
626 | 11.05865159900279,15.079061470399298,1
627 | 16.34967196791521,15.90425694090054,1
628 | 18.338410646826986,15.197936562287493,0
629 | 21.913195048151998,17.03477671122675,0
630 | 12.1296436005509,16.347782900246717,1
631 | 15.888949889682982,16.3143644948591,1
632 | 15.582262164647966,16.58750325856339,1
633 | 16.764421391747476,15.720091641671356,0
634 | 20.75267724337715,14.034450894515501,0
635 | 10.457190577025921,15.047817762144154,1
636 | 20.68203234632233,16.70302701867127,0
637 | 14.722012500970978,15.660682673078012,1
638 | 16.442515030103827,15.055439320481932,0
639 | 16.87783002172947,15.011763906346482,0
640 | 18.65339876603141,15.622080315424625,0
641 | 14.077843659757654,15.477478568673927,1
642 | 10.41491475507678,17.15786540145053,1
643 | 12.668330962046475,14.47035201917037,1
644 | 11.418463959483368,15.542410073008433,1
645 | 18.492241285474744,16.182410731592213,0
646 | 14.864593498681135,15.199601373199542,1
647 | 11.107131586068311,15.579279512451823,1
648 | 13.49552065849294,12.58653454714702,0
649 | 14.634287200475198,14.462292991483457,1
650 | 13.98345590036196,16.855708493188526,1
651 | 9.81940702188737,14.170716167194424,1
652 | 12.359275176430232,14.778582747104174,1
653 | 12.369684722374624,14.897802289597204,1
654 | 18.33064576800444,14.89621076643753,0
655 | 12.28417556591357,16.986909780641223,1
656 | 15.641147624634325,14.681282916914029,0
657 | 12.827212158851756,16.270605018643725,1
658 | 13.007123615252713,14.924493515837906,1
659 | 13.865446052872075,16.3647437764788,1
660 | 12.395053914467642,14.534362602637495,1
661 | 13.144535646674044,17.474108654027912,1
662 | 14.9367963713392,17.02464887046432,1
663 | 14.95398919566473,15.274708225384952,1
664 | 14.077998766639448,15.161711681558788,1
665 | 9.288591399960648,14.48662101788992,1
666 | 17.266821566365607,15.060062306767389,0
667 | 14.838455240771333,14.24298261711311,0
668 | 13.77333612100724,17.8183720967176,1
669 | 12.58689736495093,17.286317076153967,1
670 | 14.253309690421537,14.8818094595066,1
671 | 15.027290668585888,14.553705531577345,1
672 | 17.772818129938,14.460701352781502,0
673 | 12.900836369602576,13.895263717496483,1
674 | 12.548705129094943,16.00263752100939,1
675 | 14.106949625182546,16.994249145368453,1
676 | 11.64431609691061,17.382675238522943,1
677 | 16.128712125146947,16.15800656843798,1
678 | 12.986956583205806,16.120919701099048,1
679 | 12.395356572299129,15.591868603289372,1
680 | 14.521479129167936,17.125291734759724,1
681 | 16.75928609574348,16.773499664056565,1
682 | 9.184053015357783,15.482381376190803,1
683 | 15.335860201713611,14.637535126039356,0
684 | 15.844056742222337,16.74364688665601,1
685 | 11.727884530109087,17.50763805808851,1
686 | 11.50837188221322,14.851420131159514,1
687 | 13.323391916979826,15.287646991786172,1
688 | 17.365100146663956,13.842061789261844,0
689 | 17.104489847083432,16.300385965577746,0
690 | 15.781718705143454,13.774395955054231,0
691 | 12.447795078708054,15.626333090078306,1
692 | 15.788219517324608,15.814131259181474,1
693 | 15.574519683163789,16.299647967095673,1
694 | 18.943186260449323,14.858508367758489,0
695 | 16.347292064968038,13.583497493742083,0
696 | 12.708713506697938,16.99660197383005,1
697 | 14.458938999481123,15.11103716007035,1
698 | 19.799296763890503,15.690688686955003,0
699 | 14.354126609124243,13.74307429735436,1
700 | 12.722724294202687,13.740745907618393,1
701 | 13.878592934364406,14.779119582662146,1
702 | 19.300751918601804,15.142043032867189,0
703 | 19.735025493372063,14.971908224510102,0
704 | 9.458000736284971,14.840069043511377,1
705 | 14.99770880467701,15.292722558534862,1
706 | 18.475696330885675,15.494182686680682,0
707 | 15.821628460491295,16.438976389727927,1
708 | 14.75362161818527,14.859705899716499,1
709 | 14.407254994994984,16.116766697316162,1
710 | 7.173775709517747,14.050738714851667,1
711 | 19.642612506959274,13.759451420964059,0
712 | 11.243539454022915,13.260053968329192,1
713 | 19.083616913255092,14.650109785175042,0
714 | 13.154559180633179,16.567985021970067,1
715 | 15.625429422917405,14.093811014172415,0
716 | 14.506929671947136,16.323712686292193,1
717 | 14.335567709610702,14.931103625338043,1
718 | 21.081819845021823,12.848369775457039,0
719 | 13.415887615860793,15.045303071715608,1
720 | 11.918649683006564,16.789217430092048,1
721 | 11.725745981292022,16.35646941110366,1
722 | 15.027786051027123,15.394892614252388,1
723 | 17.146770072388907,15.434645177369239,0
724 | 14.524709607928953,14.55908333712124,1
725 | 10.538796467481212,15.127259072334581,1
726 | 18.324594696931648,16.152775399260747,0
727 | 14.569419369820396,14.95832710651618,1
728 | 10.482285470755713,14.150924132414055,1
729 | 18.500619421262172,13.39039009589563,0
730 | 13.279411373785573,16.50376619869269,1
731 | 14.438094763119537,14.89167894304458,1
732 | 19.64564188609051,15.396452846571739,0
733 | 14.416120355476421,14.960527925486264,1
734 | 16.96674719386442,15.08030589616816,0
735 | 15.987539965908967,15.886750024739591,1
736 | 18.979305218878444,14.29973920260517,0
737 | 15.112122307072573,13.07446471538547,0
738 | 14.216036502151226,15.16133709518008,1
739 | 14.751821049134191,13.618971652457363,0
740 | 13.637850603254845,15.972522044543647,1
741 | 12.718947714961722,16.67326580819552,1
742 | 16.998942593218544,15.296527737854872,0
743 | 18.825336067294185,14.52853246969567,0
744 | 15.194053042107086,15.154014464064733,1
745 | 15.781003277293117,13.804706521043379,0
746 | 15.765694206691704,15.560533738635318,1
747 | 14.524818482064568,13.0780426542946,0
748 | 14.714007746858343,16.693104744202117,1
749 | 13.194235899727202,16.111820781829515,1
750 | 9.683290590139913,12.884304767706752,1
751 | 15.69054722758697,17.53372472964754,1
752 | 16.725782100758643,17.36479263071484,1
753 | 14.440518600540498,16.941803077542037,1
754 | 19.54664365487261,15.440728710187175,0
755 | 15.329026457608197,14.318889517581807,0
756 | 11.21196323979997,15.943951910060367,1
757 | 17.645318150916655,15.503803342738935,0
758 | 12.194436454676218,16.029818715440452,1
759 | 12.551763770185097,14.393483186546707,1
760 | 14.82091443610896,15.014117709616672,1
761 | 14.384232027110306,15.769301073927961,1
762 | 13.711589393759684,12.028455888213895,0
763 | 15.532333540023792,13.661101485372276,0
764 | 13.549130481649776,16.18790429903301,1
765 | 13.648813263062621,15.206589070507396,1
766 | 11.236968988863916,14.536448582915678,1
767 | 21.121171095889313,15.92241029991504,0
768 | 15.651218350065557,14.037471544847804,0
769 | 12.269897278706951,15.814934355667555,1
770 | 18.369173542644823,14.774546972705675,0
771 | 9.416004588779217,15.197093680772864,1
772 | 14.099191272512337,16.733263233050074,1
773 | 18.040324158781026,14.888753161140915,0
774 | 11.202683117018324,12.82026894518589,1
775 | 18.78053270332465,14.787502470681815,0
776 | 13.017866992330433,15.174147715299652,1
777 | 19.97440902355252,15.813854772228215,0
778 | 17.000977314193122,15.36002718696666,0
779 | 16.60350783403471,15.280159401643049,0
780 | 17.421718026973505,14.623134007039859,0
781 | 16.98152104499465,15.480735483587116,0
782 | 12.849925562331114,16.2802074196233,1
783 | 20.926834327299456,15.481165812997993,0
784 | 13.556182691248914,15.881964268343994,1
785 | 18.886042190642705,15.187032401864993,0
786 | 13.661513793261857,14.229172425674689,1
787 | 9.961711735389173,18.006561398690426,1
788 | 15.602411920694907,14.479490988251037,0
789 | 15.757103361883036,15.974605304122699,1
790 | 14.790194245615378,13.678867188716895,0
791 | 15.141575023767057,14.52263894093524,0
792 | 10.483240600954229,15.886555758287336,1
793 | 18.176358775727216,15.147352490379555,0
794 | 12.649835573300813,15.105216857734183,1
795 | 10.634630982243714,15.581838776421566,1
796 | 12.044334464351454,16.10312943348829,1
797 | 10.571884965622713,13.87791106773222,1
798 | 14.879462939244041,15.063723942618054,1
799 | 16.257943089304867,16.928715938003442,1
800 | 17.203268607129278,14.778894919488264,0
801 | 13.393816044114581,16.50580513333357,1
802 | 12.774112014300524,15.28488429195083,1
803 | 17.43426368501733,13.681192865439156,0
804 | 13.094135729896127,15.029113287353988,1
805 | 14.976169898636591,16.060947289721916,1
806 | 18.601879086238963,18.37050035393364,1
807 | 17.55264650387597,16.32670624848141,0
808 | 13.687212777001049,15.453382342231361,1
809 | 15.60663934881399,13.900064047056677,0
810 | 18.0388216226442,15.489644386109168,0
811 | 14.49636006655099,15.01351928129274,1
812 | 14.035448094326318,16.979642811405,1
813 | 13.975786622490315,14.828889675393224,1
814 | 7.86051922516636,14.472112429527677,1
815 | 15.316148753235119,15.048348654449079,1
816 | 16.051207696403747,13.827512053895601,0
817 | 11.421458808045896,15.803758429852863,1
818 | 14.07961518131579,16.186799158284323,1
819 | 15.067438893695547,16.555226487330152,1
820 | 15.47776788575534,16.22131090024087,1
821 | 16.647693183026654,15.129044502868002,0
822 | 13.811152785920797,14.523313594327758,1
823 | 13.819634887605332,16.204055083151957,1
824 | 21.235782454339354,14.802163248271146,0
825 | 14.378767103346643,17.540805739614814,1
826 | 16.61415475599939,15.857747012470785,0
827 | 10.9078130632694,16.36285856030563,1
828 | 18.402364986184423,15.051070658527305,0
829 | 12.704175980218263,16.728042328073073,1
830 | 16.0484528830578,14.711858194675973,0
831 | 15.564363532472115,14.113784176895548,0
832 | 15.998419810643467,17.37076833589357,1
833 | 12.139409793852627,15.912835366681808,1
834 | 19.66235758212293,15.65939540563707,0
835 | 13.362581773475483,17.496798713472746,1
836 | 14.40460195947125,15.328265387772323,1
837 | 14.829852393141882,16.519549066315015,1
838 | 14.057290052071902,16.4965768553297,1
839 | 13.37721698773687,14.9135336370414,1
840 | 14.726869816044529,16.757141314979826,1
841 | 14.982712166791368,16.2948952709706,1
842 | 14.673401951014267,15.365027617029702,1
843 | 15.150415921758931,16.953989079095678,1
844 | 15.015074512323892,15.620527486945827,1
845 | 16.167946450331645,14.653626451393245,0
846 | 19.306598019550698,15.534498883773761,0
847 | 18.59871776504004,15.765694609460871,0
848 | 14.089285926657666,15.768845203725453,1
849 | 9.157860223656074,16.403071663798904,1
850 | 16.742108702478486,14.433290457382855,0
851 | 16.67557051517421,14.608579150433599,0
852 | 9.766264142127914,14.27245252733543,1
853 | 14.682511716391982,16.12989896034602,1
854 | 12.17324544445186,15.49294290406206,1
855 | 11.460837180274233,17.22953415715291,1
856 | 17.073419444978565,14.5451440907416,0
857 | 14.48835096809682,15.95940451183887,1
858 | 16.07537950693971,12.76963432151663,0
859 | 23.14165520241016,12.521542989386079,0
860 | 16.76315898884725,15.530740959272965,0
861 | 14.571806875406907,15.512026735413519,1
862 | 18.018659376801182,15.481336467719988,0
863 | 16.041563838798726,16.082660517627357,1
864 | 11.887130851761297,16.0329880879787,1
865 | 12.180485357238483,16.700236109580793,1
866 | 16.026113801209853,16.766768470539272,1
867 | 13.921343297394232,16.1823645155443,1
868 | 18.144494263083022,15.830377807509494,0
869 | 20.811654526611576,16.68622234716186,0
870 | 15.388159997051922,15.9347933431299,1
871 | 13.24414571982024,15.821922574930731,1
872 | 7.261440154315351,16.817114396887195,1
873 | 14.043032078493745,14.74646540920326,1
874 | 15.929893882134683,15.52627240156353,1
875 | 20.093510948754087,13.487491959756138,0
876 | 14.166686206151251,15.747197903806354,1
877 | 12.366958094494054,16.462026583180478,1
878 | 16.834673187401126,14.405135672422741,0
879 | 10.436034747980546,17.136370120425983,1
880 | 14.633203156338375,13.589480323084354,0
881 | 10.23501060119722,15.759644284582608,1
882 | 13.835587564559187,16.769396006938713,1
883 | 18.664729326937884,16.03205828622839,0
884 | 13.659761471425472,15.029841240083941,1
885 | 13.208281915568406,15.043639218454011,1
886 | 10.465873110925639,15.65919519074086,1
887 | 17.785091372581213,14.214052600910005,0
888 | 13.200481711951886,16.01388699642621,1
889 | 14.574080779489705,13.466229415460397,0
890 | 12.687182342095753,15.450825340620485,1
891 | 10.925742457227667,15.64075952011113,1
892 | 14.827889188966248,14.077591953474336,0
893 | 15.14042152160118,13.969676113763821,0
894 | 13.097290185804091,15.992210209470004,1
895 | 14.104050195376669,16.9946005914874,1
896 | 9.637436986300544,16.224037227975693,1
897 | 13.83778155810823,15.554725432080755,1
898 | 12.721331179612164,16.14153395906408,1
899 | 14.219027949660939,17.13295647635707,1
900 | 17.387617672730585,14.395172058202979,0
901 | 15.671296065672966,14.476975161856686,0
902 | 17.551016929003143,16.609005528485966,1
903 | 17.534395297398536,15.425934499842729,0
904 | 20.664858417616376,15.815321065055086,0
905 | 17.17043212136784,15.322435565561884,0
906 | 14.26055494431163,15.097089641696096,1
907 | 19.804332739048398,15.228331354949827,0
908 | 13.179368649194474,13.89409096305691,1
909 | 17.19607327144225,14.34311146557389,0
910 | 16.580394153013746,16.07951290714808,0
911 | 14.889723761227064,13.76649358083596,0
912 | 15.626135550181989,15.672751412063981,1
913 | 12.149792657535588,15.046250250546581,1
914 | 15.913856430704062,14.490914654286605,0
915 | 13.469457896707423,14.62882621757175,1
916 | 12.325277338346071,16.442061844290578,1
917 | 16.87550716770515,14.989862094804039,0
918 | 16.385988684608428,17.16559548633847,1
919 | 12.91360131699631,13.745190270170205,1
920 | 12.33954276744387,17.31818984583575,1
921 | 13.957896609821665,14.404778102157074,1
922 | 12.20093351546112,15.513923957112736,1
923 | 12.87075972118794,15.566289109110265,1
924 | 10.237703526581884,14.161555700133972,1
925 | 17.07729910479725,14.822878808766024,0
926 | 19.988127155650453,14.348443731098877,0
927 | 11.444145192684164,15.859786842097517,1
928 | 12.999045447492156,16.44606759083006,1
929 | 9.859831054954483,16.805183483380393,1
930 | 15.325981124087285,14.461663069504498,1
931 | 15.328998189371438,15.711939959514813,1
932 | 15.008173091880888,11.85168853301277,0
933 | 16.28564307101131,17.258059952146247,1
934 | 9.918263375320668,15.753669569686098,1
935 | 12.634373501814526,14.578651418907437,1
936 | 14.063554071769719,15.877229007352499,1
937 | 15.61190777330777,15.267433281385781,1
938 | 14.155429492746011,15.075647438322576,1
939 | 16.764284692422237,14.494585800785933,0
940 | 13.930559597752884,12.670849072400523,0
941 | 23.79687046219037,13.973845031035557,0
942 | 14.368582083517543,13.751794748957838,1
943 | 14.458335558190583,16.603257982386065,1
944 | 18.012249891850097,15.92355090488934,0
945 | 17.558106176645005,15.540197187031163,0
946 | 13.981157512612484,15.901889559149547,1
947 | 11.412016537446963,16.157835415501843,1
948 | 15.874439985437476,14.565623259460372,0
949 | 10.058538973985623,15.158026324986075,1
950 | 17.59349800892382,15.215404935128324,0
951 | 16.976105520605426,15.007941416732976,0
952 | 15.779053273725667,15.965321544124254,1
953 | 19.928603946253556,15.314306784635502,0
954 | 14.212932082210617,16.326061295219105,1
955 | 16.177625213527378,13.563560088617182,0
956 | 14.701283706348043,14.936921527011387,1
957 | 16.53505398052733,14.862520616812544,0
958 | 15.197925835765043,15.06088814649753,1
959 | 15.364914346451863,17.022813201751436,1
960 | 13.17378324312503,14.76179502320765,1
961 | 15.367155931932738,14.009871552719469,0
962 | 15.604742232016624,15.63384836803443,1
963 | 15.62202668748124,16.396177217687555,1
964 | 16.137904823402394,14.09156499612537,0
965 | 11.312563113731457,16.60396776565274,1
966 | 16.51604250522633,14.039426219519232,0
967 | 16.64083049322764,13.466644795892117,0
968 | 17.268416693581006,14.284441479726805,0
969 | 12.639096143070562,16.348025528567867,1
970 | 20.598552716794174,14.275491235032888,0
971 | 16.741017368183662,17.267146097863385,1
972 | 16.823629107755043,13.772517772692092,0
973 | 11.818081804791898,16.729134034423232,1
974 | 21.24515486519156,15.522367945511759,0
975 | 14.974378374594185,15.9747088916473,1
976 | 13.711593553058625,15.95699813906441,1
977 | 17.983541578801553,14.546878599368613,0
978 | 15.363817637532131,15.169795037974737,1
979 | 18.344583904004335,15.54432216327269,0
980 | 14.950813320571724,14.86441305045346,1
981 | 13.059078619153789,14.529185606648053,1
982 | 14.227898940807819,13.50167027994571,0
983 | 14.513437358677802,15.411116464944852,1
984 | 14.60457064153454,15.00926485643556,1
985 | 13.440350231917002,14.855398358307772,1
986 | 14.55600907646743,13.605663374123138,0
987 | 11.621448665439656,16.32634472757619,1
988 | 17.52065662480928,16.95079749769583,1
989 | 18.589112530941424,14.625145554369624,0
990 | 16.841053157633592,14.532974921111435,0
991 | 9.771423092647852,16.7545282172312,1
992 | 9.85753503848081,14.518942445412778,1
993 | 15.139551066515095,16.125182143731646,1
994 | 10.350823440614423,16.642782162624915,1
995 | 15.732518901237441,16.13836223215614,1
996 | 10.20359373171614,14.960286300104439,1
997 | 14.140607370806977,14.651450844783032,1
998 | 13.955822607764862,14.624031962139878,1
999 | 15.559442227791177,16.920793545867397,1
1000 | 13.834197491120374,15.828899280249098,1
1001 | 13.849705792908864,14.640590209995489,1
1002 |
--------------------------------------------------------------------------------
/data/tumors_reduced.csv:
--------------------------------------------------------------------------------
1 | leukocyte_count,blood_pressure,tumor
2 | 13.472968615888934,15.250393221933804,1
3 | 10.805510382493194,14.109675762663219,1
4 | 13.834052991147676,15.793920360902117,1
5 | 9.572811104830294,17.87328623966971,1
6 | 7.633667402156339,16.598559450376403,1
7 | 12.795533735896369,16.02132978336539,1
8 | 12.885376627994722,15.402248380446517,1
9 | 9.438946688645377,17.223709429576157,1
10 | 17.462393051356024,14.81863166931274,0
11 | 10.068626068706553,16.52057158613907,1
12 | 11.648341351899882,14.479663398057777,1
13 | 18.036615049366674,15.697719902470261,0
14 | 19.137337702298947,15.40874327569786,0
15 | 11.034546682020165,16.00729602734063,1
16 | 17.826128136930397,14.609331206734222,0
17 | 17.318532193814036,15.390311209899862,0
18 | 13.567902824989588,15.076382803264158,1
19 | 13.175192942422065,16.392252263408366,1
20 | 10.473926146400782,15.637052253737158,1
21 | 12.692060815849107,16.462445795842807,1
22 | 9.847692288755463,15.883228005259264,1
23 | 13.856256796644164,17.056462424785508,1
24 | 16.5957935094616,15.522164961157216,0
25 | 18.345093972537562,14.25516162614503,0
26 | 16.137448827694687,14.121867615835452,0
27 | 15.734422720294369,14.7929542037309,0
28 | 9.001079227411402,15.38234897833978,1
29 | 17.478463483830808,15.346093070396366,0
30 | 12.31993954777143,15.320901395754625,1
31 | 11.769786171318131,16.091259132083817,1
32 | 12.478419174463752,15.035097151605722,1
33 | 9.29152401270429,14.036631700160232,1
34 | 11.986271423702519,16.521595475308303,1
35 | 17.744408446296852,13.930996927270137,0
36 | 11.964918427252346,15.75148300033544,1
37 | 16.149755723035888,14.49605505878715,0
38 | 19.21390165689227,14.604255885187957,0
39 | 19.51041417352468,14.952694270637275,0
40 | 16.32384923674385,14.8490275995191,0
41 | 10.312527953689168,14.302595543175256,1
42 | 19.20664619122436,14.806607354103672,0
43 | 11.344103622692646,15.068414844894882,1
44 | 20.59651163981557,14.53267696480051,0
45 | 9.672522604235462,14.097902344376429,1
46 | 20.1088188560725,16.003879282184148,0
47 | 11.937543841643045,15.746718253765348,1
48 | 17.461846229897198,16.46325547863779,0
49 | 12.551827625929635,14.985502395303573,1
50 | 21.274749445796925,14.898310551344027,0
51 | 17.855787408239205,14.369247343609215,0
52 | 9.81353276280258,15.31755081350501,1
53 | 13.99472859125678,15.72487800312882,1
54 | 16.60112314385515,15.526174564820865,0
55 | 15.853195441691648,13.533828848758478,0
56 | 17.0243141211745,14.938095158980767,0
57 | 20.511445205413278,16.336878940548235,0
58 | 11.206587401970673,16.025155525259027,1
59 | 18.617026072307013,15.391931821045624,0
60 | 13.2740732152953,14.94001525480975,1
61 | 17.4785767858645,15.075842934423507,0
62 | 12.829270798185995,17.337387803426164,1
63 | 16.425967263076277,14.045905678010591,0
64 | 18.218196319373853,16.283950751039377,0
65 | 12.533177776213368,14.912641771020517,1
66 | 17.953225674155693,15.648104817837519,0
67 | 11.771974443630166,14.309895183529605,1
68 | 13.49338562462634,17.699428109698943,1
69 | 11.463155799422202,18.247223471848915,1
70 | 9.550819565537934,14.244182342530221,1
71 | 13.578509586104694,16.981410240715846,1
72 | 14.995974063471367,13.509315984354858,0
73 | 12.08862049657492,15.046285472605744,1
74 | 15.573719784974651,14.135744863162264,0
75 | 18.96516645843836,15.83006402245448,0
76 | 15.854104500176392,15.000674682948935,0
77 | 21.267145860027412,15.31147643235454,0
78 | 19.45959783268582,16.193688274736715,0
79 | 13.140405544577073,14.908245331622489,1
80 | 13.920708996701858,16.413060694208152,1
81 | 17.12739706589668,15.163336052710028,0
82 | 17.557333099591666,15.14709524206824,0
83 | 12.083288194557136,14.967680722681287,1
84 | 17.26225734019677,15.188942908858348,0
85 | 15.936428949972615,14.36407293738822,0
86 | 19.60558575643113,14.293490733532728,0
87 | 12.878292220357327,15.602327115208283,1
88 | 19.526668306232775,15.70411599639553,0
89 | 21.11489072435497,16.102150624216637,0
90 | 17.836825695468512,15.63972889354465,0
91 | 18.581601966970915,15.475376579419672,0
92 | 18.904042331831203,14.482434206731062,0
93 | 19.851334161241393,14.245063575855587,0
94 | 14.688559995760782,13.4421193273106,0
95 | 12.213537826683128,14.883268100598642,1
96 | 15.074648496303473,13.718833905345315,0
97 | 17.4883223224777,16.28298672214856,0
98 | 18.94826617218869,16.51699180466198,0
99 | 16.604525481360092,12.158263602970996,0
100 | 15.646210695825665,13.543139594249205,0
101 | 11.617979001912389,15.094659699170855,1
102 | 14.888835423357735,13.925219840763816,0
103 | 18.776650239534753,14.613686182398142,0
104 | 19.23928716103041,15.908783069435957,0
105 | 19.41220243252875,15.089686304271822,0
106 | 18.692651513032324,14.289601621208504,0
107 | 19.991435118562855,14.205391673699733,0
108 | 18.363270180335608,15.029254874298687,0
109 | 17.079192801506313,15.323172645668429,0
110 | 17.508198158948176,15.773942079841166,0
111 | 17.573299657016314,14.291488887670017,0
112 | 9.916983781894771,16.44803934367966,1
113 | 16.370442645929295,15.797742553078594,0
114 | 17.632578575666017,15.869585128920164,0
115 | 14.411002896183483,13.148424572134036,0
116 | 16.255936704081588,15.132611859218887,0
117 | 10.694324318798767,16.34122581571295,1
118 | 19.48161747468298,15.625090621507594,0
119 | 12.867935633980025,16.355407867063917,1
120 | 6.981598570534064,15.322173714174722,1
121 | 10.737119665979485,14.844421586507066,1
122 | 9.840449805798457,16.434717198055445,1
123 | 12.419275248466775,16.598801456087525,1
124 | 19.737042683184367,13.67935057694513,0
125 | 11.350685534009557,15.79186611627074,1
126 | 16.42078006402748,15.445148091170205,0
127 | 13.593327074211471,15.922367323727475,1
128 | 19.15130145307868,15.225159799585201,0
129 | 12.24307550200971,17.57619555636495,1
130 | 17.199498331801397,14.321889925976805,0
131 | 12.52148487171261,14.970808483187405,1
132 | 8.55257950598476,14.365121869602284,1
133 | 10.482656710894013,14.627895080697202,1
134 | 11.848710133205294,16.294745353212242,1
135 | 16.899857841264488,15.003623987566408,0
136 | 15.570468136344825,13.774843724822688,0
137 | 13.417376726157817,15.213805104815224,1
138 | 11.240331926202808,15.58813875172288,1
139 | 11.253406157732872,15.94820374722334,1
140 | 19.0127034621042,14.830361779678269,0
141 | 16.67032827719148,15.858951608950907,0
142 | 12.373383853330255,15.480650994977669,1
143 | 11.099771600411744,15.217296829226134,1
144 | 17.646526875231448,14.976548469081477,0
145 | 17.09662145557334,15.012458875426363,0
146 | 18.295551807979017,15.047242592283043,0
147 | 11.985918108734948,17.54515648839909,1
148 | 16.967577355348663,14.311798104394171,0
149 | 18.887186027027823,15.669864218780553,0
150 | 21.227704894831348,13.924925762527826,0
151 | 9.284434128808943,15.25557262876228,1
152 | 18.636528430244958,14.830287061445697,0
153 | 16.56625219720652,15.580210627210928,0
154 | 20.055882299022844,14.353279076652175,0
155 | 17.248514842239363,14.251073932748767,0
156 | 11.121752720320318,14.473495497600165,1
157 | 16.79454202862219,15.295081787135985,0
158 | 12.024237028364873,14.95441020223216,1
159 | 13.917521259400852,15.54897904012595,1
160 | 15.061249422583403,13.90980097000537,0
161 | 17.41143747390338,12.144353864475036,0
162 | 10.989743614748281,15.03263867448283,1
163 | 15.733972184463239,14.225094335345792,0
164 | 16.835544404459576,15.40791288932119,0
165 | 19.36355127544965,14.94520889593403,0
166 | 8.214407962356177,14.057150378774098,1
167 | 16.83953919674184,15.120095439840362,0
168 | 15.276286059454893,14.103201440136475,0
169 | 12.648974038435405,14.955288180219496,1
170 | 9.520071419939882,14.862791688156682,1
171 | 12.444765508552686,15.101514492894811,1
172 | 19.019331028794447,14.834595976499333,0
173 | 15.906943456597894,14.285154976999054,0
174 | 16.970399385706646,14.206793070047016,0
175 | 18.34567783161557,13.38117665048032,0
176 | 13.610569015257965,17.311706650354882,1
177 | 13.622751032177886,17.677531514774536,1
178 | 10.675387614374543,16.440117363379493,1
179 | 12.800618577325451,15.36942384317354,1
180 | 13.283595261700285,15.56934129627319,1
181 | 12.69710143854795,16.043672213027484,1
182 | 12.256927307015706,15.029602111754954,1
183 | 10.869162783773731,16.61243230751075,1
184 | 13.017489022456797,15.737785192977176,1
185 | 11.859756054559902,15.790189976799441,1
186 | 7.86825471644298,16.2127217375159,1
187 | 17.54854798164229,15.240103312598388,0
188 | 18.011357026800233,15.50704398848678,0
189 | 12.080669102471754,15.994405931356352,1
190 | 11.637453915933094,15.24816938867256,1
191 | 9.789964445272656,15.310660974145724,1
192 | 11.518162970985259,17.344457998863902,1
193 | 13.556383587789995,15.358709543313042,1
194 | 10.021082332140573,15.769791642389347,1
195 | 11.495664782976023,14.345425249276857,1
196 | 10.283036194931093,15.584865206092328,1
197 | 12.852007133160154,15.913194820142714,1
198 | 12.556401781727974,15.770530581521596,1
199 | 12.518333489126363,16.638401992882457,1
200 | 16.82998724714185,14.047312227841944,0
201 | 17.45568600817567,12.3847737503546,0
202 | 12.91538515158519,15.199039180638328,1
203 | 12.153783837807904,18.33164100684804,1
204 | 10.928707839203689,15.308438825595063,1
205 | 10.604330718647205,15.664112286337847,1
206 | 10.949190858298932,15.403369581101435,1
207 | 15.142710925544359,14.137213950282808,0
208 | 8.834109346140215,15.185140393049792,1
209 | 13.104569484133846,14.833848743471744,1
210 | 9.931937678298222,14.685836152532355,1
211 | 12.368682794027059,16.658550021337703,1
212 | 18.070265496497044,15.897211400427247,0
213 | 17.780756073870574,14.251281005632128,0
214 | 8.994994621310774,16.364627717297868,1
215 | 12.91176009388807,15.892499474352642,1
216 | 18.55155695713512,14.241766102826286,0
217 | 12.072272463653581,14.646148278834348,1
218 | 16.645950714491562,14.54428976580573,0
219 | 12.469844611630625,15.477894868774403,1
220 | 18.183232589373933,14.827762640862229,0
221 | 11.073288593200424,15.765668910415622,1
222 | 21.96745870683285,15.33273379463343,0
223 | 11.04632003090673,16.35528303273453,1
224 | 18.07436143911311,15.10775094892968,0
225 | 17.0548608968692,14.373786490774869,0
226 | 12.000339222606488,16.273758796862346,1
227 | 19.113259395046214,15.449089353324705,0
228 | 15.369099600375693,14.589367758324288,0
229 | 19.03218308797355,15.735354159549638,0
230 | 16.519486352351098,14.23264239326558,0
231 | 12.959260640888461,15.896218479841444,1
232 | 18.284666834873622,15.940293186771223,0
233 | 17.920342935336866,17.244330385870807,0
234 | 13.490355373686501,15.578362881815497,1
235 | 16.915807519005828,14.08991155467373,0
236 | 17.84728738180293,15.949659483546506,0
237 | 13.213198027660882,14.929766178652853,1
238 | 12.527765301246687,15.896772878874845,1
239 | 18.609122037856395,15.246568408956614,0
240 | 12.708126550526835,16.02370077975006,1
241 | 15.632308067215044,14.391747102492998,0
242 | 21.22213711836492,14.242718176978173,0
243 | 16.32364382377055,13.708458035750816,0
244 | 13.271832988920247,15.238723575287857,1
245 | 17.52782661228051,15.970560131420767,0
246 | 4.201800958477197,14.304839917086747,1
247 | 19.533403895051066,15.219665059510424,0
248 | 18.667991030885318,14.418799064291182,0
249 | 18.978340303094708,15.698047743596415,0
250 | 19.20923347161644,16.42695205986969,0
251 | 16.390729624194506,14.419258015841443,0
252 | 16.196971485693343,13.212790371309842,0
253 | 16.723626000399257,12.365783473739938,0
254 | 17.74295835980201,14.925906583542227,0
255 | 10.185835310804203,15.230225355647283,1
256 | 18.60715951290544,16.785183964799877,0
257 | 16.062756948519365,15.082032707335175,0
258 | 13.690894105531468,15.536279498324205,1
259 | 17.657135059570642,16.23374781806288,0
260 | 18.543033243129376,13.948474445273852,0
261 | 15.659960205719546,14.701776945238151,0
262 | 20.35579463640567,16.974463734468557,0
263 | 10.725544284697097,14.725802616127984,1
264 | 17.653676307491306,15.448898429104416,0
265 | 11.780365041149459,14.940509053851244,1
266 | 15.026406348349266,13.454134086675925,0
267 | 16.64334612899788,13.71176095609501,0
268 | 18.489777047829186,13.664753309930965,0
269 | 17.31155388419491,16.18110089139477,0
270 | 6.018592243444331,15.346652083433305,1
271 | 17.946809962088707,15.608453491878228,0
272 | 18.129531226584543,14.770003120551467,0
273 | 20.26262837192094,15.7978376138695,0
274 | 11.92115561707828,16.226342656067928,1
275 | 17.717369613248273,14.475777507873392,0
276 | 13.977986835914137,16.513264466219606,1
277 | 18.4928868601248,15.748817119823695,0
278 | 12.030190905438054,15.907816841983296,1
279 | 11.313071849705132,16.323401321741727,1
280 | 9.892338801068423,15.22204087225568,1
281 | 18.759224843571623,13.70665180986938,0
282 | 16.48031148792053,12.922813045967175,0
283 | 16.8252028989644,15.10809782246327,0
284 | 11.384577378165776,17.376401802773362,1
285 | 13.970188382224784,16.930794964008324,1
286 | 20.2229441336003,15.614931699526702,0
287 | 12.669980442482998,16.066329838570496,1
288 | 21.397780970346513,15.53205646938323,0
289 | 8.420848548405777,16.63637208225977,1
290 | 18.23545357610537,15.462284134346156,0
291 | 13.327363651852142,15.84132832452199,1
292 | 15.233197170663356,13.250173720351142,0
293 | 12.566817141208109,15.93967379609639,1
294 | 18.4092427025124,15.190971605308208,0
295 | 11.506620396513338,15.980307987351601,1
296 | 18.309297538279754,14.526870017404535,0
297 | 9.628504579463579,14.9134332023922,1
298 | 19.285571258776315,16.276502765164178,0
299 | 16.982672583445428,13.23263324297191,0
300 | 18.162335245344586,14.014598306994364,0
301 | 17.49049127813995,14.618758438226287,0
302 | 12.051451516698483,16.953226838132895,1
303 | 16.79917933285475,15.260360897974007,0
304 | 13.208503234860894,15.331154443710364,1
305 | 10.764513029371594,16.068074068035052,1
306 | 16.51916750245296,14.031274132866855,0
307 | 17.207743185230534,16.221021462758486,0
308 | 11.653335359913548,16.183069284730326,1
309 | 15.707926647114965,13.15982641267209,0
310 | 10.281464854040335,14.827697392071006,1
311 | 11.912878343453752,14.881422829267159,1
312 | 15.613526232104938,13.359264779665896,0
313 | 13.580477912298935,18.29277871791872,1
314 | 16.962950218404153,14.740883535145187,0
315 | 11.017002775839224,15.649103688418949,1
316 | 16.48163755096283,14.955614687791135,0
317 | 15.643884932583571,13.801949460993999,0
318 | 13.319708307934805,16.22999591164129,1
319 | 19.522082034068582,13.824456399421926,0
320 | 9.975835882845185,15.465792034401773,1
321 | 11.83447062474752,15.409907647768835,1
322 | 12.110951954123,14.928284954458952,1
323 | 18.979159869084135,15.399131673042264,0
324 | 19.270878391315875,16.740151490012543,0
325 | 13.87411837788453,15.912589122230543,1
326 | 18.975361952733255,15.187236883201587,0
327 | 11.702085809410287,15.619253633324123,1
328 | 20.003315529988257,15.41052670294742,0
329 | 11.800507397297432,16.527091896756357,1
330 | 18.69941624306763,14.053828281859003,0
331 | 15.609077486659837,13.651668572505264,0
332 | 10.93492527121912,14.826321978798713,1
333 | 20.46503094462532,14.697505432528839,0
334 | 17.922913902960705,16.338879476467454,0
335 | 12.380135170121243,15.137247846840493,1
336 | 20.2191016249498,13.447960666650522,0
337 | 19.114302921366477,16.06094252777512,0
338 | 13.367974441991338,15.741789949878164,1
339 | 21.339698281165862,13.154842057819316,0
340 | 11.66498489014074,14.365263433575398,1
341 | 15.996964022399856,14.953148207557035,0
342 | 17.18434026499196,13.870265729734628,0
343 | 17.89806351888551,13.30088102459631,0
344 | 13.857608005738815,15.523027951788327,1
345 | 16.795185912149933,14.434741226346999,0
346 | 8.383661939011064,14.356183909202464,1
347 | 16.988734039406655,13.879348602202514,0
348 | 9.410626669700704,15.666199349729219,1
349 | 14.078462670794533,11.73621682692608,0
350 | 12.9917736389889,17.11916857591582,1
351 | 19.81741561130222,15.430621953737646,0
352 | 15.647633046419394,14.56841908530899,0
353 | 11.293458017451115,14.144201773878555,1
354 | 16.965895037570697,15.011416585938372,0
355 | 16.30819154663775,15.639110769767699,0
356 | 22.01479357217393,15.757760880658918,0
357 | 8.169618289909021,13.607248600098394,1
358 | 13.391751841333953,15.80680541479367,1
359 | 10.217694756962487,16.757029432035058,1
360 | 18.05478004633968,14.01540861876059,0
361 | 13.403624057970529,15.822389464572565,1
362 | 9.286304441231401,14.755934683032507,1
363 | 12.317573832638008,15.941191405017852,1
364 | 15.814838498689678,13.26099519464884,0
365 | 20.04655149170253,16.668786478061154,0
366 | 17.254052879028475,14.088329641202947,0
367 | 18.036308109839144,15.260251455936903,0
368 | 16.974731675270927,14.864839724070423,0
369 | 16.148517360692118,13.335052980351676,0
370 | 19.758512238253225,13.82453598124359,0
371 | 16.38515999047816,14.616681819319666,0
372 | 13.330686149154516,14.846013264149748,1
373 | 19.137434946867753,14.127177102204211,0
374 | 12.721055414652048,15.988296871070382,1
375 | 12.193472465931926,16.232919376149354,1
376 | 15.836529569145137,13.624542409527537,0
377 | 19.86478096329943,14.36045857712269,0
378 | 11.680067789454652,15.518714330124068,1
379 | 12.046654168573447,14.835819571197314,1
380 | 12.943970408086763,15.469128212931539,1
381 | 12.590845321020986,14.428667358802228,1
382 | 17.72740061123607,12.793034806946832,0
383 | 16.2974307106882,14.767804799138556,0
384 | 8.016551849663005,16.720235736933745,1
385 | 12.268874467029784,17.488789084713797,1
386 | 10.592304695594386,15.073508243981456,1
387 | 13.120270966814434,16.01469151801198,1
388 | 15.568983341025998,13.820904098338957,0
389 | 13.438520005124495,15.291510647322688,1
390 | 16.340170142087352,14.403220553325864,0
391 | 17.816918913355458,13.098065537004695,0
392 | 13.534613893443082,16.188279583102197,1
393 | 19.737742832328657,15.010567910523633,0
394 | 16.67837625923969,14.562583800375524,0
395 | 15.193972631857969,14.08155598627307,0
396 | 15.526725962827795,14.160406527343765,0
397 | 14.16678044100479,13.548844807073717,0
398 | 18.18912586888455,17.179532231496047,0
399 | 8.50792976177802,16.533320804725868,1
400 | 12.119425790081527,15.409678476869454,1
401 | 22.44833554307058,16.58824288439752,0
402 | 18.07151375741458,15.200842539856074,0
403 | 19.558013529063533,15.058649281924422,0
404 | 12.357084325284589,15.643819894634357,1
405 | 18.86580438000858,15.312598663586545,0
406 | 16.08735599223481,14.943774489875517,0
407 | 10.126180630841377,17.914794011161444,1
408 | 17.113550226101122,16.002973481213527,0
409 | 13.51682379268223,15.455063491709852,1
410 | 18.946420182202306,13.442952222187575,0
411 | 18.737388810917402,15.250818092390778,0
412 | 13.430120699534749,17.099513415814563,1
413 | 17.13990821598479,15.422743192551268,0
414 | 10.699528393894226,15.756494995383658,1
415 | 10.731595044439427,16.896789299130454,1
416 | 18.23405550274542,15.013891723328705,0
417 | 9.009235253110255,14.169686447962041,1
418 | 11.242512376916359,16.152668312081293,1
419 | 18.34191060047492,16.464352827431924,0
420 | 20.05210839397513,14.309243147473008,0
421 | 17.880527426829257,14.47857843200603,0
422 | 18.435944981277018,15.991808977319222,0
423 | 11.273356853170915,16.510944632821243,1
424 | 12.1432651595544,14.118333100273729,1
425 | 13.275702348827288,17.267599823733015,1
426 | 13.223981582865747,15.127257740791558,1
427 | 13.362201788818668,17.253323391806397,1
428 | 19.39640263171559,12.562097252950476,0
429 | 10.375499100678283,16.64926245532941,1
430 | 18.82524311964627,15.738829432598596,0
431 | 18.457881190556208,14.476513251893387,0
432 | 12.945018642740441,15.905578776166829,1
433 | 18.86427500998614,14.560556742812839,0
434 | 16.05372998589505,14.014491498703137,0
435 | 17.471035740270942,14.17497059681543,0
436 | 13.33231004072956,16.802118963664896,1
437 | 15.189014878976636,13.546724024042373,0
438 | 16.750396410698425,13.94346670756168,0
439 | 21.041911436727446,16.952044428215785,0
440 | 19.603070770006504,14.63896453933206,0
441 | 18.64443381956309,14.699483436776383,0
442 | 17.49354117772193,15.666688221906233,0
443 | 18.764093677219087,15.314370454946863,0
444 | 12.706988763358392,15.432767356941639,1
445 | 17.645810016355284,15.060690302365023,0
446 | 13.2365551351064,15.95021286849193,1
447 | 16.34939240866287,15.026479572446535,0
448 | 18.622256466489436,14.72385030790165,0
449 | 11.80679308841145,16.552412394573306,1
450 | 16.381221385806253,13.480319845030333,0
451 | 16.81426231824213,15.022155254944622,0
452 | 13.051652511873781,15.966934573753429,1
453 | 19.32958814573156,13.704814887560616,0
454 | 18.573300338958784,15.2567028605504,0
455 | 13.70438429458472,15.65375606466674,1
456 | 19.06677664788432,14.553902623578699,0
457 | 20.11087819016459,15.419250819942349,0
458 | 13.312314022204099,16.042950770543662,1
459 | 15.267901468554765,14.339433686218646,0
460 | 12.322364986090497,15.805357406768652,1
461 | 17.7627437619758,12.784182302029283,0
462 | 21.44477299179926,15.59553089190723,0
463 | 11.883861150990704,15.368951621571387,1
464 | 17.13527260175028,13.833003245043253,0
465 | 10.600758183839051,15.444195012219813,1
466 | 12.237329856692552,15.575098807763634,1
467 | 11.05865159900279,15.079061470399298,1
468 | 18.338410646826986,15.197936562287493,0
469 | 21.913195048151998,17.03477671122675,0
470 | 12.1296436005509,16.347782900246717,1
471 | 16.764421391747476,15.720091641671356,0
472 | 20.75267724337715,14.034450894515501,0
473 | 10.457190577025921,15.047817762144154,1
474 | 20.68203234632233,16.70302701867127,0
475 | 16.442515030103827,15.055439320481932,0
476 | 16.87783002172947,15.011763906346482,0
477 | 18.65339876603141,15.622080315424625,0
478 | 10.41491475507678,17.15786540145053,1
479 | 12.668330962046475,14.47035201917037,1
480 | 11.418463959483368,15.542410073008433,1
481 | 18.492241285474744,16.182410731592213,0
482 | 11.107131586068311,15.579279512451823,1
483 | 13.49552065849294,12.58653454714702,0
484 | 13.98345590036196,16.855708493188526,1
485 | 9.81940702188737,14.170716167194424,1
486 | 12.359275176430232,14.778582747104174,1
487 | 12.369684722374624,14.897802289597204,1
488 | 18.33064576800444,14.89621076643753,0
489 | 12.28417556591357,16.986909780641223,1
490 | 15.641147624634325,14.681282916914029,0
491 | 12.827212158851756,16.270605018643725,1
492 | 13.007123615252713,14.924493515837906,1
493 | 13.865446052872075,16.3647437764788,1
494 | 12.395053914467642,14.534362602637495,1
495 | 13.144535646674044,17.474108654027912,1
496 | 9.288591399960648,14.48662101788992,1
497 | 17.266821566365607,15.060062306767389,0
498 | 14.838455240771333,14.24298261711311,0
499 | 13.77333612100724,17.8183720967176,1
500 | 12.58689736495093,17.286317076153967,1
501 | 17.772818129938,14.460701352781502,0
502 | 12.548705129094943,16.00263752100939,1
503 | 11.64431609691061,17.382675238522943,1
504 | 12.986956583205806,16.120919701099048,1
505 | 12.395356572299129,15.591868603289372,1
506 | 9.184053015357783,15.482381376190803,1
507 | 15.335860201713611,14.637535126039356,0
508 | 11.727884530109087,17.50763805808851,1
509 | 11.50837188221322,14.851420131159514,1
510 | 13.323391916979826,15.287646991786172,1
511 | 17.365100146663956,13.842061789261844,0
512 | 17.104489847083432,16.300385965577746,0
513 | 15.781718705143454,13.774395955054231,0
514 | 12.447795078708054,15.626333090078306,1
515 | 18.943186260449323,14.858508367758489,0
516 | 16.347292064968038,13.583497493742083,0
517 | 12.708713506697938,16.99660197383005,1
518 | 19.799296763890503,15.690688686955003,0
519 | 19.300751918601804,15.142043032867189,0
520 | 19.735025493372063,14.971908224510102,0
521 | 9.458000736284971,14.840069043511377,1
522 | 18.475696330885675,15.494182686680682,0
523 | 7.173775709517747,14.050738714851667,1
524 | 19.642612506959274,13.759451420964059,0
525 | 11.243539454022915,13.260053968329192,1
526 | 19.083616913255092,14.650109785175042,0
527 | 13.154559180633179,16.567985021970067,1
528 | 15.625429422917405,14.093811014172415,0
529 | 21.081819845021823,12.848369775457039,0
530 | 13.415887615860793,15.045303071715608,1
531 | 11.918649683006564,16.789217430092048,1
532 | 11.725745981292022,16.35646941110366,1
533 | 17.146770072388907,15.434645177369239,0
534 | 10.538796467481212,15.127259072334581,1
535 | 18.324594696931648,16.152775399260747,0
536 | 10.482285470755713,14.150924132414055,1
537 | 18.500619421262172,13.39039009589563,0
538 | 13.279411373785573,16.50376619869269,1
539 | 19.64564188609051,15.396452846571739,0
540 | 16.96674719386442,15.08030589616816,0
541 | 18.979305218878444,14.29973920260517,0
542 | 15.112122307072573,13.07446471538547,0
543 | 14.751821049134191,13.618971652457363,0
544 | 13.637850603254845,15.972522044543647,1
545 | 12.718947714961722,16.67326580819552,1
546 | 16.998942593218544,15.296527737854872,0
547 | 18.825336067294185,14.52853246969567,0
548 | 15.781003277293117,13.804706521043379,0
549 | 14.524818482064568,13.0780426542946,0
550 | 13.194235899727202,16.111820781829515,1
551 | 9.683290590139913,12.884304767706752,1
552 | 19.54664365487261,15.440728710187175,0
553 | 15.329026457608197,14.318889517581807,0
554 | 11.21196323979997,15.943951910060367,1
555 | 17.645318150916655,15.503803342738935,0
556 | 12.194436454676218,16.029818715440452,1
557 | 12.551763770185097,14.393483186546707,1
558 | 13.711589393759684,12.028455888213895,0
559 | 15.532333540023792,13.661101485372276,0
560 | 13.549130481649776,16.18790429903301,1
561 | 13.648813263062621,15.206589070507396,1
562 | 11.236968988863916,14.536448582915678,1
563 | 21.121171095889313,15.92241029991504,0
564 | 15.651218350065557,14.037471544847804,0
565 | 12.269897278706951,15.814934355667555,1
566 | 18.369173542644823,14.774546972705675,0
567 | 9.416004588779217,15.197093680772864,1
568 | 18.040324158781026,14.888753161140915,0
569 | 11.202683117018324,12.82026894518589,1
570 | 18.78053270332465,14.787502470681815,0
571 | 13.017866992330433,15.174147715299652,1
572 | 19.97440902355252,15.813854772228215,0
573 | 17.000977314193122,15.36002718696666,0
574 | 16.60350783403471,15.280159401643049,0
575 | 17.421718026973505,14.623134007039859,0
576 | 16.98152104499465,15.480735483587116,0
577 | 12.849925562331114,16.2802074196233,1
578 | 20.926834327299456,15.481165812997993,0
579 | 13.556182691248914,15.881964268343994,1
580 | 18.886042190642705,15.187032401864993,0
581 | 9.961711735389173,18.006561398690426,1
582 | 15.602411920694907,14.479490988251037,0
583 | 14.790194245615378,13.678867188716895,0
584 | 15.141575023767057,14.52263894093524,0
585 | 10.483240600954229,15.886555758287336,1
586 | 18.176358775727216,15.147352490379555,0
587 | 12.649835573300813,15.105216857734183,1
588 | 10.634630982243714,15.581838776421566,1
589 | 12.044334464351454,16.10312943348829,1
590 | 10.571884965622713,13.87791106773222,1
591 | 17.203268607129278,14.778894919488264,0
592 | 13.393816044114581,16.50580513333357,1
593 | 12.774112014300524,15.28488429195083,1
594 | 17.43426368501733,13.681192865439156,0
595 | 13.094135729896127,15.029113287353988,1
596 | 17.55264650387597,16.32670624848141,0
597 | 13.687212777001049,15.453382342231361,1
598 | 15.60663934881399,13.900064047056677,0
599 | 18.0388216226442,15.489644386109168,0
600 | 7.86051922516636,14.472112429527677,1
601 | 16.051207696403747,13.827512053895601,0
602 | 11.421458808045896,15.803758429852863,1
603 | 16.647693183026654,15.129044502868002,0
604 | 13.819634887605332,16.204055083151957,1
605 | 21.235782454339354,14.802163248271146,0
606 | 16.61415475599939,15.857747012470785,0
607 | 10.9078130632694,16.36285856030563,1
608 | 18.402364986184423,15.051070658527305,0
609 | 12.704175980218263,16.728042328073073,1
610 | 16.0484528830578,14.711858194675973,0
611 | 15.564363532472115,14.113784176895548,0
612 | 12.139409793852627,15.912835366681808,1
613 | 19.66235758212293,15.65939540563707,0
614 | 13.362581773475483,17.496798713472746,1
615 | 13.37721698773687,14.9135336370414,1
616 | 16.167946450331645,14.653626451393245,0
617 | 19.306598019550698,15.534498883773761,0
618 | 18.59871776504004,15.765694609460871,0
619 | 9.157860223656074,16.403071663798904,1
620 | 16.742108702478486,14.433290457382855,0
621 | 16.67557051517421,14.608579150433599,0
622 | 9.766264142127914,14.27245252733543,1
623 | 12.17324544445186,15.49294290406206,1
624 | 11.460837180274233,17.22953415715291,1
625 | 17.073419444978565,14.5451440907416,0
626 | 16.07537950693971,12.76963432151663,0
627 | 23.14165520241016,12.521542989386079,0
628 | 16.76315898884725,15.530740959272965,0
629 | 18.018659376801182,15.481336467719988,0
630 | 11.887130851761297,16.0329880879787,1
631 | 12.180485357238483,16.700236109580793,1
632 | 13.921343297394232,16.1823645155443,1
633 | 18.144494263083022,15.830377807509494,0
634 | 20.811654526611576,16.68622234716186,0
635 | 13.24414571982024,15.821922574930731,1
636 | 7.261440154315351,16.817114396887195,1
637 | 20.093510948754087,13.487491959756138,0
638 | 12.366958094494054,16.462026583180478,1
639 | 16.834673187401126,14.405135672422741,0
640 | 10.436034747980546,17.136370120425983,1
641 | 14.633203156338375,13.589480323084354,0
642 | 10.23501060119722,15.759644284582608,1
643 | 13.835587564559187,16.769396006938713,1
644 | 18.664729326937884,16.03205828622839,0
645 | 13.208281915568406,15.043639218454011,1
646 | 10.465873110925639,15.65919519074086,1
647 | 17.785091372581213,14.214052600910005,0
648 | 13.200481711951886,16.01388699642621,1
649 | 14.574080779489705,13.466229415460397,0
650 | 12.687182342095753,15.450825340620485,1
651 | 10.925742457227667,15.64075952011113,1
652 | 14.827889188966248,14.077591953474336,0
653 | 15.14042152160118,13.969676113763821,0
654 | 13.097290185804091,15.992210209470004,1
655 | 9.637436986300544,16.224037227975693,1
656 | 13.83778155810823,15.554725432080755,1
657 | 12.721331179612164,16.14153395906408,1
658 | 17.387617672730585,14.395172058202979,0
659 | 15.671296065672966,14.476975161856686,0
660 | 17.534395297398536,15.425934499842729,0
661 | 20.664858417616376,15.815321065055086,0
662 | 17.17043212136784,15.322435565561884,0
663 | 19.804332739048398,15.228331354949827,0
664 | 17.19607327144225,14.34311146557389,0
665 | 16.580394153013746,16.07951290714808,0
666 | 14.889723761227064,13.76649358083596,0
667 | 12.149792657535588,15.046250250546581,1
668 | 15.913856430704062,14.490914654286605,0
669 | 12.325277338346071,16.442061844290578,1
670 | 16.87550716770515,14.989862094804039,0
671 | 12.33954276744387,17.31818984583575,1
672 | 12.20093351546112,15.513923957112736,1
673 | 12.87075972118794,15.566289109110265,1
674 | 10.237703526581884,14.161555700133972,1
675 | 17.07729910479725,14.822878808766024,0
676 | 19.988127155650453,14.348443731098877,0
677 | 11.444145192684164,15.859786842097517,1
678 | 12.999045447492156,16.44606759083006,1
679 | 9.859831054954483,16.805183483380393,1
680 | 15.008173091880888,11.85168853301277,0
681 | 9.918263375320668,15.753669569686098,1
682 | 12.634373501814526,14.578651418907437,1
683 | 16.764284692422237,14.494585800785933,0
684 | 13.930559597752884,12.670849072400523,0
685 | 23.79687046219037,13.973845031035557,0
686 | 18.012249891850097,15.92355090488934,0
687 | 17.558106176645005,15.540197187031163,0
688 | 13.981157512612484,15.901889559149547,1
689 | 11.412016537446963,16.157835415501843,1
690 | 15.874439985437476,14.565623259460372,0
691 | 10.058538973985623,15.158026324986075,1
692 | 17.59349800892382,15.215404935128324,0
693 | 16.976105520605426,15.007941416732976,0
694 | 19.928603946253556,15.314306784635502,0
695 | 16.177625213527378,13.563560088617182,0
696 | 16.53505398052733,14.862520616812544,0
697 | 13.17378324312503,14.76179502320765,1
698 | 15.367155931932738,14.009871552719469,0
699 | 16.137904823402394,14.09156499612537,0
700 | 11.312563113731457,16.60396776565274,1
701 | 16.51604250522633,14.039426219519232,0
702 | 16.64083049322764,13.466644795892117,0
703 | 17.268416693581006,14.284441479726805,0
704 | 12.639096143070562,16.348025528567867,1
705 | 20.598552716794174,14.275491235032888,0
706 | 16.823629107755043,13.772517772692092,0
707 | 11.818081804791898,16.729134034423232,1
708 | 21.24515486519156,15.522367945511759,0
709 | 13.711593553058625,15.95699813906441,1
710 | 17.983541578801553,14.546878599368613,0
711 | 18.344583904004335,15.54432216327269,0
712 | 14.227898940807819,13.50167027994571,0
713 | 14.55600907646743,13.605663374123138,0
714 | 11.621448665439656,16.32634472757619,1
715 | 18.589112530941424,14.625145554369624,0
716 | 16.841053157633592,14.532974921111435,0
717 | 9.771423092647852,16.7545282172312,1
718 | 9.85753503848081,14.518942445412778,1
719 | 10.350823440614423,16.642782162624915,1
720 | 10.20359373171614,14.960286300104439,1
721 | 13.834197491120374,15.828899280249098,1
722 |
--------------------------------------------------------------------------------
/images/attention1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/attention1.jpg
--------------------------------------------------------------------------------
/images/attention2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/attention2.jpg
--------------------------------------------------------------------------------
/images/batchnorm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/batchnorm.png
--------------------------------------------------------------------------------
/images/birnn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/birnn.png
--------------------------------------------------------------------------------
/images/char_embeddings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/char_embeddings.png
--------------------------------------------------------------------------------
/images/cnn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn.png
--------------------------------------------------------------------------------
/images/cnn_cv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn_cv.png
--------------------------------------------------------------------------------
/images/cnn_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn_text.png
--------------------------------------------------------------------------------
/images/cnn_text1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn_text1.png
--------------------------------------------------------------------------------
/images/cnn_text2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn_text2.png
--------------------------------------------------------------------------------
/images/cnn_text3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/cnn_text3.png
--------------------------------------------------------------------------------
/images/colab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/colab.png
--------------------------------------------------------------------------------
/images/commit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/commit.png
--------------------------------------------------------------------------------
/images/conditioned_rnn1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/conditioned_rnn1.png
--------------------------------------------------------------------------------
/images/conditioned_rnn2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/conditioned_rnn2.png
--------------------------------------------------------------------------------
/images/conv.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/conv.gif
--------------------------------------------------------------------------------
/images/copy_to_drive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/copy_to_drive.png
--------------------------------------------------------------------------------
/images/download_ipynb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/download_ipynb.png
--------------------------------------------------------------------------------
/images/dropout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/dropout.png
--------------------------------------------------------------------------------
/images/dtree.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/dtree.jpg
--------------------------------------------------------------------------------
/images/forest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/forest.png
--------------------------------------------------------------------------------
/images/gates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/gates.png
--------------------------------------------------------------------------------
/images/layernorm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/layernorm.png
--------------------------------------------------------------------------------
/images/linear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/linear.png
--------------------------------------------------------------------------------
/images/logistic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/logistic.jpg
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/logo.png
--------------------------------------------------------------------------------
/images/matrix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/matrix.png
--------------------------------------------------------------------------------
/images/metrics.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/metrics.jpg
--------------------------------------------------------------------------------
/images/mlp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/mlp.png
--------------------------------------------------------------------------------
/images/models1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/models1.png
--------------------------------------------------------------------------------
/images/models2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/models2.png
--------------------------------------------------------------------------------
/images/numpy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/numpy.png
--------------------------------------------------------------------------------
/images/nutshell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/nutshell.png
--------------------------------------------------------------------------------
/images/pandas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/pandas.png
--------------------------------------------------------------------------------
/images/pool.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/pool.jpeg
--------------------------------------------------------------------------------
/images/python.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/python.png
--------------------------------------------------------------------------------
/images/pytorch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/pytorch.png
--------------------------------------------------------------------------------
/images/rnn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/rnn.png
--------------------------------------------------------------------------------
/images/rnn2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/rnn2.png
--------------------------------------------------------------------------------
/images/seq2seq.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/seq2seq.jpeg
--------------------------------------------------------------------------------
/images/skipgram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/skipgram.png
--------------------------------------------------------------------------------
/images/tensorboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/tensorboard.png
--------------------------------------------------------------------------------
/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/datasciencescoop/practicalAI/974d7f66de27867f888f270748c27d5e575e5039/images/upload.png
--------------------------------------------------------------------------------
/notebooks/00_Notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "00_Notebooks",
7 | "version": "0.3.2",
8 | "provenance": [],
9 | "collapsed_sections": [],
10 | "toc_visible": true
11 | },
12 | "kernelspec": {
13 | "name": "python3",
14 | "display_name": "Python 3"
15 | }
16 | },
17 | "cells": [
18 | {
19 | "metadata": {
20 | "id": "bOChJSNXtC9g",
21 | "colab_type": "text"
22 | },
23 | "cell_type": "markdown",
24 | "source": [
25 | "# Notebook Basics"
26 | ]
27 | },
28 | {
29 | "metadata": {
30 | "id": "rSXwaU-ptNG6",
31 | "colab_type": "text"
32 | },
33 | "cell_type": "markdown",
34 | "source": [
35 | "
\n",
36 | "\n",
37 | "Welcome to the very first lesson of practicalAI. In this lesson we will learn how to work with the notebook and saving it. If you already know how to use notebooks, feel free to skip this lesson.\n",
38 | "\n",
39 | "
\n",
40 | "\n",
41 | "**Note**: To run the code in this notebook, follow these steps:\n",
42 | "1. Sign into your Google account.\n",
43 | "2. Click the **COPY TO DRIVE** button on the toolbar. This will open the notebook on a new tab.\n",
44 | "\n",
45 | "
\n",
46 | "\n",
47 | "3. Rename this new notebook by removing the **Copy of** part in the title.\n",
48 | "4. Run the code, make changes, etc. and it's all automatically saved to you personal Google Drive.\n",
49 | "\n"
50 | ]
51 | },
52 | {
53 | "metadata": {
54 | "id": "cOEaLCZAu4JQ",
55 | "colab_type": "text"
56 | },
57 | "cell_type": "markdown",
58 | "source": [
59 | "# Types of cells"
60 | ]
61 | },
62 | {
63 | "metadata": {
64 | "id": "WcOgqq5xvtMn",
65 | "colab_type": "text"
66 | },
67 | "cell_type": "markdown",
68 | "source": [
69 | "Notebooks are a great visual way of programming. We will use these notebooks to code in Python and learn the basics of machine learning. First, you need to know that notebooks are made up of cells. Each cell can either be a **code cell** or a **text cell**. \n",
70 | "\n",
71 | "* **text cells**: used for headers and paragraph text. \n",
72 | "* **code cells**: used for holding code.\n",
73 | "\n",
74 | "\n"
75 | ]
76 | },
77 | {
78 | "metadata": {
79 | "id": "tBVFofpLutnn",
80 | "colab_type": "text"
81 | },
82 | "cell_type": "markdown",
83 | "source": [
84 | "# Creating cells\n",
85 | "\n",
86 | "First, let's create a text cell. To create a cell at a particular location, just click on the spot and create a text cell by clicking on the **➕TEXT** below the *View* button up top. Once you made the cell, click on it and type the following inside it:\n",
87 | "\n",
88 | "\n",
89 | "```\n",
90 | "### This is a header\n",
91 | "Hello world!\n",
92 | "```"
93 | ]
94 | },
95 | {
96 | "metadata": {
97 | "id": "iXYgZpgpYS3N",
98 | "colab_type": "text"
99 | },
100 | "cell_type": "markdown",
101 | "source": [
102 | "# Running cells\n",
103 | "Once you type inside the cell, press the **SHIFT** and **ENTER** together to run the cell."
104 | ]
105 | },
106 | {
107 | "metadata": {
108 | "id": "WKTbiBuvYexD",
109 | "colab_type": "text"
110 | },
111 | "cell_type": "markdown",
112 | "source": [
113 | "# Editing cells\n",
114 | "To edit a cell, double click it and you should be able to replace what you've typed in there."
115 | ]
116 | },
117 | {
118 | "metadata": {
119 | "id": "Jv0ZSuhNYVIU",
120 | "colab_type": "text"
121 | },
122 | "cell_type": "markdown",
123 | "source": [
124 | "# Moving cells\n",
125 | "Once you create the cell, you can move it with the ⬆️**CELL** and ⬇️**CELL** buttons above. "
126 | ]
127 | },
128 | {
129 | "metadata": {
130 | "id": "B_VGiYf8YXiU",
131 | "colab_type": "text"
132 | },
133 | "cell_type": "markdown",
134 | "source": [
135 | "# Deleting cells\n",
136 | "You can delete the cell by clicking on the cell and pressing the button with three vertical dots on the top right corner of the cell. Click **Delete cell**."
137 | ]
138 | },
139 | {
140 | "metadata": {
141 | "id": "hxl7Fk8LVQmR",
142 | "colab_type": "text"
143 | },
144 | "cell_type": "markdown",
145 | "source": [
146 | "# Creating a code cell\n",
147 | "Now let's take the same steps as above to create, edit and delete a code cell. You can create a code cell by clicking on the ➕CODE below the *File* menu at the top. Once you have created the cell, click on it and type the following inside it:\n",
148 | "\n",
149 | "```\n",
150 | "print (\"hello world!\")\n",
151 | "```\n",
152 | "\n",
153 | "⏰ - It may take a few seconds when you run your first code cell."
154 | ]
155 | },
156 | {
157 | "metadata": {
158 | "id": "DfGf9KmQ3DJM",
159 | "colab_type": "code",
160 | "outputId": "dd9665df-ac81-4c0d-ef72-5ca2099e53f7",
161 | "colab": {
162 | "base_uri": "https://localhost:8080/",
163 | "height": 34
164 | }
165 | },
166 | "cell_type": "code",
167 | "source": [
168 | "print (\"hello world!\")"
169 | ],
170 | "execution_count": 0,
171 | "outputs": [
172 | {
173 | "output_type": "stream",
174 | "text": [
175 | "hello world!\n"
176 | ],
177 | "name": "stdout"
178 | }
179 | ]
180 | },
181 | {
182 | "metadata": {
183 | "id": "GURvB6XzWN12",
184 | "colab_type": "text"
185 | },
186 | "cell_type": "markdown",
187 | "source": [
188 | "**Note:** These Google colab notebooks timeout if you are idle for more than ~30 minutes which means you'll need to run all your code cells again. "
189 | ]
190 | },
191 | {
192 | "metadata": {
193 | "id": "VoMq0eFRvugb",
194 | "colab_type": "text"
195 | },
196 | "cell_type": "markdown",
197 | "source": [
198 | "# Saving the notebook"
199 | ]
200 | },
201 | {
202 | "metadata": {
203 | "id": "nPWxXt5Hv7Ga",
204 | "colab_type": "text"
205 | },
206 | "cell_type": "markdown",
207 | "source": [
208 | "Go to *File* menu and then click on **Save a copy in Drive**. Now you will have your own copy of each notebook in your own Google Drive. If you have a [Github](https://github.com/), you can explore saving it there or even downloading it as a .ipynb or .py file."
209 | ]
210 | }
211 | ]
212 | }
213 |
--------------------------------------------------------------------------------
/notebooks/01_Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "01_Python",
7 | "version": "0.3.2",
8 | "provenance": [],
9 | "collapsed_sections": [],
10 | "toc_visible": true
11 | },
12 | "kernelspec": {
13 | "name": "python3",
14 | "display_name": "Python 3"
15 | }
16 | },
17 | "cells": [
18 | {
19 | "metadata": {
20 | "id": "bOChJSNXtC9g",
21 | "colab_type": "text"
22 | },
23 | "cell_type": "markdown",
24 | "source": [
25 | "# Introduction to Python"
26 | ]
27 | },
28 | {
29 | "metadata": {
30 | "id": "OLIxEDq6VhvZ",
31 | "colab_type": "text"
32 | },
33 | "cell_type": "markdown",
34 | "source": [
35 | "
\n",
36 | "\n",
37 | "In this lesson we will learn the basics of the Python programming language (version 3). We won't learn everything about Python but enough to do some basic machine learning.\n",
38 | "\n",
39 | "
\n",
40 | "\n",
41 | "\n"
42 | ]
43 | },
44 | {
45 | "metadata": {
46 | "id": "VoMq0eFRvugb",
47 | "colab_type": "text"
48 | },
49 | "cell_type": "markdown",
50 | "source": [
51 | "# Variables"
52 | ]
53 | },
54 | {
55 | "metadata": {
56 | "id": "qWro5T5qTJJL",
57 | "colab_type": "text"
58 | },
59 | "cell_type": "markdown",
60 | "source": [
61 | "Variables are objects in Python that can hold anything with numbers or text. Let's look at how to create some variables."
62 | ]
63 | },
64 | {
65 | "metadata": {
66 | "id": "0-dXQiLlTIgz",
67 | "colab_type": "code",
68 | "outputId": "38d1f8a5-b067-416b-b042-38a373624a8b",
69 | "colab": {
70 | "base_uri": "https://localhost:8080/",
71 | "height": 34
72 | }
73 | },
74 | "cell_type": "code",
75 | "source": [
76 | "# Numerical example\n",
77 | "x = 5\n",
78 | "print (x)"
79 | ],
80 | "execution_count": 0,
81 | "outputs": [
82 | {
83 | "output_type": "stream",
84 | "text": [
85 | "5\n"
86 | ],
87 | "name": "stdout"
88 | }
89 | ]
90 | },
91 | {
92 | "metadata": {
93 | "id": "5Ym0owFxTkjo",
94 | "colab_type": "code",
95 | "outputId": "72c2781a-4435-4c21-b15a-4c070d47bd86",
96 | "colab": {
97 | "base_uri": "https://localhost:8080/",
98 | "height": 34
99 | }
100 | },
101 | "cell_type": "code",
102 | "source": [
103 | "# Text example\n",
104 | "x = \"hello\"\n",
105 | "print (x)"
106 | ],
107 | "execution_count": 0,
108 | "outputs": [
109 | {
110 | "output_type": "stream",
111 | "text": [
112 | "hello\n"
113 | ],
114 | "name": "stdout"
115 | }
116 | ]
117 | },
118 | {
119 | "metadata": {
120 | "id": "1a4ZhMV1T1-0",
121 | "colab_type": "code",
122 | "outputId": "0817e041-5f79-46d8-84cc-ee4aaea0eba2",
123 | "colab": {
124 | "base_uri": "https://localhost:8080/",
125 | "height": 34
126 | }
127 | },
128 | "cell_type": "code",
129 | "source": [
130 | "# Variables can be used with each other\n",
131 | "a = 1\n",
132 | "b = 2\n",
133 | "c = a + b\n",
134 | "print (c)"
135 | ],
136 | "execution_count": 0,
137 | "outputs": [
138 | {
139 | "output_type": "stream",
140 | "text": [
141 | "3\n"
142 | ],
143 | "name": "stdout"
144 | }
145 | ]
146 | },
147 | {
148 | "metadata": {
149 | "id": "nbKV4aTdUC1_",
150 | "colab_type": "text"
151 | },
152 | "cell_type": "markdown",
153 | "source": [
154 | "Variables can come in lots of different types. Even within numerical variables, you can have integers (int), floats (float), etc. All text based variables are of type string (str). We can see what type a variable is by printing its type."
155 | ]
156 | },
157 | {
158 | "metadata": {
159 | "id": "c3NJmfO4Uc6V",
160 | "colab_type": "code",
161 | "outputId": "04b91fa4-51af-48f4-e9ac-591b5bf3e714",
162 | "colab": {
163 | "base_uri": "https://localhost:8080/",
164 | "height": 153
165 | }
166 | },
167 | "cell_type": "code",
168 | "source": [
169 | "# int variable\n",
170 | "x = 5\n",
171 | "print (x)\n",
172 | "print (type(x))\n",
173 | "\n",
174 | "# float variable\n",
175 | "x = 5.0\n",
176 | "print (x)\n",
177 | "print (type(x))\n",
178 | "\n",
179 | "# text variable\n",
180 | "x = \"5\" \n",
181 | "print (x)\n",
182 | "print (type(x))\n",
183 | "\n",
184 | "# boolean variable\n",
185 | "x = True\n",
186 | "print (x)\n",
187 | "print (type(x))"
188 | ],
189 | "execution_count": 0,
190 | "outputs": [
191 | {
192 | "output_type": "stream",
193 | "text": [
194 | "5\n",
195 | "\n",
196 | "5.0\n",
197 | "\n",
198 | "5\n",
199 | "\n",
200 | "True\n",
201 | "\n"
202 | ],
203 | "name": "stdout"
204 | }
205 | ]
206 | },
207 | {
208 | "metadata": {
209 | "id": "6HPtavfdU8Ut",
210 | "colab_type": "text"
211 | },
212 | "cell_type": "markdown",
213 | "source": [
214 | "It's good practice to know what types your variables are. When you want to use numerical operations on them, they need to be compatible. "
215 | ]
216 | },
217 | {
218 | "metadata": {
219 | "id": "8pr1-i7IVD-h",
220 | "colab_type": "code",
221 | "outputId": "c2bce48d-b69f-4aab-95c1-9e588f67a6c3",
222 | "colab": {
223 | "base_uri": "https://localhost:8080/",
224 | "height": 51
225 | }
226 | },
227 | "cell_type": "code",
228 | "source": [
229 | "# int variables\n",
230 | "a = 5\n",
231 | "b = 3\n",
232 | "print (a + b)\n",
233 | "\n",
234 | "# string variables\n",
235 | "a = \"5\"\n",
236 | "b = \"3\"\n",
237 | "print (a + b)"
238 | ],
239 | "execution_count": 0,
240 | "outputs": [
241 | {
242 | "output_type": "stream",
243 | "text": [
244 | "8\n",
245 | "53\n"
246 | ],
247 | "name": "stdout"
248 | }
249 | ]
250 | },
251 | {
252 | "metadata": {
253 | "id": "q4R_UF6PVw4V",
254 | "colab_type": "text"
255 | },
256 | "cell_type": "markdown",
257 | "source": [
258 | "# Lists"
259 | ]
260 | },
261 | {
262 | "metadata": {
263 | "id": "LvGsQBj4VjMl",
264 | "colab_type": "text"
265 | },
266 | "cell_type": "markdown",
267 | "source": [
268 | "Lists are objects in Python that can hold a ordered sequence of numbers **and** text."
269 | ]
270 | },
271 | {
272 | "metadata": {
273 | "id": "9iPESkq9VvlX",
274 | "colab_type": "code",
275 | "outputId": "67dfbe9f-d4cb-4a62-a812-7c5c8a01c2fa",
276 | "colab": {
277 | "base_uri": "https://localhost:8080/",
278 | "height": 34
279 | }
280 | },
281 | "cell_type": "code",
282 | "source": [
283 | "# Creating a list\n",
284 | "list_x = [3, \"hello\", 1]\n",
285 | "print (list_x)"
286 | ],
287 | "execution_count": 0,
288 | "outputs": [
289 | {
290 | "output_type": "stream",
291 | "text": [
292 | "[3, 'hello', 1]\n"
293 | ],
294 | "name": "stdout"
295 | }
296 | ]
297 | },
298 | {
299 | "metadata": {
300 | "id": "0xC6WvuwbGDg",
301 | "colab_type": "text"
302 | },
303 | "cell_type": "markdown",
304 | "source": [
305 | ""
306 | ]
307 | },
308 | {
309 | "metadata": {
310 | "id": "7lbajc-zV515",
311 | "colab_type": "code",
312 | "outputId": "4345bbe0-0f0c-4f84-bcf2-a76130899f34",
313 | "colab": {
314 | "base_uri": "https://localhost:8080/",
315 | "height": 34
316 | }
317 | },
318 | "cell_type": "code",
319 | "source": [
320 | "# Adding to a list\n",
321 | "list_x.append(7)\n",
322 | "print (list_x)"
323 | ],
324 | "execution_count": 0,
325 | "outputs": [
326 | {
327 | "output_type": "stream",
328 | "text": [
329 | "[3, 'hello', 1, 7]\n"
330 | ],
331 | "name": "stdout"
332 | }
333 | ]
334 | },
335 | {
336 | "metadata": {
337 | "id": "W0xpIryJWCN9",
338 | "colab_type": "code",
339 | "outputId": "a7676615-aff1-402f-d41f-81d004728f94",
340 | "colab": {
341 | "base_uri": "https://localhost:8080/",
342 | "height": 102
343 | }
344 | },
345 | "cell_type": "code",
346 | "source": [
347 | "# Accessing items at specific location in a list\n",
348 | "print (\"list_x[0]: \", list_x[0])\n",
349 | "print (\"list_x[1]: \", list_x[1])\n",
350 | "print (\"list_x[2]: \", list_x[2])\n",
351 | "print (\"list_x[-1]: \", list_x[-1]) # the last item\n",
352 | "print (\"list_x[-2]: \", list_x[-2]) # the second to last item"
353 | ],
354 | "execution_count": 0,
355 | "outputs": [
356 | {
357 | "output_type": "stream",
358 | "text": [
359 | "list_x[0]: 3\n",
360 | "list_x[1]: hello\n",
361 | "list_x[2]: 1\n",
362 | "list_x[-1]: 7\n",
363 | "list_x[-2]: 1\n"
364 | ],
365 | "name": "stdout"
366 | }
367 | ]
368 | },
369 | {
370 | "metadata": {
371 | "id": "VSu_HNrnc1WK",
372 | "colab_type": "code",
373 | "outputId": "3c40cce2-9599-41aa-b01c-7c6f39329212",
374 | "colab": {
375 | "base_uri": "https://localhost:8080/",
376 | "height": 85
377 | }
378 | },
379 | "cell_type": "code",
380 | "source": [
381 | "# Slicing\n",
382 | "print (\"list_x[:]: \", list_x[:])\n",
383 | "print (\"list_x[2:]: \", list_x[2:])\n",
384 | "print (\"list_x[1:3]: \", list_x[1:3])\n",
385 | "print (\"list_x[:-1]: \", list_x[:-1])"
386 | ],
387 | "execution_count": 0,
388 | "outputs": [
389 | {
390 | "output_type": "stream",
391 | "text": [
392 | "list_x[:]: [3, 'hello', 1, 7]\n",
393 | "list_x[2:]: [1, 7]\n",
394 | "list_x[1:3]: ['hello', 1]\n",
395 | "list_x[:-1]: [3, 'hello', 1]\n"
396 | ],
397 | "name": "stdout"
398 | }
399 | ]
400 | },
401 | {
402 | "metadata": {
403 | "id": "dImY-hVzWxB4",
404 | "colab_type": "code",
405 | "outputId": "8394f232-aa11-4dbd-8580-70adb5adc807",
406 | "colab": {
407 | "base_uri": "https://localhost:8080/",
408 | "height": 34
409 | }
410 | },
411 | "cell_type": "code",
412 | "source": [
413 | "# Length of a list\n",
414 | "len(list_x)"
415 | ],
416 | "execution_count": 0,
417 | "outputs": [
418 | {
419 | "output_type": "execute_result",
420 | "data": {
421 | "text/plain": [
422 | "4"
423 | ]
424 | },
425 | "metadata": {
426 | "tags": []
427 | },
428 | "execution_count": 10
429 | }
430 | ]
431 | },
432 | {
433 | "metadata": {
434 | "id": "3-reXDniW_sm",
435 | "colab_type": "code",
436 | "outputId": "382d1a40-ad1a-49f7-f70f-2c2a02ffd88d",
437 | "colab": {
438 | "base_uri": "https://localhost:8080/",
439 | "height": 34
440 | }
441 | },
442 | "cell_type": "code",
443 | "source": [
444 | "# Replacing items in a list\n",
445 | "list_x[1] = \"hi\"\n",
446 | "print (list_x)"
447 | ],
448 | "execution_count": 0,
449 | "outputs": [
450 | {
451 | "output_type": "stream",
452 | "text": [
453 | "[3, 'hi', 1, 7]\n"
454 | ],
455 | "name": "stdout"
456 | }
457 | ]
458 | },
459 | {
460 | "metadata": {
461 | "id": "X8T5I3bjXJ0S",
462 | "colab_type": "code",
463 | "outputId": "1ede1c5c-c6ea-452f-b13d-ff9efd3d53b0",
464 | "colab": {
465 | "base_uri": "https://localhost:8080/",
466 | "height": 34
467 | }
468 | },
469 | "cell_type": "code",
470 | "source": [
471 | "# Combining lists\n",
472 | "list_y = [2.4, \"world\"]\n",
473 | "list_z = list_x + list_y\n",
474 | "print (list_z)"
475 | ],
476 | "execution_count": 0,
477 | "outputs": [
478 | {
479 | "output_type": "stream",
480 | "text": [
481 | "[3, 'hi', 1, 7, 2.4, 'world']\n"
482 | ],
483 | "name": "stdout"
484 | }
485 | ]
486 | },
487 | {
488 | "metadata": {
489 | "id": "ddpIO6LLVzh0",
490 | "colab_type": "text"
491 | },
492 | "cell_type": "markdown",
493 | "source": [
494 | "# Tuples"
495 | ]
496 | },
497 | {
498 | "metadata": {
499 | "id": "CAZblq7oXY3s",
500 | "colab_type": "text"
501 | },
502 | "cell_type": "markdown",
503 | "source": [
504 | "Tuples are also objects in Python that can hold data but you cannot replace their values (for this reason, tuples are called immutable, whereas lists are known as mutable)."
505 | ]
506 | },
507 | {
508 | "metadata": {
509 | "id": "G95lu8xWXY90",
510 | "colab_type": "code",
511 | "outputId": "c23250e5-534a-48e6-ed52-f034859f73c2",
512 | "colab": {
513 | "base_uri": "https://localhost:8080/",
514 | "height": 34
515 | }
516 | },
517 | "cell_type": "code",
518 | "source": [
519 | "# Creating a tuple\n",
520 | "tuple_x = (3.0, \"hello\")\n",
521 | "print (tuple_x)"
522 | ],
523 | "execution_count": 0,
524 | "outputs": [
525 | {
526 | "output_type": "stream",
527 | "text": [
528 | "(3.0, 'hello')\n"
529 | ],
530 | "name": "stdout"
531 | }
532 | ]
533 | },
534 | {
535 | "metadata": {
536 | "id": "kq23Bej1acAP",
537 | "colab_type": "code",
538 | "outputId": "34edfbff-dbc0-4385-a118-7f1bcc49e84f",
539 | "colab": {
540 | "base_uri": "https://localhost:8080/",
541 | "height": 34
542 | }
543 | },
544 | "cell_type": "code",
545 | "source": [
546 | "# Adding values to a tuple\n",
547 | "tuple_x = tuple_x + (5.6,)\n",
548 | "print (tuple_x)"
549 | ],
550 | "execution_count": 0,
551 | "outputs": [
552 | {
553 | "output_type": "stream",
554 | "text": [
555 | "(3.0, 'hello', 5.6)\n"
556 | ],
557 | "name": "stdout"
558 | }
559 | ]
560 | },
561 | {
562 | "metadata": {
563 | "id": "vyTmOc6BXkge",
564 | "colab_type": "code",
565 | "outputId": "dadeac9a-4bb4-43a3-ff40-e8ca6a05ba2c",
566 | "colab": {
567 | "base_uri": "https://localhost:8080/",
568 | "height": 164
569 | }
570 | },
571 | "cell_type": "code",
572 | "source": [
573 | "# Trying to change a tuples value (you can't)\n",
574 | "tuple_x[1] = \"world\""
575 | ],
576 | "execution_count": 0,
577 | "outputs": [
578 | {
579 | "output_type": "error",
580 | "ename": "TypeError",
581 | "evalue": "ignored",
582 | "traceback": [
583 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
584 | "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
585 | "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtuple_x\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"world\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
586 | "\u001b[0;31mTypeError\u001b[0m: 'tuple' object does not support item assignment"
587 | ]
588 | }
589 | ]
590 | },
591 | {
592 | "metadata": {
593 | "id": "UdlJHkwZV3Mz",
594 | "colab_type": "text"
595 | },
596 | "cell_type": "markdown",
597 | "source": [
598 | "# Dictionaries"
599 | ]
600 | },
601 | {
602 | "metadata": {
603 | "id": "azp3AoxYXS26",
604 | "colab_type": "text"
605 | },
606 | "cell_type": "markdown",
607 | "source": [
608 | "Dictionaries are Python objects that hold key-value pairs. In the example dictionary below, the keys are the \"name\" and \"eye_color\" variables. They each have a value associated with them. A dictionary cannot have two of the same keys. "
609 | ]
610 | },
611 | {
612 | "metadata": {
613 | "id": "pXhNLbzpXXSk",
614 | "colab_type": "code",
615 | "outputId": "e4bb80e5-4e7b-4cbb-daa6-77490ab25145",
616 | "colab": {
617 | "base_uri": "https://localhost:8080/",
618 | "height": 68
619 | }
620 | },
621 | "cell_type": "code",
622 | "source": [
623 | "# Creating a dictionary\n",
624 | "goku = {\"name\": \"Goku\",\n",
625 | " \"eye_color\": \"brown\"}\n",
626 | "print (goku)\n",
627 | "print (goku[\"name\"])\n",
628 | "print (goku[\"eye_color\"])\n"
629 | ],
630 | "execution_count": 0,
631 | "outputs": [
632 | {
633 | "output_type": "stream",
634 | "text": [
635 | "{'name': 'Goku', 'eye_color': 'brown'}\n",
636 | "Goku\n",
637 | "brown\n"
638 | ],
639 | "name": "stdout"
640 | }
641 | ]
642 | },
643 | {
644 | "metadata": {
645 | "id": "1HXtX8vQYjXa",
646 | "colab_type": "code",
647 | "outputId": "ad8d1a0f-d134-4c87-99c1-0f77140f2de0",
648 | "colab": {
649 | "base_uri": "https://localhost:8080/",
650 | "height": 34
651 | }
652 | },
653 | "cell_type": "code",
654 | "source": [
655 | "# Changing the value for a key\n",
656 | "goku[\"eye_color\"] = \"green\"\n",
657 | "print (goku)"
658 | ],
659 | "execution_count": 0,
660 | "outputs": [
661 | {
662 | "output_type": "stream",
663 | "text": [
664 | "{'name': 'Goku', 'eye_color': 'green'}\n"
665 | ],
666 | "name": "stdout"
667 | }
668 | ]
669 | },
670 | {
671 | "metadata": {
672 | "id": "qn33iB0MY5dT",
673 | "colab_type": "code",
674 | "outputId": "bd89033e-e307-4739-8c1d-f957c32385b5",
675 | "colab": {
676 | "base_uri": "https://localhost:8080/",
677 | "height": 34
678 | }
679 | },
680 | "cell_type": "code",
681 | "source": [
682 | "# Adding new key-value pairs\n",
683 | "goku[\"age\"] = 24\n",
684 | "print (goku)"
685 | ],
686 | "execution_count": 0,
687 | "outputs": [
688 | {
689 | "output_type": "stream",
690 | "text": [
691 | "{'name': 'Goku', 'eye_color': 'green', 'age': 24}\n"
692 | ],
693 | "name": "stdout"
694 | }
695 | ]
696 | },
697 | {
698 | "metadata": {
699 | "id": "g9EYmzMKa9YV",
700 | "colab_type": "code",
701 | "outputId": "4b9218b9-2f4d-4287-932a-caba430713aa",
702 | "colab": {
703 | "base_uri": "https://localhost:8080/",
704 | "height": 34
705 | }
706 | },
707 | "cell_type": "code",
708 | "source": [
709 | "# Length of a dictionary\n",
710 | "print (len(goku))"
711 | ],
712 | "execution_count": 0,
713 | "outputs": [
714 | {
715 | "output_type": "stream",
716 | "text": [
717 | "3\n"
718 | ],
719 | "name": "stdout"
720 | }
721 | ]
722 | },
723 | {
724 | "metadata": {
725 | "id": "B-DInx_Xo2vJ",
726 | "colab_type": "text"
727 | },
728 | "cell_type": "markdown",
729 | "source": [
730 | "# If statements"
731 | ]
732 | },
733 | {
734 | "metadata": {
735 | "id": "ZG_ICGRGo4tY",
736 | "colab_type": "text"
737 | },
738 | "cell_type": "markdown",
739 | "source": [
740 | "You can use `if` statements to conditionally do something."
741 | ]
742 | },
743 | {
744 | "metadata": {
745 | "id": "uob9lQuKo4Pg",
746 | "colab_type": "code",
747 | "outputId": "21d40476-ea6a-4149-f744-0119d0894d77",
748 | "colab": {
749 | "base_uri": "https://localhost:8080/",
750 | "height": 34
751 | }
752 | },
753 | "cell_type": "code",
754 | "source": [
755 | "# If statement\n",
756 | "x = 4\n",
757 | "if x < 1:\n",
758 | " score = \"low\"\n",
759 | "elif x <= 4:\n",
760 | " score = \"medium\"\n",
761 | "else:\n",
762 | " score = \"high\"\n",
763 | "print (score)"
764 | ],
765 | "execution_count": 0,
766 | "outputs": [
767 | {
768 | "output_type": "stream",
769 | "text": [
770 | "medium\n"
771 | ],
772 | "name": "stdout"
773 | }
774 | ]
775 | },
776 | {
777 | "metadata": {
778 | "id": "vwsQaZqIpfJ3",
779 | "colab_type": "code",
780 | "outputId": "1f190875-b910-4e54-a58a-d4230b7c8169",
781 | "colab": {
782 | "base_uri": "https://localhost:8080/",
783 | "height": 34
784 | }
785 | },
786 | "cell_type": "code",
787 | "source": [
788 | "# If statment with a boolean\n",
789 | "x = True\n",
790 | "if x:\n",
791 | " print (\"it worked\")"
792 | ],
793 | "execution_count": 0,
794 | "outputs": [
795 | {
796 | "output_type": "stream",
797 | "text": [
798 | "it worked\n"
799 | ],
800 | "name": "stdout"
801 | }
802 | ]
803 | },
804 | {
805 | "metadata": {
806 | "id": "sJ7NPGEKV6Ik",
807 | "colab_type": "text"
808 | },
809 | "cell_type": "markdown",
810 | "source": [
811 | "# Loops"
812 | ]
813 | },
814 | {
815 | "metadata": {
816 | "id": "YRVxhVCkn0vc",
817 | "colab_type": "text"
818 | },
819 | "cell_type": "markdown",
820 | "source": [
821 | "In Python, you can use `for` loop to iterate over the elements of a sequence such as a list or tuple, or use `while` loop to do something repeatedly as long as a condition holds."
822 | ]
823 | },
824 | {
825 | "metadata": {
826 | "id": "OB5PtyqAn8mj",
827 | "colab_type": "code",
828 | "outputId": "b4595670-99d4-473e-b299-bf8cf47f1d81",
829 | "colab": {
830 | "base_uri": "https://localhost:8080/",
831 | "height": 68
832 | }
833 | },
834 | "cell_type": "code",
835 | "source": [
836 | "# For loop\n",
837 | "x = 1\n",
838 | "for i in range(3): # goes from i=0 to i=2\n",
839 | " x += 1 # same as x = x + 1\n",
840 | " print (\"i={0}, x={1}\".format(i, x)) # printing with multiple variables"
841 | ],
842 | "execution_count": 0,
843 | "outputs": [
844 | {
845 | "output_type": "stream",
846 | "text": [
847 | "i=0, x=2\n",
848 | "i=1, x=3\n",
849 | "i=2, x=4\n"
850 | ],
851 | "name": "stdout"
852 | }
853 | ]
854 | },
855 | {
856 | "metadata": {
857 | "id": "6XyhCrFeoGj4",
858 | "colab_type": "code",
859 | "outputId": "2427ae1f-85f7-4888-f47f-8de1992a84c3",
860 | "colab": {
861 | "base_uri": "https://localhost:8080/",
862 | "height": 68
863 | }
864 | },
865 | "cell_type": "code",
866 | "source": [
867 | "# Loop through items in a list\n",
868 | "x = 1\n",
869 | "for i in [0, 1, 2]:\n",
870 | " x += 1\n",
871 | " print (\"i={0}, x={1}\".format(i, x))"
872 | ],
873 | "execution_count": 0,
874 | "outputs": [
875 | {
876 | "output_type": "stream",
877 | "text": [
878 | "i=0, x=2\n",
879 | "i=1, x=3\n",
880 | "i=2, x=4\n"
881 | ],
882 | "name": "stdout"
883 | }
884 | ]
885 | },
886 | {
887 | "metadata": {
888 | "id": "5Tf2x4okp3fH",
889 | "colab_type": "code",
890 | "outputId": "1ac41665-2f35-4c7d-e9f5-22614d3ba35c",
891 | "colab": {
892 | "base_uri": "https://localhost:8080/",
893 | "height": 68
894 | }
895 | },
896 | "cell_type": "code",
897 | "source": [
898 | "# While loop\n",
899 | "x = 3\n",
900 | "while x > 0:\n",
901 | " x -= 1 # same as x = x - 1\n",
902 | " print (x)"
903 | ],
904 | "execution_count": 0,
905 | "outputs": [
906 | {
907 | "output_type": "stream",
908 | "text": [
909 | "2\n",
910 | "1\n",
911 | "0\n"
912 | ],
913 | "name": "stdout"
914 | }
915 | ]
916 | },
917 | {
918 | "metadata": {
919 | "id": "gJw-EDO9WBL_",
920 | "colab_type": "text"
921 | },
922 | "cell_type": "markdown",
923 | "source": [
924 | "# Functions"
925 | ]
926 | },
927 | {
928 | "metadata": {
929 | "id": "hDIOUdWCqBwa",
930 | "colab_type": "text"
931 | },
932 | "cell_type": "markdown",
933 | "source": [
934 | "Functions are a way to modularize reusable pieces of code. "
935 | ]
936 | },
937 | {
938 | "metadata": {
939 | "id": "iin1ZXmMqA0y",
940 | "colab_type": "code",
941 | "outputId": "3bfae4a7-482b-4d43-8350-f8bb5e8a35ac",
942 | "colab": {
943 | "base_uri": "https://localhost:8080/",
944 | "height": 34
945 | }
946 | },
947 | "cell_type": "code",
948 | "source": [
949 | "# Create a function\n",
950 | "def add_two(x):\n",
951 | " x += 2\n",
952 | " return x\n",
953 | "\n",
954 | "# Use the function\n",
955 | "score = 0\n",
956 | "score = add_two(x=score)\n",
957 | "print (score)"
958 | ],
959 | "execution_count": 0,
960 | "outputs": [
961 | {
962 | "output_type": "stream",
963 | "text": [
964 | "2\n"
965 | ],
966 | "name": "stdout"
967 | }
968 | ]
969 | },
970 | {
971 | "metadata": {
972 | "id": "DC6x3DMrqlE3",
973 | "colab_type": "code",
974 | "outputId": "8965bfab-3e20-41ae-9fc1-f22a7d4f3333",
975 | "colab": {
976 | "base_uri": "https://localhost:8080/",
977 | "height": 34
978 | }
979 | },
980 | "cell_type": "code",
981 | "source": [
982 | "# Function with multiple inputs\n",
983 | "def join_name(first_name, last_name):\n",
984 | " joined_name = first_name + \" \" + last_name\n",
985 | " return joined_name\n",
986 | "\n",
987 | "# Use the function\n",
988 | "first_name = \"Goku\"\n",
989 | "last_name = \"Mohandas\"\n",
990 | "joined_name = join_name(first_name=first_name, last_name=last_name)\n",
991 | "print (joined_name)"
992 | ],
993 | "execution_count": 0,
994 | "outputs": [
995 | {
996 | "output_type": "stream",
997 | "text": [
998 | "Goku Mohandas\n"
999 | ],
1000 | "name": "stdout"
1001 | }
1002 | ]
1003 | },
1004 | {
1005 | "metadata": {
1006 | "id": "lBLa1n54WEd2",
1007 | "colab_type": "text"
1008 | },
1009 | "cell_type": "markdown",
1010 | "source": [
1011 | "# Classes"
1012 | ]
1013 | },
1014 | {
1015 | "metadata": {
1016 | "id": "mGua8QnArAZh",
1017 | "colab_type": "text"
1018 | },
1019 | "cell_type": "markdown",
1020 | "source": [
1021 | "Classes are a fundamental piece of object oriented programming in Python."
1022 | ]
1023 | },
1024 | {
1025 | "metadata": {
1026 | "id": "DXmPwI1frAAd",
1027 | "colab_type": "code",
1028 | "colab": {}
1029 | },
1030 | "cell_type": "code",
1031 | "source": [
1032 | "# Creating the class\n",
1033 | "class Pets(object):\n",
1034 | " \n",
1035 | " # Initialize the class\n",
1036 | " def __init__(self, species, color, name):\n",
1037 | " self.species = species\n",
1038 | " self.color = color\n",
1039 | " self.name = name\n",
1040 | "\n",
1041 | " # For printing \n",
1042 | " def __str__(self):\n",
1043 | " return \"{0} {1} named {2}.\".format(self.color, self.species, self.name)\n",
1044 | "\n",
1045 | " # Example function\n",
1046 | " def change_name(self, new_name):\n",
1047 | " self.name = new_name"
1048 | ],
1049 | "execution_count": 0,
1050 | "outputs": []
1051 | },
1052 | {
1053 | "metadata": {
1054 | "id": "ezQq_Fhhrqrv",
1055 | "colab_type": "code",
1056 | "outputId": "bf159745-99b1-4e33-af4d-f63924a1fe74",
1057 | "colab": {
1058 | "base_uri": "https://localhost:8080/",
1059 | "height": 51
1060 | }
1061 | },
1062 | "cell_type": "code",
1063 | "source": [
1064 | "# Creating an instance of a class\n",
1065 | "my_dog = Pets(species=\"dog\", color=\"orange\", name=\"Guiness\",)\n",
1066 | "print (my_dog)\n",
1067 | "print (my_dog.name)"
1068 | ],
1069 | "execution_count": 0,
1070 | "outputs": [
1071 | {
1072 | "output_type": "stream",
1073 | "text": [
1074 | "orange dog named Guiness.\n",
1075 | "Guiness\n"
1076 | ],
1077 | "name": "stdout"
1078 | }
1079 | ]
1080 | },
1081 | {
1082 | "metadata": {
1083 | "id": "qTinlRj1szc5",
1084 | "colab_type": "code",
1085 | "outputId": "80939a31-0242-4465-95ff-da0e5caaa67c",
1086 | "colab": {
1087 | "base_uri": "https://localhost:8080/",
1088 | "height": 51
1089 | }
1090 | },
1091 | "cell_type": "code",
1092 | "source": [
1093 | "# Using a class's function\n",
1094 | "my_dog.change_name(new_name=\"Charlie\")\n",
1095 | "print (my_dog)\n",
1096 | "print (my_dog.name)"
1097 | ],
1098 | "execution_count": 0,
1099 | "outputs": [
1100 | {
1101 | "output_type": "stream",
1102 | "text": [
1103 | "orange dog named Charlie.\n",
1104 | "Charlie\n"
1105 | ],
1106 | "name": "stdout"
1107 | }
1108 | ]
1109 | },
1110 | {
1111 | "metadata": {
1112 | "id": "kiWtd0aJtNtY",
1113 | "colab_type": "text"
1114 | },
1115 | "cell_type": "markdown",
1116 | "source": [
1117 | "# Additional resources"
1118 | ]
1119 | },
1120 | {
1121 | "metadata": {
1122 | "id": "cfLF4ktmtSC3",
1123 | "colab_type": "text"
1124 | },
1125 | "cell_type": "markdown",
1126 | "source": [
1127 | "This was a very quick look at Python and we'll be learning more in future lessons. If you want to learn more right now before diving into machine learning, check out this free course: [Free Python Course](https://www.codecademy.com/learn/learn-python)"
1128 | ]
1129 | }
1130 | ]
1131 | }
--------------------------------------------------------------------------------
/notebooks/02_NumPy.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "02_NumPy",
7 | "version": "0.3.2",
8 | "provenance": [],
9 | "collapsed_sections": [],
10 | "toc_visible": true
11 | },
12 | "kernelspec": {
13 | "name": "python3",
14 | "display_name": "Python 3"
15 | }
16 | },
17 | "cells": [
18 | {
19 | "metadata": {
20 | "id": "bOChJSNXtC9g",
21 | "colab_type": "text"
22 | },
23 | "cell_type": "markdown",
24 | "source": [
25 | "# NumPy"
26 | ]
27 | },
28 | {
29 | "metadata": {
30 | "id": "OLIxEDq6VhvZ",
31 | "colab_type": "text"
32 | },
33 | "cell_type": "markdown",
34 | "source": [
35 | "
\n",
36 | "\n",
37 | "In this lesson we will learn the basics of numerical analysis using the NumPy package.\n",
38 | "\n",
39 | "
\n",
40 | "\n",
41 | "\n"
42 | ]
43 | },
44 | {
45 | "metadata": {
46 | "id": "VoMq0eFRvugb",
47 | "colab_type": "text"
48 | },
49 | "cell_type": "markdown",
50 | "source": [
51 | "# NumPy basics"
52 | ]
53 | },
54 | {
55 | "metadata": {
56 | "id": "0-dXQiLlTIgz",
57 | "colab_type": "code",
58 | "colab": {}
59 | },
60 | "cell_type": "code",
61 | "source": [
62 | "import numpy as np"
63 | ],
64 | "execution_count": 0,
65 | "outputs": []
66 | },
67 | {
68 | "metadata": {
69 | "id": "bhaOPJV7WA0m",
70 | "colab_type": "code",
71 | "colab": {}
72 | },
73 | "cell_type": "code",
74 | "source": [
75 | "# Set seed for reproducibility\n",
76 | "np.random.seed(seed=1234)"
77 | ],
78 | "execution_count": 0,
79 | "outputs": []
80 | },
81 | {
82 | "metadata": {
83 | "id": "23tSlin9aWZ8",
84 | "colab_type": "code",
85 | "colab": {
86 | "base_uri": "https://localhost:8080/",
87 | "height": 102
88 | },
89 | "outputId": "4df1dbc0-77a1-4776-87d2-326b0bb0f79c"
90 | },
91 | "cell_type": "code",
92 | "source": [
93 | "# Scalars\n",
94 | "x = np.array(6) # scalar\n",
95 | "print (\"x: \", x)\n",
96 | "# Number of dimensions\n",
97 | "print (\"x ndim: \", x.ndim)\n",
98 | "# Dimensions\n",
99 | "print (\"x shape:\", x.shape)\n",
100 | "# Size of elements\n",
101 | "print (\"x size: \", x.size)\n",
102 | "# Data type\n",
103 | "print (\"x dtype: \", x.dtype)"
104 | ],
105 | "execution_count": 3,
106 | "outputs": [
107 | {
108 | "output_type": "stream",
109 | "text": [
110 | "x: 6\n",
111 | "x ndim: 0\n",
112 | "x shape: ()\n",
113 | "x size: 1\n",
114 | "x dtype: int64\n"
115 | ],
116 | "name": "stdout"
117 | }
118 | ]
119 | },
120 | {
121 | "metadata": {
122 | "id": "ugIZprdIabFF",
123 | "colab_type": "code",
124 | "colab": {
125 | "base_uri": "https://localhost:8080/",
126 | "height": 102
127 | },
128 | "outputId": "485b9e5e-176a-4ac3-b5ac-71a951470bf1"
129 | },
130 | "cell_type": "code",
131 | "source": [
132 | "# 1-D Array\n",
133 | "x = np.array([1.3 , 2.2 , 1.7])\n",
134 | "print (\"x: \", x)\n",
135 | "print (\"x ndim: \", x.ndim)\n",
136 | "print (\"x shape:\", x.shape)\n",
137 | "print (\"x size: \", x.size)\n",
138 | "print (\"x dtype: \", x.dtype) # notice the float datatype"
139 | ],
140 | "execution_count": 4,
141 | "outputs": [
142 | {
143 | "output_type": "stream",
144 | "text": [
145 | "x: [1.3 2.2 1.7]\n",
146 | "x ndim: 1\n",
147 | "x shape: (3,)\n",
148 | "x size: 3\n",
149 | "x dtype: float64\n"
150 | ],
151 | "name": "stdout"
152 | }
153 | ]
154 | },
155 | {
156 | "metadata": {
157 | "id": "SQI-T_4MbE9J",
158 | "colab_type": "code",
159 | "colab": {
160 | "base_uri": "https://localhost:8080/",
161 | "height": 153
162 | },
163 | "outputId": "4eede496-01c0-4f83-d0d9-ffe073de8f9f"
164 | },
165 | "cell_type": "code",
166 | "source": [
167 | "# 3-D array (matrix)\n",
168 | "x = np.array([[[1,2,3], [4,5,6], [7,8,9]]])\n",
169 | "print (\"x:\\n\", x)\n",
170 | "print (\"x ndim: \", x.ndim)\n",
171 | "print (\"x shape:\", x.shape)\n",
172 | "print (\"x size: \", x.size)\n",
173 | "print (\"x dtype: \", x.dtype)"
174 | ],
175 | "execution_count": 6,
176 | "outputs": [
177 | {
178 | "output_type": "stream",
179 | "text": [
180 | "x:\n",
181 | " [[[1 2 3]\n",
182 | " [4 5 6]\n",
183 | " [7 8 9]]]\n",
184 | "x ndim: 3\n",
185 | "x shape: (1, 3, 3)\n",
186 | "x size: 9\n",
187 | "x dtype: int64\n"
188 | ],
189 | "name": "stdout"
190 | }
191 | ]
192 | },
193 | {
194 | "metadata": {
195 | "id": "z2Qf8EKZln9j",
196 | "colab_type": "code",
197 | "colab": {
198 | "base_uri": "https://localhost:8080/",
199 | "height": 221
200 | },
201 | "outputId": "45b92bcd-42a4-457b-ae34-494a1f214ffe"
202 | },
203 | "cell_type": "code",
204 | "source": [
205 | "# Functions\n",
206 | "print (\"np.zeros((2,2)):\\n\", np.zeros((2,2)))\n",
207 | "print (\"np.ones((2,2)):\\n\", np.ones((2,2)))\n",
208 | "print (\"np.eye((2)):\\n\", np.eye((2)))\n",
209 | "print (\"np.random.random((2,2)):\\n\", np.random.random((2,2)))"
210 | ],
211 | "execution_count": 7,
212 | "outputs": [
213 | {
214 | "output_type": "stream",
215 | "text": [
216 | "np.zeros((2,2)):\n",
217 | " [[0. 0.]\n",
218 | " [0. 0.]]\n",
219 | "np.ones((2,2)):\n",
220 | " [[1. 1.]\n",
221 | " [1. 1.]]\n",
222 | "np.eye((2)):\n",
223 | " [[1. 0.]\n",
224 | " [0. 1.]]\n",
225 | "np.random.random((2,2)):\n",
226 | " [[0.19151945 0.62210877]\n",
227 | " [0.43772774 0.78535858]]\n"
228 | ],
229 | "name": "stdout"
230 | }
231 | ]
232 | },
233 | {
234 | "metadata": {
235 | "id": "qVD-MCiCdcV9",
236 | "colab_type": "text"
237 | },
238 | "cell_type": "markdown",
239 | "source": [
240 | "# Indexing"
241 | ]
242 | },
243 | {
244 | "metadata": {
245 | "id": "vyt36kFOcVDX",
246 | "colab_type": "code",
247 | "colab": {
248 | "base_uri": "https://localhost:8080/",
249 | "height": 51
250 | },
251 | "outputId": "d65f99dd-97ba-4df5-afa1-fc4305c0dc69"
252 | },
253 | "cell_type": "code",
254 | "source": [
255 | "# Indexing\n",
256 | "x = np.array([1, 2, 3])\n",
257 | "print (\"x[0]: \", x[0])\n",
258 | "x[0] = 0\n",
259 | "print (\"x: \", x)"
260 | ],
261 | "execution_count": 8,
262 | "outputs": [
263 | {
264 | "output_type": "stream",
265 | "text": [
266 | "x[0]: 1\n",
267 | "x: [0 2 3]\n"
268 | ],
269 | "name": "stdout"
270 | }
271 | ]
272 | },
273 | {
274 | "metadata": {
275 | "id": "qxHww0didni6",
276 | "colab_type": "code",
277 | "colab": {
278 | "base_uri": "https://localhost:8080/",
279 | "height": 170
280 | },
281 | "outputId": "0cccf1f5-3372-4f75-baf9-095b546e9ced"
282 | },
283 | "cell_type": "code",
284 | "source": [
285 | "# Slicing\n",
286 | "x = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])\n",
287 | "print (x)\n",
288 | "print (\"x column 1: \", x[:, 1]) \n",
289 | "print (\"x row 0: \", x[0, :]) \n",
290 | "print (\"x rows 0,1,2 & cols 1,2: \\n\", x[:3, 1:3]) "
291 | ],
292 | "execution_count": 9,
293 | "outputs": [
294 | {
295 | "output_type": "stream",
296 | "text": [
297 | "[[ 1 2 3 4]\n",
298 | " [ 5 6 7 8]\n",
299 | " [ 9 10 11 12]]\n",
300 | "x column 1: [ 2 6 10]\n",
301 | "x row 0: [1 2 3 4]\n",
302 | "x rows 0,1,2 & cols 1,2: \n",
303 | " [[ 2 3]\n",
304 | " [ 6 7]\n",
305 | " [10 11]]\n"
306 | ],
307 | "name": "stdout"
308 | }
309 | ]
310 | },
311 | {
312 | "metadata": {
313 | "id": "A52pzB9idyDE",
314 | "colab_type": "code",
315 | "colab": {
316 | "base_uri": "https://localhost:8080/",
317 | "height": 119
318 | },
319 | "outputId": "c9cd9a42-8cbb-4459-b878-8969aaec1e95"
320 | },
321 | "cell_type": "code",
322 | "source": [
323 | "# Integer array indexing\n",
324 | "print (x)\n",
325 | "rows_to_get = np.arange(len(x))\n",
326 | "print (\"rows_to_get: \", rows_to_get)\n",
327 | "cols_to_get = np.array([0, 2, 1])\n",
328 | "print (\"cols_to_get: \", cols_to_get)\n",
329 | "print (\"indexed values: \", x[rows_to_get, cols_to_get])"
330 | ],
331 | "execution_count": 10,
332 | "outputs": [
333 | {
334 | "output_type": "stream",
335 | "text": [
336 | "[[ 1 2 3 4]\n",
337 | " [ 5 6 7 8]\n",
338 | " [ 9 10 11 12]]\n",
339 | "rows_to_get: [0 1 2]\n",
340 | "cols_to_get: [0 2 1]\n",
341 | "indexed values: [ 1 7 10]\n"
342 | ],
343 | "name": "stdout"
344 | }
345 | ]
346 | },
347 | {
348 | "metadata": {
349 | "id": "_R7O5WsVfDij",
350 | "colab_type": "code",
351 | "colab": {
352 | "base_uri": "https://localhost:8080/",
353 | "height": 187
354 | },
355 | "outputId": "ab346ca7-5959-4bd2-cf02-9d2f9b253e72"
356 | },
357 | "cell_type": "code",
358 | "source": [
359 | "# Boolean array indexing\n",
360 | "x = np.array([[1,2], [3, 4], [5, 6]])\n",
361 | "print (\"x:\\n\", x)\n",
362 | "print (\"x > 2:\\n\", x > 2)\n",
363 | "print (\"x[x > 2]:\\n\", x[x > 2])"
364 | ],
365 | "execution_count": 11,
366 | "outputs": [
367 | {
368 | "output_type": "stream",
369 | "text": [
370 | "x:\n",
371 | " [[1 2]\n",
372 | " [3 4]\n",
373 | " [5 6]]\n",
374 | "x > 2:\n",
375 | " [[False False]\n",
376 | " [ True True]\n",
377 | " [ True True]]\n",
378 | "x[x > 2]:\n",
379 | " [3 4 5 6]\n"
380 | ],
381 | "name": "stdout"
382 | }
383 | ]
384 | },
385 | {
386 | "metadata": {
387 | "id": "77RCjrQ8gvYW",
388 | "colab_type": "text"
389 | },
390 | "cell_type": "markdown",
391 | "source": [
392 | "# Array math"
393 | ]
394 | },
395 | {
396 | "metadata": {
397 | "id": "1UJVcNCLfFrV",
398 | "colab_type": "code",
399 | "colab": {
400 | "base_uri": "https://localhost:8080/",
401 | "height": 170
402 | },
403 | "outputId": "4284fa79-10e7-428a-f30e-7a59a16cf510"
404 | },
405 | "cell_type": "code",
406 | "source": [
407 | "# Basic math\n",
408 | "x = np.array([[1,2], [3,4]], dtype=np.float64)\n",
409 | "y = np.array([[1,2], [3,4]], dtype=np.float64)\n",
410 | "print (\"x + y:\\n\", np.add(x, y)) # or x + y\n",
411 | "print (\"x - y:\\n\", np.subtract(x, y)) # or x - y\n",
412 | "print (\"x * y:\\n\", np.multiply(x, y)) # or x * y"
413 | ],
414 | "execution_count": 12,
415 | "outputs": [
416 | {
417 | "output_type": "stream",
418 | "text": [
419 | "x + y:\n",
420 | " [[2. 4.]\n",
421 | " [6. 8.]]\n",
422 | "x - y:\n",
423 | " [[0. 0.]\n",
424 | " [0. 0.]]\n",
425 | "x * y:\n",
426 | " [[ 1. 4.]\n",
427 | " [ 9. 16.]]\n"
428 | ],
429 | "name": "stdout"
430 | }
431 | ]
432 | },
433 | {
434 | "metadata": {
435 | "id": "1BV0nSIliMC6",
436 | "colab_type": "text"
437 | },
438 | "cell_type": "markdown",
439 | "source": [
440 | "
\n"
441 | ]
442 | },
443 | {
444 | "metadata": {
445 | "id": "XyZVF6gXhTWd",
446 | "colab_type": "code",
447 | "colab": {
448 | "base_uri": "https://localhost:8080/",
449 | "height": 51
450 | },
451 | "outputId": "8cbc328a-b5f3-416e-cf6f-a140aa208398"
452 | },
453 | "cell_type": "code",
454 | "source": [
455 | "# Dot product\n",
456 | "a = np.array([[1,2,3], [4,5,6]], dtype=np.float64) # we can specify dtype\n",
457 | "b = np.array([[7,8], [9,10], [11, 12]], dtype=np.float64)\n",
458 | "print (a.dot(b))"
459 | ],
460 | "execution_count": 13,
461 | "outputs": [
462 | {
463 | "output_type": "stream",
464 | "text": [
465 | "[[ 58. 64.]\n",
466 | " [139. 154.]]\n"
467 | ],
468 | "name": "stdout"
469 | }
470 | ]
471 | },
472 | {
473 | "metadata": {
474 | "id": "7pB-H-7phsku",
475 | "colab_type": "code",
476 | "colab": {
477 | "base_uri": "https://localhost:8080/",
478 | "height": 102
479 | },
480 | "outputId": "96a21872-164a-4b47-cd35-bf031a7421d3"
481 | },
482 | "cell_type": "code",
483 | "source": [
484 | "# Sum across a dimension\n",
485 | "x = np.array([[1,2],[3,4]])\n",
486 | "print (x)\n",
487 | "print (\"sum all: \", np.sum(x)) # adds all elements\n",
488 | "print (\"sum by col: \", np.sum(x, axis=0)) # add numbers in each column\n",
489 | "print (\"sum by row: \", np.sum(x, axis=1)) # add numbers in each row"
490 | ],
491 | "execution_count": 14,
492 | "outputs": [
493 | {
494 | "output_type": "stream",
495 | "text": [
496 | "[[1 2]\n",
497 | " [3 4]]\n",
498 | "sum all: 10\n",
499 | "sum by col: [4 6]\n",
500 | "sum by row: [3 7]\n"
501 | ],
502 | "name": "stdout"
503 | }
504 | ]
505 | },
506 | {
507 | "metadata": {
508 | "id": "pLDG49LrijgA",
509 | "colab_type": "code",
510 | "colab": {
511 | "base_uri": "https://localhost:8080/",
512 | "height": 119
513 | },
514 | "outputId": "9fa3a3e1-6a33-4052-baea-3dd91649f193"
515 | },
516 | "cell_type": "code",
517 | "source": [
518 | "# Transposing\n",
519 | "print (\"x:\\n\", x)\n",
520 | "print (\"x.T:\\n\", x.T)"
521 | ],
522 | "execution_count": 15,
523 | "outputs": [
524 | {
525 | "output_type": "stream",
526 | "text": [
527 | "x:\n",
528 | " [[1 2]\n",
529 | " [3 4]]\n",
530 | "x.T:\n",
531 | " [[1 3]\n",
532 | " [2 4]]\n"
533 | ],
534 | "name": "stdout"
535 | }
536 | ]
537 | },
538 | {
539 | "metadata": {
540 | "id": "KdPKVKtwkWnw",
541 | "colab_type": "text"
542 | },
543 | "cell_type": "markdown",
544 | "source": [
545 | "# Advanced"
546 | ]
547 | },
548 | {
549 | "metadata": {
550 | "id": "U_j2fCcjkEyo",
551 | "colab_type": "code",
552 | "colab": {
553 | "base_uri": "https://localhost:8080/",
554 | "height": 119
555 | },
556 | "outputId": "7df2d80f-7e31-4c01-e8e7-81c6986f6bd7"
557 | },
558 | "cell_type": "code",
559 | "source": [
560 | "# Tile\n",
561 | "x = np.array([[1,2], [3,4]])\n",
562 | "y = np.array([5, 6])\n",
563 | "addent = np.tile(y, (len(x), 1))\n",
564 | "print (\"addent: \\n\", addent)\n",
565 | "z = x + addent\n",
566 | "print (\"z:\\n\", z)"
567 | ],
568 | "execution_count": 16,
569 | "outputs": [
570 | {
571 | "output_type": "stream",
572 | "text": [
573 | "addent: \n",
574 | " [[5 6]\n",
575 | " [5 6]]\n",
576 | "z:\n",
577 | " [[ 6 8]\n",
578 | " [ 8 10]]\n"
579 | ],
580 | "name": "stdout"
581 | }
582 | ]
583 | },
584 | {
585 | "metadata": {
586 | "id": "1NsoFVo0mfQ4",
587 | "colab_type": "code",
588 | "colab": {
589 | "base_uri": "https://localhost:8080/",
590 | "height": 68
591 | },
592 | "outputId": "3b2a830e-abcf-4e5d-e824-2b9ce142f166"
593 | },
594 | "cell_type": "code",
595 | "source": [
596 | "# Broadcasting\n",
597 | "x = np.array([[1,2], [3,4]])\n",
598 | "y = np.array([5, 6])\n",
599 | "z = x + y\n",
600 | "print (\"z:\\n\", z)"
601 | ],
602 | "execution_count": 17,
603 | "outputs": [
604 | {
605 | "output_type": "stream",
606 | "text": [
607 | "z:\n",
608 | " [[ 6 8]\n",
609 | " [ 8 10]]\n"
610 | ],
611 | "name": "stdout"
612 | }
613 | ]
614 | },
615 | {
616 | "metadata": {
617 | "id": "RdEHrnMTnO6k",
618 | "colab_type": "code",
619 | "colab": {
620 | "base_uri": "https://localhost:8080/",
621 | "height": 153
622 | },
623 | "outputId": "881c6cf7-bfc7-4c41-ad70-68cd01b20656"
624 | },
625 | "cell_type": "code",
626 | "source": [
627 | "# Reshaping\n",
628 | "x = np.array([[1,2], [3,4], [5,6]])\n",
629 | "print (x)\n",
630 | "print (\"x.shape: \", x.shape)\n",
631 | "y = np.reshape(x, (2, 3))\n",
632 | "print (\"y.shape: \", y.shape)\n",
633 | "print (\"y: \\n\", y)"
634 | ],
635 | "execution_count": 18,
636 | "outputs": [
637 | {
638 | "output_type": "stream",
639 | "text": [
640 | "[[1 2]\n",
641 | " [3 4]\n",
642 | " [5 6]]\n",
643 | "x.shape: (3, 2)\n",
644 | "y.shape: (2, 3)\n",
645 | "y: \n",
646 | " [[1 2 3]\n",
647 | " [4 5 6]]\n"
648 | ],
649 | "name": "stdout"
650 | }
651 | ]
652 | },
653 | {
654 | "metadata": {
655 | "id": "tE1BmoJuns70",
656 | "colab_type": "code",
657 | "colab": {
658 | "base_uri": "https://localhost:8080/",
659 | "height": 102
660 | },
661 | "outputId": "719b9e01-4428-4013-b413-d755d46a2e58"
662 | },
663 | "cell_type": "code",
664 | "source": [
665 | "# Removing dimensions\n",
666 | "x = np.array([[[1,2,1]],[[2,2,3]]])\n",
667 | "print (\"x.shape: \", x.shape)\n",
668 | "y = np.squeeze(x, 1) # squeeze dim 1\n",
669 | "print (\"y.shape: \", y.shape) \n",
670 | "print (\"y: \\n\", y)"
671 | ],
672 | "execution_count": 19,
673 | "outputs": [
674 | {
675 | "output_type": "stream",
676 | "text": [
677 | "x.shape: (2, 1, 3)\n",
678 | "y.shape: (2, 3)\n",
679 | "y: \n",
680 | " [[1 2 1]\n",
681 | " [2 2 3]]\n"
682 | ],
683 | "name": "stdout"
684 | }
685 | ]
686 | },
687 | {
688 | "metadata": {
689 | "id": "LNYJRMF4qvXN",
690 | "colab_type": "code",
691 | "colab": {
692 | "base_uri": "https://localhost:8080/",
693 | "height": 119
694 | },
695 | "outputId": "be32eb32-2222-4178-fb52-4fc86d5f8df1"
696 | },
697 | "cell_type": "code",
698 | "source": [
699 | "# Adding dimensions\n",
700 | "x = np.array([[1,2,1],[2,2,3]])\n",
701 | "print (\"x.shape: \", x.shape)\n",
702 | "y = np.expand_dims(x, 1) # expand dim 1\n",
703 | "print (\"y.shape: \", y.shape) \n",
704 | "print (\"y: \\n\", y)"
705 | ],
706 | "execution_count": 20,
707 | "outputs": [
708 | {
709 | "output_type": "stream",
710 | "text": [
711 | "x.shape: (2, 3)\n",
712 | "y.shape: (2, 1, 3)\n",
713 | "y: \n",
714 | " [[[1 2 1]]\n",
715 | "\n",
716 | " [[2 2 3]]]\n"
717 | ],
718 | "name": "stdout"
719 | }
720 | ]
721 | },
722 | {
723 | "metadata": {
724 | "id": "XthM4y7SotAH",
725 | "colab_type": "text"
726 | },
727 | "cell_type": "markdown",
728 | "source": [
729 | "# Additional resources"
730 | ]
731 | },
732 | {
733 | "metadata": {
734 | "id": "3KmESFstrbFS",
735 | "colab_type": "text"
736 | },
737 | "cell_type": "markdown",
738 | "source": [
739 | "You don't have to memorize anything here and we will be taking a closer look at NumPy in the later lessons. If you are curious about more checkout the [NumPy reference manual](https://docs.scipy.org/doc/numpy-1.15.1/reference/)."
740 | ]
741 | }
742 | ]
743 | }
744 |
--------------------------------------------------------------------------------
/notebooks/07_PyTorch.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "07_PyTorch",
7 | "version": "0.3.2",
8 | "provenance": [],
9 | "collapsed_sections": [],
10 | "toc_visible": true
11 | },
12 | "kernelspec": {
13 | "name": "python3",
14 | "display_name": "Python 3"
15 | },
16 | "accelerator": "GPU"
17 | },
18 | "cells": [
19 | {
20 | "metadata": {
21 | "id": "bOChJSNXtC9g",
22 | "colab_type": "text"
23 | },
24 | "cell_type": "markdown",
25 | "source": [
26 | "# PyTorch"
27 | ]
28 | },
29 | {
30 | "metadata": {
31 | "id": "OLIxEDq6VhvZ",
32 | "colab_type": "text"
33 | },
34 | "cell_type": "markdown",
35 | "source": [
36 | "
\n",
37 | "\n",
38 | "In this lesson we'll learn about PyTorch which is a machine learning library used to build dynamic neural networks. We'll learn about the basics, like creating and using Tensors, in this lesson but we'll be making models with it in the next lesson.\n",
39 | "\n",
40 | "
"
41 | ]
42 | },
43 | {
44 | "metadata": {
45 | "id": "VoMq0eFRvugb",
46 | "colab_type": "text"
47 | },
48 | "cell_type": "markdown",
49 | "source": [
50 | "# Tensor basics"
51 | ]
52 | },
53 | {
54 | "metadata": {
55 | "id": "0-dXQiLlTIgz",
56 | "colab_type": "code",
57 | "colab": {
58 | "base_uri": "https://localhost:8080/",
59 | "height": 34
60 | },
61 | "outputId": "d4ed17af-40a8-41db-ba6e-825ff9db2187"
62 | },
63 | "cell_type": "code",
64 | "source": [
65 | "# Load PyTorch library\n",
66 | "!pip3 install torch"
67 | ],
68 | "execution_count": 2,
69 | "outputs": [
70 | {
71 | "output_type": "stream",
72 | "text": [
73 | "Requirement already satisfied: torch in /usr/local/lib/python3.6/dist-packages (1.0.0)\n"
74 | ],
75 | "name": "stdout"
76 | }
77 | ]
78 | },
79 | {
80 | "metadata": {
81 | "id": "rX7Vs1JxL9wX",
82 | "colab_type": "code",
83 | "colab": {}
84 | },
85 | "cell_type": "code",
86 | "source": [
87 | "import numpy as np\n",
88 | "import torch"
89 | ],
90 | "execution_count": 0,
91 | "outputs": []
92 | },
93 | {
94 | "metadata": {
95 | "id": "Nv0xryLkKujV",
96 | "colab_type": "code",
97 | "outputId": "d46d5e58-2195-40a8-841c-26b627541a83",
98 | "colab": {
99 | "base_uri": "https://localhost:8080/",
100 | "height": 119
101 | }
102 | },
103 | "cell_type": "code",
104 | "source": [
105 | "# Creating a zero tensor\n",
106 | "x = torch.Tensor(3, 4)\n",
107 | "print(\"Type: {}\".format(x.type()))\n",
108 | "print(\"Size: {}\".format(x.shape))\n",
109 | "print(\"Values: \\n{}\".format(x))"
110 | ],
111 | "execution_count": 4,
112 | "outputs": [
113 | {
114 | "output_type": "stream",
115 | "text": [
116 | "Type: torch.FloatTensor\n",
117 | "Size: torch.Size([3, 4])\n",
118 | "Values: \n",
119 | "tensor([[1.1744e-35, 0.0000e+00, 2.8026e-44, 0.0000e+00],\n",
120 | " [ nan, 0.0000e+00, 1.3733e-14, 4.7429e+30],\n",
121 | " [1.9431e-19, 4.7429e+30, 5.0938e-14, 0.0000e+00]])\n"
122 | ],
123 | "name": "stdout"
124 | }
125 | ]
126 | },
127 | {
128 | "metadata": {
129 | "id": "vnyzY4PHL7c5",
130 | "colab_type": "code",
131 | "outputId": "70ed373d-e7e0-43cd-e732-51be86377721",
132 | "colab": {
133 | "base_uri": "https://localhost:8080/",
134 | "height": 51
135 | }
136 | },
137 | "cell_type": "code",
138 | "source": [
139 | "# Creating a random tensor\n",
140 | "x = torch.randn(2, 3) # normal distribution (rand(2,3) -> uniform distribution)\n",
141 | "print (x)"
142 | ],
143 | "execution_count": 5,
144 | "outputs": [
145 | {
146 | "output_type": "stream",
147 | "text": [
148 | "tensor([[ 0.7434, -1.0611, -0.3752],\n",
149 | " [ 0.2613, -1.7051, 0.9118]])\n"
150 | ],
151 | "name": "stdout"
152 | }
153 | ]
154 | },
155 | {
156 | "metadata": {
157 | "id": "DVwGNeKxMXI8",
158 | "colab_type": "code",
159 | "outputId": "6a185aa3-96f2-4e29-b116-3de3025cff4d",
160 | "colab": {
161 | "base_uri": "https://localhost:8080/",
162 | "height": 85
163 | }
164 | },
165 | "cell_type": "code",
166 | "source": [
167 | "# Zero and Ones tensor\n",
168 | "x = torch.zeros(2, 3)\n",
169 | "print (x)\n",
170 | "x = torch.ones(2, 3)\n",
171 | "print (x)"
172 | ],
173 | "execution_count": 6,
174 | "outputs": [
175 | {
176 | "output_type": "stream",
177 | "text": [
178 | "tensor([[0., 0., 0.],\n",
179 | " [0., 0., 0.]])\n",
180 | "tensor([[1., 1., 1.],\n",
181 | " [1., 1., 1.]])\n"
182 | ],
183 | "name": "stdout"
184 | }
185 | ]
186 | },
187 | {
188 | "metadata": {
189 | "id": "BPjHnDmCMXLm",
190 | "colab_type": "code",
191 | "outputId": "c14c494e-b714-4983-eb90-665064830a14",
192 | "colab": {
193 | "base_uri": "https://localhost:8080/",
194 | "height": 85
195 | }
196 | },
197 | "cell_type": "code",
198 | "source": [
199 | "# List → Tensor\n",
200 | "x = torch.Tensor([[1, 2, 3],[4, 5, 6]])\n",
201 | "print(\"Size: {}\".format(x.shape)) \n",
202 | "print(\"Values: \\n{}\".format(x))"
203 | ],
204 | "execution_count": 7,
205 | "outputs": [
206 | {
207 | "output_type": "stream",
208 | "text": [
209 | "Size: torch.Size([2, 3])\n",
210 | "Values: \n",
211 | "tensor([[1., 2., 3.],\n",
212 | " [4., 5., 6.]])\n"
213 | ],
214 | "name": "stdout"
215 | }
216 | ]
217 | },
218 | {
219 | "metadata": {
220 | "id": "mG4-CHkgMXOE",
221 | "colab_type": "code",
222 | "outputId": "2b9ed2e5-9862-480e-d0ce-d231676d7f49",
223 | "colab": {
224 | "base_uri": "https://localhost:8080/",
225 | "height": 85
226 | }
227 | },
228 | "cell_type": "code",
229 | "source": [
230 | "# NumPy array → Tensor\n",
231 | "x = torch.from_numpy(np.random.rand(2, 3))\n",
232 | "print(\"Size: {}\".format(x.shape)) \n",
233 | "print(\"Values: \\n{}\".format(x))"
234 | ],
235 | "execution_count": 8,
236 | "outputs": [
237 | {
238 | "output_type": "stream",
239 | "text": [
240 | "Size: torch.Size([2, 3])\n",
241 | "Values: \n",
242 | "tensor([[0.0372, 0.6757, 0.9554],\n",
243 | " [0.5651, 0.2336, 0.8303]], dtype=torch.float64)\n"
244 | ],
245 | "name": "stdout"
246 | }
247 | ]
248 | },
249 | {
250 | "metadata": {
251 | "id": "L8X2-5cqMXRA",
252 | "colab_type": "code",
253 | "outputId": "af1c82ab-b8d7-4ea6-e142-7f8ed50fda40",
254 | "colab": {
255 | "base_uri": "https://localhost:8080/",
256 | "height": 51
257 | }
258 | },
259 | "cell_type": "code",
260 | "source": [
261 | "# Changing tensor type\n",
262 | "x = torch.Tensor(3, 4)\n",
263 | "print(\"Type: {}\".format(x.type()))\n",
264 | "x = x.long()\n",
265 | "print(\"Type: {}\".format(x.type()))"
266 | ],
267 | "execution_count": 9,
268 | "outputs": [
269 | {
270 | "output_type": "stream",
271 | "text": [
272 | "Type: torch.FloatTensor\n",
273 | "Type: torch.LongTensor\n"
274 | ],
275 | "name": "stdout"
276 | }
277 | ]
278 | },
279 | {
280 | "metadata": {
281 | "id": "S2BRPaMvPbe3",
282 | "colab_type": "text"
283 | },
284 | "cell_type": "markdown",
285 | "source": [
286 | "# Tensor operations"
287 | ]
288 | },
289 | {
290 | "metadata": {
291 | "id": "Xrn8I76TMXT1",
292 | "colab_type": "code",
293 | "outputId": "556b9d7f-79da-415c-f85d-648c5394e3a3",
294 | "colab": {
295 | "base_uri": "https://localhost:8080/",
296 | "height": 85
297 | }
298 | },
299 | "cell_type": "code",
300 | "source": [
301 | "# Addition\n",
302 | "x = torch.randn(2, 3)\n",
303 | "y = torch.randn(2, 3)\n",
304 | "z = x + y\n",
305 | "print(\"Size: {}\".format(z.shape)) \n",
306 | "print(\"Values: \\n{}\".format(z))"
307 | ],
308 | "execution_count": 10,
309 | "outputs": [
310 | {
311 | "output_type": "stream",
312 | "text": [
313 | "Size: torch.Size([2, 3])\n",
314 | "Values: \n",
315 | "tensor([[ 0.5650, -0.0173, 1.1263],\n",
316 | " [ 3.4274, 1.3610, -0.9262]])\n"
317 | ],
318 | "name": "stdout"
319 | }
320 | ]
321 | },
322 | {
323 | "metadata": {
324 | "id": "157fC9WsMXWf",
325 | "colab_type": "code",
326 | "outputId": "a6890b43-4c74-42c6-d654-f62b8c130403",
327 | "colab": {
328 | "base_uri": "https://localhost:8080/",
329 | "height": 85
330 | }
331 | },
332 | "cell_type": "code",
333 | "source": [
334 | "# Dot product\n",
335 | "x = torch.randn(2, 3)\n",
336 | "y = torch.randn(3, 2)\n",
337 | "z = torch.mm(x, y)\n",
338 | "print(\"Size: {}\".format(z.shape)) \n",
339 | "print(\"Values: \\n{}\".format(z))"
340 | ],
341 | "execution_count": 11,
342 | "outputs": [
343 | {
344 | "output_type": "stream",
345 | "text": [
346 | "Size: torch.Size([2, 2])\n",
347 | "Values: \n",
348 | "tensor([[ 1.3294, -2.4559],\n",
349 | " [-0.4337, 4.9667]])\n"
350 | ],
351 | "name": "stdout"
352 | }
353 | ]
354 | },
355 | {
356 | "metadata": {
357 | "id": "G6316lAmMXZG",
358 | "colab_type": "code",
359 | "outputId": "3dce79e7-1b9f-4218-84cd-afbb16af7dd4",
360 | "colab": {
361 | "base_uri": "https://localhost:8080/",
362 | "height": 170
363 | }
364 | },
365 | "cell_type": "code",
366 | "source": [
367 | "# Transpose\n",
368 | "x = torch.randn(2, 3)\n",
369 | "print(\"Size: {}\".format(x.shape)) \n",
370 | "print(\"Values: \\n{}\".format(x))\n",
371 | "y = torch.t(x)\n",
372 | "print(\"Size: {}\".format(y.shape)) \n",
373 | "print(\"Values: \\n{}\".format(y))"
374 | ],
375 | "execution_count": 12,
376 | "outputs": [
377 | {
378 | "output_type": "stream",
379 | "text": [
380 | "Size: torch.Size([2, 3])\n",
381 | "Values: \n",
382 | "tensor([[ 0.0257, -0.5716, -0.9207],\n",
383 | " [-1.0590, 0.2942, -0.7114]])\n",
384 | "Size: torch.Size([3, 2])\n",
385 | "Values: \n",
386 | "tensor([[ 0.0257, -1.0590],\n",
387 | " [-0.5716, 0.2942],\n",
388 | " [-0.9207, -0.7114]])\n"
389 | ],
390 | "name": "stdout"
391 | }
392 | ]
393 | },
394 | {
395 | "metadata": {
396 | "id": "FCgDCOCjMXcF",
397 | "colab_type": "code",
398 | "outputId": "ff1e16f5-bcd9-407f-9c99-361a0b7f27f6",
399 | "colab": {
400 | "base_uri": "https://localhost:8080/",
401 | "height": 102
402 | }
403 | },
404 | "cell_type": "code",
405 | "source": [
406 | "# Reshape\n",
407 | "z = x.view(3, 2)\n",
408 | "print(\"Size: {}\".format(z.shape)) \n",
409 | "print(\"Values: \\n{}\".format(z))"
410 | ],
411 | "execution_count": 13,
412 | "outputs": [
413 | {
414 | "output_type": "stream",
415 | "text": [
416 | "Size: torch.Size([3, 2])\n",
417 | "Values: \n",
418 | "tensor([[ 0.0257, -0.5716],\n",
419 | " [-0.9207, -1.0590],\n",
420 | " [ 0.2942, -0.7114]])\n"
421 | ],
422 | "name": "stdout"
423 | }
424 | ]
425 | },
426 | {
427 | "metadata": {
428 | "id": "T3-6nGgvECH9",
429 | "colab_type": "code",
430 | "outputId": "9599adaf-1feb-4a42-d4b5-af23f1de5b2d",
431 | "colab": {
432 | "base_uri": "https://localhost:8080/",
433 | "height": 561
434 | }
435 | },
436 | "cell_type": "code",
437 | "source": [
438 | "# Dangers of reshaping (unintended consequences)\n",
439 | "x = torch.tensor([\n",
440 | " [[1,1,1,1], [2,2,2,2], [3,3,3,3]],\n",
441 | " [[10,10,10,10], [20,20,20,20], [30,30,30,30]]\n",
442 | "])\n",
443 | "print(\"Size: {}\".format(x.shape)) \n",
444 | "print(\"Values: \\n{}\\n\".format(x))\n",
445 | "a = x.view(x.size(1), -1)\n",
446 | "print(\"Size: {}\".format(a.shape)) \n",
447 | "print(\"Values: \\n{}\\n\".format(a))\n",
448 | "b = x.transpose(0,1).contiguous()\n",
449 | "print(\"Size: {}\".format(b.shape)) \n",
450 | "print(\"Values: \\n{}\\n\".format(b))\n",
451 | "c = b.view(b.size(0), -1)\n",
452 | "print(\"Size: {}\".format(c.shape)) \n",
453 | "print(\"Values: \\n{}\".format(c))"
454 | ],
455 | "execution_count": 14,
456 | "outputs": [
457 | {
458 | "output_type": "stream",
459 | "text": [
460 | "Size: torch.Size([2, 3, 4])\n",
461 | "Values: \n",
462 | "tensor([[[ 1, 1, 1, 1],\n",
463 | " [ 2, 2, 2, 2],\n",
464 | " [ 3, 3, 3, 3]],\n",
465 | "\n",
466 | " [[10, 10, 10, 10],\n",
467 | " [20, 20, 20, 20],\n",
468 | " [30, 30, 30, 30]]])\n",
469 | "\n",
470 | "Size: torch.Size([3, 8])\n",
471 | "Values: \n",
472 | "tensor([[ 1, 1, 1, 1, 2, 2, 2, 2],\n",
473 | " [ 3, 3, 3, 3, 10, 10, 10, 10],\n",
474 | " [20, 20, 20, 20, 30, 30, 30, 30]])\n",
475 | "\n",
476 | "Size: torch.Size([3, 2, 4])\n",
477 | "Values: \n",
478 | "tensor([[[ 1, 1, 1, 1],\n",
479 | " [10, 10, 10, 10]],\n",
480 | "\n",
481 | " [[ 2, 2, 2, 2],\n",
482 | " [20, 20, 20, 20]],\n",
483 | "\n",
484 | " [[ 3, 3, 3, 3],\n",
485 | " [30, 30, 30, 30]]])\n",
486 | "\n",
487 | "Size: torch.Size([3, 8])\n",
488 | "Values: \n",
489 | "tensor([[ 1, 1, 1, 1, 10, 10, 10, 10],\n",
490 | " [ 2, 2, 2, 2, 20, 20, 20, 20],\n",
491 | " [ 3, 3, 3, 3, 30, 30, 30, 30]])\n"
492 | ],
493 | "name": "stdout"
494 | }
495 | ]
496 | },
497 | {
498 | "metadata": {
499 | "id": "hRtG5LShMXew",
500 | "colab_type": "code",
501 | "outputId": "b54e520a-8cd5-40a9-8b38-64919574dce0",
502 | "colab": {
503 | "base_uri": "https://localhost:8080/",
504 | "height": 136
505 | }
506 | },
507 | "cell_type": "code",
508 | "source": [
509 | "# Dimensional operations\n",
510 | "x = torch.randn(2, 3)\n",
511 | "print(\"Values: \\n{}\".format(x))\n",
512 | "y = torch.sum(x, dim=0) # add each row's value for every column\n",
513 | "print(\"Values: \\n{}\".format(y))\n",
514 | "z = torch.sum(x, dim=1) # add each columns's value for every row\n",
515 | "print(\"Values: \\n{}\".format(z))"
516 | ],
517 | "execution_count": 15,
518 | "outputs": [
519 | {
520 | "output_type": "stream",
521 | "text": [
522 | "Values: \n",
523 | "tensor([[ 0.4295, 0.2223, 0.1772],\n",
524 | " [ 2.1602, -0.8891, -0.5011]])\n",
525 | "Values: \n",
526 | "tensor([ 2.5897, -0.6667, -0.3239])\n",
527 | "Values: \n",
528 | "tensor([0.8290, 0.7700])\n"
529 | ],
530 | "name": "stdout"
531 | }
532 | ]
533 | },
534 | {
535 | "metadata": {
536 | "id": "zI0ZV45PrYmw",
537 | "colab_type": "text"
538 | },
539 | "cell_type": "markdown",
540 | "source": [
541 | "# Indexing, Splicing and Joining"
542 | ]
543 | },
544 | {
545 | "metadata": {
546 | "id": "iM3UFrs0MXhL",
547 | "colab_type": "code",
548 | "outputId": "bfcbbf13-d8a1-4fc1-f244-fd54068ca74b",
549 | "colab": {
550 | "base_uri": "https://localhost:8080/",
551 | "height": 153
552 | }
553 | },
554 | "cell_type": "code",
555 | "source": [
556 | "x = torch.randn(3, 4)\n",
557 | "print(\"x: \\n{}\".format(x))\n",
558 | "print (\"x[:1]: \\n{}\".format(x[:1]))\n",
559 | "print (\"x[:1, 1:3]: \\n{}\".format(x[:1, 1:3]))"
560 | ],
561 | "execution_count": 16,
562 | "outputs": [
563 | {
564 | "output_type": "stream",
565 | "text": [
566 | "x: \n",
567 | "tensor([[-1.0305, 0.0368, 1.2809, 1.2346],\n",
568 | " [-0.8837, 1.3678, -0.0971, 1.2528],\n",
569 | " [ 0.3382, -1.4948, -0.7058, 1.3378]])\n",
570 | "x[:1]: \n",
571 | "tensor([[-1.0305, 0.0368, 1.2809, 1.2346]])\n",
572 | "x[:1, 1:3]: \n",
573 | "tensor([[0.0368, 1.2809]])\n"
574 | ],
575 | "name": "stdout"
576 | }
577 | ]
578 | },
579 | {
580 | "metadata": {
581 | "id": "_tbpwGxcMXj0",
582 | "colab_type": "code",
583 | "outputId": "678e805f-f5ec-49fe-d8d6-0986a3c41672",
584 | "colab": {
585 | "base_uri": "https://localhost:8080/",
586 | "height": 153
587 | }
588 | },
589 | "cell_type": "code",
590 | "source": [
591 | "# Select with dimensional indicies\n",
592 | "x = torch.randn(2, 3)\n",
593 | "print(\"Values: \\n{}\".format(x))\n",
594 | "col_indices = torch.LongTensor([0, 2])\n",
595 | "chosen = torch.index_select(x, dim=1, index=col_indices) # values from column 0 & 2\n",
596 | "print(\"Values: \\n{}\".format(chosen)) \n",
597 | "row_indices = torch.LongTensor([0, 1])\n",
598 | "chosen = x[row_indices, col_indices] # values from (0, 0) & (2, 1)\n",
599 | "print(\"Values: \\n{}\".format(chosen)) "
600 | ],
601 | "execution_count": 17,
602 | "outputs": [
603 | {
604 | "output_type": "stream",
605 | "text": [
606 | "Values: \n",
607 | "tensor([[ 0.0720, 0.4266, -0.5351],\n",
608 | " [ 0.9672, 0.3691, -0.7332]])\n",
609 | "Values: \n",
610 | "tensor([[ 0.0720, -0.5351],\n",
611 | " [ 0.9672, -0.7332]])\n",
612 | "Values: \n",
613 | "tensor([ 0.0720, -0.7332])\n"
614 | ],
615 | "name": "stdout"
616 | }
617 | ]
618 | },
619 | {
620 | "metadata": {
621 | "id": "tMeqSQtuMXmH",
622 | "colab_type": "code",
623 | "outputId": "9fa99c82-78d9-41f8-d070-710cf1b045c7",
624 | "colab": {
625 | "base_uri": "https://localhost:8080/",
626 | "height": 153
627 | }
628 | },
629 | "cell_type": "code",
630 | "source": [
631 | "# Concatenation\n",
632 | "x = torch.randn(2, 3)\n",
633 | "print(\"Values: \\n{}\".format(x))\n",
634 | "y = torch.cat([x, x], dim=0) # stack by rows (dim=1 to stack by columns)\n",
635 | "print(\"Values: \\n{}\".format(y))"
636 | ],
637 | "execution_count": 18,
638 | "outputs": [
639 | {
640 | "output_type": "stream",
641 | "text": [
642 | "Values: \n",
643 | "tensor([[-0.8443, 0.9883, 2.2796],\n",
644 | " [-0.0482, -0.1147, -0.5290]])\n",
645 | "Values: \n",
646 | "tensor([[-0.8443, 0.9883, 2.2796],\n",
647 | " [-0.0482, -0.1147, -0.5290],\n",
648 | " [-0.8443, 0.9883, 2.2796],\n",
649 | " [-0.0482, -0.1147, -0.5290]])\n"
650 | ],
651 | "name": "stdout"
652 | }
653 | ]
654 | },
655 | {
656 | "metadata": {
657 | "id": "JqiDuIC-ByvO",
658 | "colab_type": "text"
659 | },
660 | "cell_type": "markdown",
661 | "source": [
662 | "# Gradients"
663 | ]
664 | },
665 | {
666 | "metadata": {
667 | "id": "qxpGB7-VL7fs",
668 | "colab_type": "code",
669 | "outputId": "a7964762-60d4-4e0e-bed2-b2d392804494",
670 | "colab": {
671 | "base_uri": "https://localhost:8080/",
672 | "height": 153
673 | }
674 | },
675 | "cell_type": "code",
676 | "source": [
677 | "# Tensors with gradient bookkeeping\n",
678 | "x = torch.rand(3, 4, requires_grad=True)\n",
679 | "y = 3*x + 2\n",
680 | "z = y.mean()\n",
681 | "z.backward() # z has to be scalar\n",
682 | "print(\"Values: \\n{}\".format(x))\n",
683 | "print(\"x.grad: \\n\", x.grad)"
684 | ],
685 | "execution_count": 19,
686 | "outputs": [
687 | {
688 | "output_type": "stream",
689 | "text": [
690 | "Values: \n",
691 | "tensor([[0.7014, 0.2477, 0.5928, 0.5314],\n",
692 | " [0.2832, 0.0825, 0.5684, 0.3090],\n",
693 | " [0.1591, 0.0049, 0.0439, 0.7602]], requires_grad=True)\n",
694 | "x.grad: \n",
695 | " tensor([[0.2500, 0.2500, 0.2500, 0.2500],\n",
696 | " [0.2500, 0.2500, 0.2500, 0.2500],\n",
697 | " [0.2500, 0.2500, 0.2500, 0.2500]])\n"
698 | ],
699 | "name": "stdout"
700 | }
701 | ]
702 | },
703 | {
704 | "metadata": {
705 | "id": "uf7htaAMDcRV",
706 | "colab_type": "text"
707 | },
708 | "cell_type": "markdown",
709 | "source": [
710 | "* $ y = 3x + 2 $\n",
711 | "* $ z = \\sum{y}/N $\n",
712 | "* $ \\frac{\\partial(z)}{\\partial(x)} = \\frac{\\partial(z)}{\\partial(y)} \\frac{\\partial(y)}{\\partial(x)} = \\frac{1}{N} * 3 = \\frac{1}{12} * 3 = 0.25 $"
713 | ]
714 | },
715 | {
716 | "metadata": {
717 | "id": "VQtpZh1YD-kz",
718 | "colab_type": "text"
719 | },
720 | "cell_type": "markdown",
721 | "source": [
722 | "# CUDA tensors"
723 | ]
724 | },
725 | {
726 | "metadata": {
727 | "id": "E_C3en05L7iT",
728 | "colab_type": "code",
729 | "outputId": "01b0eddc-db28-4786-ae48-a1004c838186",
730 | "colab": {
731 | "base_uri": "https://localhost:8080/",
732 | "height": 34
733 | }
734 | },
735 | "cell_type": "code",
736 | "source": [
737 | "# Is CUDA available?\n",
738 | "print (torch.cuda.is_available())"
739 | ],
740 | "execution_count": 20,
741 | "outputs": [
742 | {
743 | "output_type": "stream",
744 | "text": [
745 | "True\n"
746 | ],
747 | "name": "stdout"
748 | }
749 | ]
750 | },
751 | {
752 | "metadata": {
753 | "id": "za47KWEJ6en2",
754 | "colab_type": "text"
755 | },
756 | "cell_type": "markdown",
757 | "source": [
758 | "If the code above return False, then go to `Runtime` → `Change runtime type` and select `GPU` under `Hardware accelerator`. "
759 | ]
760 | },
761 | {
762 | "metadata": {
763 | "id": "BY2DdN3j6ZxO",
764 | "colab_type": "code",
765 | "outputId": "ec0ac0bd-461d-4b45-e131-cbf1d19c955b",
766 | "colab": {
767 | "base_uri": "https://localhost:8080/",
768 | "height": 34
769 | }
770 | },
771 | "cell_type": "code",
772 | "source": [
773 | "# Creating a zero tensor\n",
774 | "x = torch.Tensor(3, 4).to(\"cpu\")\n",
775 | "print(\"Type: {}\".format(x.type()))"
776 | ],
777 | "execution_count": 23,
778 | "outputs": [
779 | {
780 | "output_type": "stream",
781 | "text": [
782 | "Type: torch.FloatTensor\n"
783 | ],
784 | "name": "stdout"
785 | }
786 | ]
787 | },
788 | {
789 | "metadata": {
790 | "id": "EcmdTggzEFPi",
791 | "colab_type": "code",
792 | "outputId": "0e3326db-8d3d-40aa-accd-b31ab841b572",
793 | "colab": {
794 | "base_uri": "https://localhost:8080/",
795 | "height": 34
796 | }
797 | },
798 | "cell_type": "code",
799 | "source": [
800 | "# Creating a zero tensor\n",
801 | "x = torch.Tensor(3, 4).to(\"cuda\")\n",
802 | "print(\"Type: {}\".format(x.type()))"
803 | ],
804 | "execution_count": 24,
805 | "outputs": [
806 | {
807 | "output_type": "stream",
808 | "text": [
809 | "Type: torch.cuda.FloatTensor\n"
810 | ],
811 | "name": "stdout"
812 | }
813 | ]
814 | }
815 | ]
816 | }
817 |
--------------------------------------------------------------------------------
/notebooks/blank_notebook.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "blank_notebook",
7 | "version": "0.3.2",
8 | "provenance": [],
9 | "collapsed_sections": [
10 | "XM6QNzxAjx-o",
11 | "SpvlvmTWkXOT",
12 | "e4Ez2rvhkc5m",
13 | "BbjnrxcVkekH",
14 | "RLxmd3Iikflb",
15 | "WYyreg6OkgpR",
16 | "O3kysqGfknyZ",
17 | "xAhTdkcykpEh",
18 | "fSnEDucqkqQQ",
19 | "9iee2YZlkrhQ"
20 | ],
21 | "toc_visible": true
22 | },
23 | "kernelspec": {
24 | "name": "python3",
25 | "display_name": "Python 3"
26 | }
27 | },
28 | "cells": [
29 | {
30 | "metadata": {
31 | "id": "bOChJSNXtC9g",
32 | "colab_type": "text"
33 | },
34 | "cell_type": "markdown",
35 | "source": [
36 | "# Title"
37 | ]
38 | },
39 | {
40 | "metadata": {
41 | "id": "OLIxEDq6VhvZ",
42 | "colab_type": "text"
43 | },
44 | "cell_type": "markdown",
45 | "source": [
46 | "
\n",
47 | "\n",
48 | "text\n",
49 | "\n",
50 | "\n",
51 | "\n"
52 | ]
53 | },
54 | {
55 | "metadata": {
56 | "id": "VoMq0eFRvugb",
57 | "colab_type": "text"
58 | },
59 | "cell_type": "markdown",
60 | "source": [
61 | "# Overview"
62 | ]
63 | },
64 | {
65 | "metadata": {
66 | "id": "qWro5T5qTJJL",
67 | "colab_type": "text"
68 | },
69 | "cell_type": "markdown",
70 | "source": [
71 | "* **Objective:** \n",
72 | "* **Advantages:**\n",
73 | "* **Disadvantages:**\n",
74 | "* **Miscellaneous:** "
75 | ]
76 | },
77 | {
78 | "metadata": {
79 | "id": "0-dXQiLlTIgz",
80 | "colab_type": "code",
81 | "colab": {}
82 | },
83 | "cell_type": "code",
84 | "source": [
85 | ""
86 | ],
87 | "execution_count": 0,
88 | "outputs": []
89 | },
90 | {
91 | "metadata": {
92 | "id": "jb9r5aaMje6n",
93 | "colab_type": "text"
94 | },
95 | "cell_type": "markdown",
96 | "source": [
97 | "# Configuration"
98 | ]
99 | },
100 | {
101 | "metadata": {
102 | "id": "ywaO9t1gjiu9",
103 | "colab_type": "text"
104 | },
105 | "cell_type": "markdown",
106 | "source": [
107 | ""
108 | ]
109 | },
110 | {
111 | "metadata": {
112 | "id": "l1DPI8dajf85",
113 | "colab_type": "code",
114 | "colab": {}
115 | },
116 | "cell_type": "code",
117 | "source": [
118 | ""
119 | ],
120 | "execution_count": 0,
121 | "outputs": []
122 | },
123 | {
124 | "metadata": {
125 | "id": "AAH8p01gjxMI",
126 | "colab_type": "text"
127 | },
128 | "cell_type": "markdown",
129 | "source": [
130 | "# Set up"
131 | ]
132 | },
133 | {
134 | "metadata": {
135 | "id": "fIuMdhMUjxvU",
136 | "colab_type": "text"
137 | },
138 | "cell_type": "markdown",
139 | "source": [
140 | ""
141 | ]
142 | },
143 | {
144 | "metadata": {
145 | "id": "uqEqBn6Pjx5J",
146 | "colab_type": "code",
147 | "colab": {}
148 | },
149 | "cell_type": "code",
150 | "source": [
151 | ""
152 | ],
153 | "execution_count": 0,
154 | "outputs": []
155 | },
156 | {
157 | "metadata": {
158 | "id": "XM6QNzxAjx-o",
159 | "colab_type": "text"
160 | },
161 | "cell_type": "markdown",
162 | "source": [
163 | "### Components"
164 | ]
165 | },
166 | {
167 | "metadata": {
168 | "id": "VtkArLn9j57q",
169 | "colab_type": "code",
170 | "colab": {}
171 | },
172 | "cell_type": "code",
173 | "source": [
174 | ""
175 | ],
176 | "execution_count": 0,
177 | "outputs": []
178 | },
179 | {
180 | "metadata": {
181 | "id": "Jn1_NCmPj6ji",
182 | "colab_type": "text"
183 | },
184 | "cell_type": "markdown",
185 | "source": [
186 | "### Operations"
187 | ]
188 | },
189 | {
190 | "metadata": {
191 | "id": "Lg7IxbfNj7Wb",
192 | "colab_type": "code",
193 | "colab": {}
194 | },
195 | "cell_type": "code",
196 | "source": [
197 | ""
198 | ],
199 | "execution_count": 0,
200 | "outputs": []
201 | },
202 | {
203 | "metadata": {
204 | "id": "iHPxnENOj7ua",
205 | "colab_type": "text"
206 | },
207 | "cell_type": "markdown",
208 | "source": [
209 | "# Load data"
210 | ]
211 | },
212 | {
213 | "metadata": {
214 | "id": "gRPOul1_kWWf",
215 | "colab_type": "text"
216 | },
217 | "cell_type": "markdown",
218 | "source": [
219 | ""
220 | ]
221 | },
222 | {
223 | "metadata": {
224 | "id": "-DTzDZdLkXDG",
225 | "colab_type": "code",
226 | "colab": {}
227 | },
228 | "cell_type": "code",
229 | "source": [
230 | ""
231 | ],
232 | "execution_count": 0,
233 | "outputs": []
234 | },
235 | {
236 | "metadata": {
237 | "id": "SpvlvmTWkXOT",
238 | "colab_type": "text"
239 | },
240 | "cell_type": "markdown",
241 | "source": [
242 | "### Components"
243 | ]
244 | },
245 | {
246 | "metadata": {
247 | "id": "-dnepSLfkZd7",
248 | "colab_type": "code",
249 | "colab": {}
250 | },
251 | "cell_type": "code",
252 | "source": [
253 | ""
254 | ],
255 | "execution_count": 0,
256 | "outputs": []
257 | },
258 | {
259 | "metadata": {
260 | "id": "xoM-KNWlkYg5",
261 | "colab_type": "text"
262 | },
263 | "cell_type": "markdown",
264 | "source": [
265 | "### Operations"
266 | ]
267 | },
268 | {
269 | "metadata": {
270 | "id": "5AKhnr7Vka7w",
271 | "colab_type": "code",
272 | "colab": {}
273 | },
274 | "cell_type": "code",
275 | "source": [
276 | ""
277 | ],
278 | "execution_count": 0,
279 | "outputs": []
280 | },
281 | {
282 | "metadata": {
283 | "id": "2aELs6AukFqm",
284 | "colab_type": "text"
285 | },
286 | "cell_type": "markdown",
287 | "source": [
288 | "# Split data"
289 | ]
290 | },
291 | {
292 | "metadata": {
293 | "id": "4IRB292HkcPm",
294 | "colab_type": "text"
295 | },
296 | "cell_type": "markdown",
297 | "source": [
298 | ""
299 | ]
300 | },
301 | {
302 | "metadata": {
303 | "id": "Lq4oFiQCkcY8",
304 | "colab_type": "code",
305 | "colab": {}
306 | },
307 | "cell_type": "code",
308 | "source": [
309 | ""
310 | ],
311 | "execution_count": 0,
312 | "outputs": []
313 | },
314 | {
315 | "metadata": {
316 | "id": "e4Ez2rvhkc5m",
317 | "colab_type": "text"
318 | },
319 | "cell_type": "markdown",
320 | "source": [
321 | "### Components"
322 | ]
323 | },
324 | {
325 | "metadata": {
326 | "id": "3zt9y8XekdBG",
327 | "colab_type": "code",
328 | "colab": {}
329 | },
330 | "cell_type": "code",
331 | "source": [
332 | ""
333 | ],
334 | "execution_count": 0,
335 | "outputs": []
336 | },
337 | {
338 | "metadata": {
339 | "id": "ZuxK3j0ykdHc",
340 | "colab_type": "text"
341 | },
342 | "cell_type": "markdown",
343 | "source": [
344 | "### Operations"
345 | ]
346 | },
347 | {
348 | "metadata": {
349 | "id": "NeuxhiehkdRi",
350 | "colab_type": "code",
351 | "colab": {}
352 | },
353 | "cell_type": "code",
354 | "source": [
355 | ""
356 | ],
357 | "execution_count": 0,
358 | "outputs": []
359 | },
360 | {
361 | "metadata": {
362 | "id": "W93dOx1VkHid",
363 | "colab_type": "text"
364 | },
365 | "cell_type": "markdown",
366 | "source": [
367 | "# Preprocessing"
368 | ]
369 | },
370 | {
371 | "metadata": {
372 | "id": "nhWUb2ADkeXC",
373 | "colab_type": "text"
374 | },
375 | "cell_type": "markdown",
376 | "source": [
377 | ""
378 | ]
379 | },
380 | {
381 | "metadata": {
382 | "id": "9Ye9ZxUJkedJ",
383 | "colab_type": "code",
384 | "colab": {}
385 | },
386 | "cell_type": "code",
387 | "source": [
388 | ""
389 | ],
390 | "execution_count": 0,
391 | "outputs": []
392 | },
393 | {
394 | "metadata": {
395 | "id": "BbjnrxcVkekH",
396 | "colab_type": "text"
397 | },
398 | "cell_type": "markdown",
399 | "source": [
400 | "### Components"
401 | ]
402 | },
403 | {
404 | "metadata": {
405 | "id": "J09o0XcmkepT",
406 | "colab_type": "code",
407 | "colab": {}
408 | },
409 | "cell_type": "code",
410 | "source": [
411 | ""
412 | ],
413 | "execution_count": 0,
414 | "outputs": []
415 | },
416 | {
417 | "metadata": {
418 | "id": "XC-GMbi0kevW",
419 | "colab_type": "text"
420 | },
421 | "cell_type": "markdown",
422 | "source": [
423 | "### Operations"
424 | ]
425 | },
426 | {
427 | "metadata": {
428 | "id": "q03-usQEke2D",
429 | "colab_type": "code",
430 | "colab": {}
431 | },
432 | "cell_type": "code",
433 | "source": [
434 | ""
435 | ],
436 | "execution_count": 0,
437 | "outputs": []
438 | },
439 | {
440 | "metadata": {
441 | "id": "egGxlDr2kIZJ",
442 | "colab_type": "text"
443 | },
444 | "cell_type": "markdown",
445 | "source": [
446 | "# Vocabulary"
447 | ]
448 | },
449 | {
450 | "metadata": {
451 | "id": "fU9FqZ2Pkfad",
452 | "colab_type": "text"
453 | },
454 | "cell_type": "markdown",
455 | "source": [
456 | ""
457 | ]
458 | },
459 | {
460 | "metadata": {
461 | "id": "wb1LpytzkfgF",
462 | "colab_type": "code",
463 | "colab": {}
464 | },
465 | "cell_type": "code",
466 | "source": [
467 | ""
468 | ],
469 | "execution_count": 0,
470 | "outputs": []
471 | },
472 | {
473 | "metadata": {
474 | "id": "RLxmd3Iikflb",
475 | "colab_type": "text"
476 | },
477 | "cell_type": "markdown",
478 | "source": [
479 | "### Components"
480 | ]
481 | },
482 | {
483 | "metadata": {
484 | "id": "AKgeTcRUkfqu",
485 | "colab_type": "code",
486 | "colab": {}
487 | },
488 | "cell_type": "code",
489 | "source": [
490 | ""
491 | ],
492 | "execution_count": 0,
493 | "outputs": []
494 | },
495 | {
496 | "metadata": {
497 | "id": "CMRpb9x7kfv4",
498 | "colab_type": "text"
499 | },
500 | "cell_type": "markdown",
501 | "source": [
502 | "### Operations"
503 | ]
504 | },
505 | {
506 | "metadata": {
507 | "id": "6ZpOma9Pkf0v",
508 | "colab_type": "code",
509 | "colab": {}
510 | },
511 | "cell_type": "code",
512 | "source": [
513 | ""
514 | ],
515 | "execution_count": 0,
516 | "outputs": []
517 | },
518 | {
519 | "metadata": {
520 | "id": "sqHwDEdOkLr1",
521 | "colab_type": "text"
522 | },
523 | "cell_type": "markdown",
524 | "source": [
525 | "# Vectorizer"
526 | ]
527 | },
528 | {
529 | "metadata": {
530 | "id": "dzmPCeIakgee",
531 | "colab_type": "text"
532 | },
533 | "cell_type": "markdown",
534 | "source": [
535 | ""
536 | ]
537 | },
538 | {
539 | "metadata": {
540 | "id": "kGyt32Pbkgke",
541 | "colab_type": "code",
542 | "colab": {}
543 | },
544 | "cell_type": "code",
545 | "source": [
546 | ""
547 | ],
548 | "execution_count": 0,
549 | "outputs": []
550 | },
551 | {
552 | "metadata": {
553 | "id": "WYyreg6OkgpR",
554 | "colab_type": "text"
555 | },
556 | "cell_type": "markdown",
557 | "source": [
558 | "### Components"
559 | ]
560 | },
561 | {
562 | "metadata": {
563 | "id": "Flh_aoADkguV",
564 | "colab_type": "code",
565 | "colab": {}
566 | },
567 | "cell_type": "code",
568 | "source": [
569 | ""
570 | ],
571 | "execution_count": 0,
572 | "outputs": []
573 | },
574 | {
575 | "metadata": {
576 | "id": "4Y2QxqfKkgzo",
577 | "colab_type": "text"
578 | },
579 | "cell_type": "markdown",
580 | "source": [
581 | "### Operations"
582 | ]
583 | },
584 | {
585 | "metadata": {
586 | "id": "Fc258N_-kg5R",
587 | "colab_type": "code",
588 | "colab": {}
589 | },
590 | "cell_type": "code",
591 | "source": [
592 | ""
593 | ],
594 | "execution_count": 0,
595 | "outputs": []
596 | },
597 | {
598 | "metadata": {
599 | "id": "fs3HqaKGkLud",
600 | "colab_type": "text"
601 | },
602 | "cell_type": "markdown",
603 | "source": [
604 | "# Dataset"
605 | ]
606 | },
607 | {
608 | "metadata": {
609 | "id": "aPIajnrrkno9",
610 | "colab_type": "text"
611 | },
612 | "cell_type": "markdown",
613 | "source": [
614 | ""
615 | ]
616 | },
617 | {
618 | "metadata": {
619 | "id": "FYBDuOeoknuA",
620 | "colab_type": "code",
621 | "colab": {}
622 | },
623 | "cell_type": "code",
624 | "source": [
625 | ""
626 | ],
627 | "execution_count": 0,
628 | "outputs": []
629 | },
630 | {
631 | "metadata": {
632 | "id": "O3kysqGfknyZ",
633 | "colab_type": "text"
634 | },
635 | "cell_type": "markdown",
636 | "source": [
637 | "### Components"
638 | ]
639 | },
640 | {
641 | "metadata": {
642 | "id": "d7bAXHu0kn3W",
643 | "colab_type": "code",
644 | "colab": {}
645 | },
646 | "cell_type": "code",
647 | "source": [
648 | ""
649 | ],
650 | "execution_count": 0,
651 | "outputs": []
652 | },
653 | {
654 | "metadata": {
655 | "id": "2-0qIlu9kn75",
656 | "colab_type": "text"
657 | },
658 | "cell_type": "markdown",
659 | "source": [
660 | "### Operations"
661 | ]
662 | },
663 | {
664 | "metadata": {
665 | "id": "MKVuzT-jkoAZ",
666 | "colab_type": "code",
667 | "colab": {}
668 | },
669 | "cell_type": "code",
670 | "source": [
671 | ""
672 | ],
673 | "execution_count": 0,
674 | "outputs": []
675 | },
676 | {
677 | "metadata": {
678 | "id": "0aJ0yO7ckLwz",
679 | "colab_type": "text"
680 | },
681 | "cell_type": "markdown",
682 | "source": [
683 | "# Model"
684 | ]
685 | },
686 | {
687 | "metadata": {
688 | "id": "_u9PFO0iko6-",
689 | "colab_type": "text"
690 | },
691 | "cell_type": "markdown",
692 | "source": [
693 | ""
694 | ]
695 | },
696 | {
697 | "metadata": {
698 | "id": "L2oKAZkQko_q",
699 | "colab_type": "code",
700 | "colab": {}
701 | },
702 | "cell_type": "code",
703 | "source": [
704 | ""
705 | ],
706 | "execution_count": 0,
707 | "outputs": []
708 | },
709 | {
710 | "metadata": {
711 | "id": "xAhTdkcykpEh",
712 | "colab_type": "text"
713 | },
714 | "cell_type": "markdown",
715 | "source": [
716 | "### Components"
717 | ]
718 | },
719 | {
720 | "metadata": {
721 | "id": "DlS3MEgQkpJn",
722 | "colab_type": "code",
723 | "colab": {}
724 | },
725 | "cell_type": "code",
726 | "source": [
727 | ""
728 | ],
729 | "execution_count": 0,
730 | "outputs": []
731 | },
732 | {
733 | "metadata": {
734 | "id": "R5SQBSV0kpN3",
735 | "colab_type": "text"
736 | },
737 | "cell_type": "markdown",
738 | "source": [
739 | "### Operations"
740 | ]
741 | },
742 | {
743 | "metadata": {
744 | "id": "hjp3L0BPkpSX",
745 | "colab_type": "code",
746 | "colab": {}
747 | },
748 | "cell_type": "code",
749 | "source": [
750 | ""
751 | ],
752 | "execution_count": 0,
753 | "outputs": []
754 | },
755 | {
756 | "metadata": {
757 | "id": "jPOhuEC9kRXy",
758 | "colab_type": "text"
759 | },
760 | "cell_type": "markdown",
761 | "source": [
762 | "# Training"
763 | ]
764 | },
765 | {
766 | "metadata": {
767 | "id": "bFd6wLibkqGp",
768 | "colab_type": "text"
769 | },
770 | "cell_type": "markdown",
771 | "source": [
772 | ""
773 | ]
774 | },
775 | {
776 | "metadata": {
777 | "id": "pf4tqoynkqLC",
778 | "colab_type": "code",
779 | "colab": {}
780 | },
781 | "cell_type": "code",
782 | "source": [
783 | ""
784 | ],
785 | "execution_count": 0,
786 | "outputs": []
787 | },
788 | {
789 | "metadata": {
790 | "id": "fSnEDucqkqQQ",
791 | "colab_type": "text"
792 | },
793 | "cell_type": "markdown",
794 | "source": [
795 | "### Components"
796 | ]
797 | },
798 | {
799 | "metadata": {
800 | "id": "WL0t3GdbkqUP",
801 | "colab_type": "code",
802 | "colab": {}
803 | },
804 | "cell_type": "code",
805 | "source": [
806 | ""
807 | ],
808 | "execution_count": 0,
809 | "outputs": []
810 | },
811 | {
812 | "metadata": {
813 | "id": "Nyjfcmd9kqYc",
814 | "colab_type": "text"
815 | },
816 | "cell_type": "markdown",
817 | "source": [
818 | "### Operations"
819 | ]
820 | },
821 | {
822 | "metadata": {
823 | "id": "qQXrP7Z_kqcf",
824 | "colab_type": "code",
825 | "colab": {}
826 | },
827 | "cell_type": "code",
828 | "source": [
829 | ""
830 | ],
831 | "execution_count": 0,
832 | "outputs": []
833 | },
834 | {
835 | "metadata": {
836 | "id": "7aaFYUe9kRcR",
837 | "colab_type": "text"
838 | },
839 | "cell_type": "markdown",
840 | "source": [
841 | "# Inference"
842 | ]
843 | },
844 | {
845 | "metadata": {
846 | "id": "2Q-loSkDkrYd",
847 | "colab_type": "text"
848 | },
849 | "cell_type": "markdown",
850 | "source": [
851 | ""
852 | ]
853 | },
854 | {
855 | "metadata": {
856 | "id": "RQBVL3gTkrc7",
857 | "colab_type": "code",
858 | "colab": {}
859 | },
860 | "cell_type": "code",
861 | "source": [
862 | ""
863 | ],
864 | "execution_count": 0,
865 | "outputs": []
866 | },
867 | {
868 | "metadata": {
869 | "id": "9iee2YZlkrhQ",
870 | "colab_type": "text"
871 | },
872 | "cell_type": "markdown",
873 | "source": [
874 | "### Components"
875 | ]
876 | },
877 | {
878 | "metadata": {
879 | "id": "WThcf8RDkrlk",
880 | "colab_type": "code",
881 | "colab": {}
882 | },
883 | "cell_type": "code",
884 | "source": [
885 | ""
886 | ],
887 | "execution_count": 0,
888 | "outputs": []
889 | },
890 | {
891 | "metadata": {
892 | "id": "FCCy--cvkrqN",
893 | "colab_type": "text"
894 | },
895 | "cell_type": "markdown",
896 | "source": [
897 | "### Operations"
898 | ]
899 | },
900 | {
901 | "metadata": {
902 | "id": "v_izptvNkrvQ",
903 | "colab_type": "code",
904 | "colab": {}
905 | },
906 | "cell_type": "code",
907 | "source": [
908 | ""
909 | ],
910 | "execution_count": 0,
911 | "outputs": []
912 | },
913 | {
914 | "metadata": {
915 | "id": "MInTr5yPkThm",
916 | "colab_type": "text"
917 | },
918 | "cell_type": "markdown",
919 | "source": [
920 | "# TODO"
921 | ]
922 | },
923 | {
924 | "metadata": {
925 | "id": "9ZC1gKdIkU-j",
926 | "colab_type": "text"
927 | },
928 | "cell_type": "markdown",
929 | "source": [
930 | ""
931 | ]
932 | }
933 | ]
934 | }
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | argparse==1.4.0
2 | django==2.1.3
3 | gensim==3.6.0
4 | image==1.5.27
5 | jsonschema==2.6.0
6 | jupyter==1.0.0
7 | matplotlib==2.1.2
8 | nltk==3.2.5
9 | numpy==1.14.6
10 | pandas==0.22.0
11 | Pillow==4.0.0
12 | protobuf==3.6.1
13 | qtconsole==4.4.3
14 | regex==2017.11.9
15 | requests==2.18.4
16 | scikit-learn==0.20.1
17 | scipy==1.1.0
18 | seaborn==0.7.1
19 | six==1.11.0
20 | sklearn==0.0
21 | tensorboardX==1.4
22 | tensorboard==1.12.0
23 | tensorflow==1.12.0
24 | tqdm==4.28.1
25 | ujson==1.35
26 | urllib3==1.22
27 | Werkzeug==0.14.1
--------------------------------------------------------------------------------