Skip to content

Commit cbce2ef

Browse files
committed
feat: updated neural networks hero lab
1 parent b2b22b3 commit cbce2ef

File tree

6 files changed

+122
-30
lines changed

6 files changed

+122
-30
lines changed

neural_networks_hero/end/end.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# The End
2+
3+
Follow us if you want content like this, AI news, coding tips... in your social media timelines.
4+
5+
![victor](./images/victor_1.PNG)
6+
7+
![nacho](./images/me_1.PNG)
8+
9+
Hey.
10+
11+
<img src='https://user-images.githubusercontent.com/20752424/214715922-edb3ba30-f89e-4ab9-992c-afcdb44c3e86.jpg' width='500"'>
12+
13+
If you're interested in my content, check out the following links. I'm a Data Scientist Advocate with 4 years of experience, and I love teaching people about Machine Learning (ML) in unique ways that make people learn better.
14+
15+
Follow me if you're interested in ML content. I promise, everything I do goes opensource.
16+
17+
## 🏆 My Stats
18+
19+
![My Public contributions](https://github-readme-stats.vercel.app/api?username=jasperan&show_icons=true&hide_border=false&theme=tokyonight&count_private=true&hide=prs,stars,contribs)
20+
21+
![Streak](https://github-readme-streak-stats.herokuapp.com/?user=jasperan&theme=tokyonight)
22+
23+
![Top Languages](https://github-readme-stats.vercel.app/api/top-langs/?username=jasperan&layout=compact)
24+
25+
[![Trophies](https://github-profile-trophy.vercel.app/?username=jasperan&theme=onedark)](https://github.com/jasperan)
26+
27+
## ☕ Get In Touch
28+
29+
- [StackOverflow](https://stackoverflow.com/users/9151930/jasper?tab=profile)
30+
- [My Website](https://jasperan.com)
31+
- [LinkedIn](https://www.linkedin.com/in/jasperan/)
32+
33+
## 👀 My Best Repositories
34+
35+
[![WhatsApp Spy](https://github-readme-stats.vercel.app/api/pin/?username=jasperan&repo=whatsapp-osint)](https://github.com/jasperan/whatsapp-osint)
36+
37+
[![League of Legends Optimizer](https://github-readme-stats.vercel.app/api/pin/?username=oracle-devrel&repo=leagueoflegends-optimizer)](https://github.com/oracle-devrel/leagueoflegends-optimizer)
38+
39+
[![RedBull Analytics Hands-On Lab](https://github-readme-stats.vercel.app/api/pin/?username=oracle-devrel&repo=redbull-analytics-hol)](https://github.com/oracle-devrel/redbull-analytics-hol)
40+
41+
[![F1'21 Telemetry](https://github-readme-stats.vercel.app/api/pin/?username=jasperan&repo=f1-telemetry-oracle)](https://github.com/jasperan/f1-telemetry-oracle)
42+
43+
### My Gaming ML Content
44+
45+
- [League of Legends Machine Learning with OCI - Data Extraction](https://oracle-devrel.github.io/leagueoflegends-optimizer/hols/workshops/dataextraction/index.html) - About Data Extraction & Engineering!
46+
- [League of Legends Machine Learning with OCI - Model Building with scikit-learn and AutoGluon](https://oracle-devrel.github.io/leagueoflegends-optimizer/hols/workshops/mlwithoci/index.html) - Illustrates the whole AI process once we have data available
47+
- [League of Legends Machine Learning with OCI - Introduction to Neural Networks](https://oracle-devrel.github.io/leagueoflegends-optimizer/hols/workshops/nn/index.html) - A very basic introduction to all Neural Network concepts, like learning rate, backpropagation... etc.
48+
49+
#### Topic-specific Articles
50+
51+
- [League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/main/articles/article1.md)
52+
- [League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing 2](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/main/articles/article2.md)
53+
- [League of Legends Optimizer using Oracle Cloud Infrastructure: Building an Adversarial League of Legends AI Model](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/main/articles/article3.md)
54+
- [League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/main/articles/article4.md)
55+
- [League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions 2](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/main/articles/article5.md)
56+
57+
### My RedBull Content
58+
59+
- [Oracle RedBull Pit Strategy Hands-on Lab](https://oracle-devrel.github.io/redbull-pit-strategy/hols/workshops/pitstrategy/index.html)
60+
- [Oracle x RedBull AI conference](https://github.com/oracle-devrel/redbull-analytics-hol)
61+
- [Connecting F1 2021 Telemetry with Oracle JET](https://medium.com/oracledevs/connecting-f1-2021-telemetry-with-oracle-jet-a73714768c34)
62+
63+
### My Computer Vision (Health ML) Content
64+
65+
- [Creating a CMask Detection Model on OCI with YOLOv5: Data Labeling with RoboFlow](https://medium.com/oracledevs/creating-a-cmask-detection-model-on-oci-with-yolov5-data-labeling-with-roboflow-5cff89cf9b0b)
66+
67+
- [Creating a Mask Model on OCI with YOLOv5: Training and Real-Time Inference](https://medium.com/oracledevs/creating-a-mask-model-on-oci-with-yolov5-training-and-real-time-inference-3534c7f9eb21)
68+
69+
- [YOLOv5 and OCI: Implementing Custom PyTorch Code From Scratch](https://medium.com/oracledevs/yolov5-and-oci-implementing-custom-pytorch-code-from-scratch-7c6b82b0b6b1)
70+
71+
### My General ML Content
72+
73+
- [Benchmarking TensorFlow on OCI](https://medium.com/oracledevs/benchmarking-tensorflow-on-oci-70c781287b7d)
74+
- [Benchmarking PyTorch on OCI and EfficientNet Models](https://medium.com/oracledevs/benchmarking-pytorch-on-oci-and-efficientnet-models-1d729b45d503)
75+
- [Working with Data in TensorFlow](https://medium.com/oracledevs/working-with-data-in-tensorflow-a0656f616f4f)
76+
- [Working with Data in PyTorch](https://medium.com/oracledevs/working-with-data-in-pytorch-fa2641e37d17)
77+
- [Getting Started with PyTorch on OCI](https://medium.com/oracledevs/getting-started-with-pytorch-on-oci-dbaa5e7a40ef)
78+
79+
### Articles in which I'm Featured
80+
81+
- [Team up with Red Bull Racing Honda and Oracle for Hands-on Lab teaching machine learning with racing data](https://medium.com/oracledevs/team-up-with-red-bull-racing-honda-and-oracle-for-hands-on-lab-teaching-machine-learning-with-70eafcf78383)
82+
83+
### My Public Appearances
84+
85+
![Oracle CloudWorld 2022](https://user-images.githubusercontent.com/20752424/214705966-dd90d511-713b-4322-b620-bd2946857f02.jpg)
86+
> Me @ Oracle CloudWorld 2022, Las Vegas
87+
88+
### Current public repositories I am working on
89+
90+
- [League of Legends Optimizer](https://github.com/oracle-devrel/leagueoflegends-optimizer)
91+
- [WhatsApp OSINT Tool](https://github.com/jasperan/whatsapp-osint)
92+
93+
## YouTube Videos
94+
95+
- [League of Legends Content Series Interview: Using ML with League of Legends (LoL)](https://youtu.be/zz3xaLI0uq8)
96+
- [AlmaLinux Pi Day 2021](https://youtu.be/kGfwYqXxBfY)
97+
- [Machine Learning on OCI for League of Legends- Data Extraction](https://youtu.be/ad0RkqB07vI)
98+
- [Machine Learning on OCI for League of Legends - Model Building with scikit-learn and AutoGluon](https://youtu.be/5iIvkgcMvhM)
99+
- [Machine Learning on OCI for League of Legends: Introduction to Neural Networks](https://youtu.be/Uuo3ZSexNU8)
100+
101+
⭐️ From [jasperan](https://github.com/jasperan)
728 KB
Loading
801 KB
Loading

neural_networks_hero/infra/infra.md

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ Estimated Time: 15 minutes
7373
![Paste Tenancy OCID](images/paste-tenancy-ocid.png)
7474
7575
6. Copy the output of the same command as the compartment OCID:
76-
```
76+
77+
```bash
7778
<copy>echo $OCI_TENANCY</copy>
7879
```
79-
80+
8081
> Note: we can paste the same OCID here in both tenancy and compartment because the root compartment in a tenancy is equal to the tenancy's OCID.
8182
8283
![Paste Compartment OCID](images/paste-compartment-ocid.png)
@@ -92,7 +93,7 @@ Estimated Time: 15 minutes
9293
7. Generate a SSH key pair, by default it will create a private key on _`~/.ssh/id_rsa`_ and a public key _`~/.ssh/id_rsa.pub`_.
9394
It will ask to enter the path, a passphrase and confirm again the passphrase; type _[ENTER]_ to continue all three times.
9495
95-
```
96+
```bash
9697
<copy>ssh-keygen -t rsa</copy>
9798
```
9899
@@ -104,7 +105,7 @@ Estimated Time: 15 minutes
104105
105106
8. We need the public key in our notes, so keep the result of the content of the following command in your notes.
106107
107-
```
108+
```bash
108109
<copy>cat ~/.ssh/id_rsa.pub</copy>
109110
```
110111
@@ -115,11 +116,11 @@ Estimated Time: 15 minutes
115116
10. Save the file in the Code Editor.
116117
![Code Editor Save](images/code-editor-save.png)
117118
118-
119119
## Task 3: Start Deployment
120120
121121
1. Run the `start.sh` script
122-
```
122+
123+
```bash
123124
<copy>./start.sh</copy>
124125
```
125126
@@ -137,18 +138,17 @@ Estimated Time: 15 minutes
137138
138139
> Note: login credentials for the Data Science notebook are the same as the ones used to access Oracle Cloud Infrastructure.
139140
140-
141141
## Task 4: Accessing Notebook
142142
143143
Having just created our OCI Data Science environment, we need to install the necessary Python dependencies to execute our code. For that, we'll access our environment.
144144
145-
- The easiest way is to access into the notebook **through the URL** that we previously copied from Terraform's output.
145+
* The easiest way is to access into the notebook **through the URL** that we previously copied from Terraform's output.
146146
147147
![terraform output](images/start-sh-ssh.png)
148148
149149
If you have done it this way, make sure to **skip through to the next task**.
150150
151-
- (Optionally) We can also access to the notebook via the OCI console, on the top left burger menu:
151+
* (Optionally) We can also access to the notebook via the OCI console, on the top left burger menu:
152152
153153
![select data science](./images/select_data_science.png)
154154
@@ -168,51 +168,49 @@ Having just created our OCI Data Science environment, we need to install the nec
168168
169169
![jupyter environment](./images/notebook.png)
170170
171-
172171
## Task 5: Setting up Data Science Environment
173172
174173
We now need to load our notebook into our environment.
174+
175175
1. Opening a **Terminal** inside the _'Other'_ section the console and re-downloading the repository again:
176176
177177
![open terminal](./images/open_terminal.png)
178178
179179
2. Then, we re-clone the repository:
180180
181-
```
181+
```bash
182182
<copy>
183183
git clone --branch livelabs https://github.com/oracle-devrel/leagueoflegends-optimizer.git
184184
</copy>
185185
```
186186
187-
188-
189187
3. Install the conda environment
190188
191-
```
189+
```bash
192190
<copy>odsc conda create -n myconda</copy>
193191
```
194192
195193
![proceed](./images/proceed.png)
196194
197195
4. Activate the newly-created conda environment:
198196
199-
```
197+
```bash
200198
<copy>
201199
conda activate /home/datascience/conda/myconda_v1_0
202200
</copy>
203201
```
204202
205203
5. Install Python 3.8 within the conda environment:
206204
207-
```
205+
```bash
208206
<copy>
209207
conda install -y python=3.8
210208
</copy>
211209
```
212210
213211
6. Install Python dependencies:
214212
215-
```
213+
```bash
216214
<copy>
217215
pip install -r leagueoflegends-optimizer/deps/requirements_nn.txt
218216
</copy>
@@ -222,8 +220,6 @@ We now need to load our notebook into our environment.
222220
223221
After these commands, all requirements will be fulfilled and we're ready to execute our notebooks with our newly created conda environment.
224222
225-
226-
227223
## Task 6: Downloading DataSets
228224
229225
We now need to load our datasets into our environment. For that, we reuse the terminal we created in the previous step:
@@ -232,8 +228,7 @@ We now need to load our datasets into our environment. For that, we reuse the te
232228
233229
Then, we execute the following command, which will download all necessary datasets:
234230
235-
236-
```
231+
```bash
237232
<copy>
238233
wget https://objectstorage.eu-frankfurt-1.oraclecloud.com/p/wPITlcIlqhE3VuDjIxeXyqwWTUa8o96q5jy-6gBXSNhO4OKha1A1JetWozNFZIAZ/n/axywji1aljc2/b/league-hol-ocw-datasets/o/ocw_datasets.zip && unzip ocw_datasets.zip -d /home/datascience/.
239234
@@ -242,7 +237,6 @@ wget https://objectstorage.eu-frankfurt-1.oraclecloud.com/p/wPITlcIlqhE3VuDjIxeX
242237

243238
![unzip result](./images/unzip_result.png)
244239

245-
246240
## Task 7: Accessing our Notebooks
247241

248242
We should now see the repository / files in our file explorer:
@@ -253,7 +247,7 @@ We should now see the repository / files in our file explorer:
253247

254248
We navigate to the _`leagueoflegends-optimizer/notebooks/`_ directory and the notebook [_`neural_networks_lol.ipynb`_](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/notebooks/neural_networks_lol.ipynb) is the one we will review during this workshop.
255249

256-
Let's open both of them and get to work.
250+
Let's open both of them and get to work.
257251

258252
You may now [proceed to the next lab](#next).
259253

@@ -262,4 +256,4 @@ You may now [proceed to the next lab](#next).
262256

263257
* **Author** - Nacho Martinez, Data Science Advocate @ DevRel
264258
* **Contributors** - Victor Martin - Product Strategy Director
265-
* **Last Updated By/Date** - April 20th, 2023
259+
* **Last Updated By/Date** - May 31st, 2023

neural_networks_hero/the_problem/problem.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ This generated a lot of visualizations for me, that gave me an idea of what's ne
125125

126126
We can see that the loss of our ML model is low enough for our model to have taken the correct approach to predict the target variable. We can confirm that the model is telling us the most important variables by checking other models' predictions as well.
127127

128+
> **Note**: beware of **overfitting** if the validation metrics are too good!
129+
128130
As we can see, the model is able to deduce whether we're going to win or not by just looking at four or five weighted variables. By comparing these stats to what we already have in the Live Client API, we'll determine which variables we can use from that data structure to arrive at the conclusion.
129131

130132
Considering that we're working with time-dependent data, from the variables mentioned above, we can extract the same statistics (deaths, kills)... per minute. This will introduce the time dimension into our dataset:

neural_networks_hero/understand_nn/understand_nns.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ This is a huge renovation that happens in your brain.
2626
- By the time we're teens it's gone a long way, but it hasn't finished.
2727
- And the part of the brain that's considered to develop last (up until 25 years old) is the very front, whith happens to be the part of the brain that sort of makes us human.
2828

29-
The frontal cortex is a part of your brain that controls rational thought and reasoning
30-
31-
So, when a teenager is confronted with a decision, this rational area is slower at communicating with other parts of their brain.
32-
So those other parts end up taking the lead. Especially the amygdala.
33-
3429
## Task 1: What is a Neural Network
3530

3631
A neural network is a method in Machine Learning that *simulates* the human brain's way of thinking, and teaches computers how to process data in a way that *looks* human.
@@ -68,7 +63,7 @@ We'll also take a look at [another open-source tool](https://poloclub.github.io/
6863

6964
![recurrent](images/neural_network_visualization_1.gif)
7065

71-
The example that we can see in this Neural Network is very simple and only has one input layer, one hidden layer, and one output layer.
66+
The example that we can see in this Neural Network is very simple and only has one input layer, one hidden layer, and one output layer.
7267

7368
In cases like text or image analysis, things get a bit more complicated, and usually, several pre-built layers (groups of layers that work very well together) are used to analyze this kind of data (image, text):
7469

0 commit comments

Comments
 (0)