DL Group Exercise 1 (1)
DL Group Exercise 1 (1)
1. Settle down with your groups. Make sure each machine in your
row(s) is working. If not, write to itsupport@tbcollege.com for
help. Make sure each machine has a Lockdown Browser and it is
working. Make sure each machine has Python, Keras, Tensorflow
and Jupyter (alternatively you can use Google Colab) All graded
in-class quizzes will happen using the in-class terminal (no
personal laptops) and will use the lockdown browser.
2. In the group, discuss and research the risks of Deep Learning.
Identify 4 current and 4 future risks. Suggest one possible solution
for each risk identified.
3. Work on the following questions of deep learning individually with
help from the group if needed. You only need to submit as a group
(however, I would recommend you to try them individually as
well, they will significantly test/enhance your understanding of
the foundational concepts)
©
Instructor: Bhavik Gandhi
Q1 For the below network compute the following (biases are added to
each hidden and output node)
Compute the first pass forward propagated values of the hidden and
output nodes if
1. Activation function is sigmoid
2. Activation function is tanh
3. Activation function is linear
4. Activation function is pReLU with parameter of 0.2
5. Activation function is LeakyReLU
©
Instructor: Bhavik Gandhi
Q2. Determine the number of hidden nodes and the number of
parameters learnt for the following neural networks with bias nodes
(unless otherwise mentioned)
a. Neural Network with input of size 200 and 2 hidden layers of sizes
50 and 15 respectively and 1 output node using Sigmoid on all
layers
b. Neural Network with input of size 200 and 2 hidden layers of sizes
50 and 15 respectively and 1 output node using Sigmoid on all
hidden layers but Softmax on the output layer
c. Neural Network with input of size 200 and 2 hidden layers of sizes
50 and 15 respectively and 5 output nodes using Sigmoid on all
layers without any biases
d. Neural Network which takes data with 20 numerical features and
10 categorical features with total cardinality of 120 and has 2
hidden layers of sizes 35 and 6 respectively and 1 output node
using tanh on all hidden layers but Softmax on the output layer
e. Neural Network which takes data with 20 numerical features and
10 categorical features with cardinality of 120 each but the data
has 10% missing values and the network has 2 hidden layers of
sizes 35 and 6 respectively and 1 output node using tanh on all
hidden layers but Softmax on the output layer
f. Neural Network with input of 5000 records of text with 20 words
on average and 30 words at max with a total of 20000 unique
words and 6 hidden layers of sizes 30000, 6000, 1200, 240, 48 and
6 respectively and 1 output node using ReLU on all layers
g. Neural Network with 10k images as records in hd resolution and 2
hidden layers of sizes 10000 and 100 respectively and 1 output
node using ReLU on hidden layers but Softmax on the output layer
h. Neural Network with 20k images as records in fhd resolution and 2
hidden layers of sizes 20000 and 200 respectively and 1 output
node using Linear on hidden layers but Softmax on the output
layer
©
Instructor: Bhavik Gandhi
Q3.
©
Instructor: Bhavik Gandhi
Q4 Goodness of Fit
A. For each of the below confusion matrices compute below details
a. Accuracy
b. Precision
c. Recall
d. Sensitivity
e. Specificity
f. F1 score
g. F2 score
h. F0.5 score
i. Null error rate
j. Balanced accuracy
k. Positive prevalence
l. Negative predictive value
– less commonly used
m. Miss rate
n. Fall out
o. False discovery rate
p. False omission rate
q. Positive likelihood ratio
r. Type I error rate
s. Type II error rate
t. Diagnostic odds ratio
1.
Observed
+ve -ve
Predicted
©
Instructor: Bhavik Gandhi
3. While detecting Negative Sentiment
Observed
Negative Non-negative
B. For the below data compute the SSR, MSR, RMSE and MAE for the given model M0
x1 x2 y' y
53.7 18 59
28.5 17 56
21.5 12 41
-12 -4 -7
-12 -31
10.5 26
8.7 287 17
©
Instructor: Bhavik Gandhi
C. For the below data trying to identify Fraud, determine
a. TP
b. FP
c. TN
d. FN
e. Negative Prevalence
Actual Predicted
Fraud Fraud
Non-fraud Non-Fraud
Non-Fraud Non-Fraud
Fraud Non-Fraud
Non-Fraud Non-Fraud
Non-Fraud Non-Fraud
Non-Fraud Non-Fraud
Fraud Non-Fraud
Non-Fraud Non-Fraud
D. For the below model perf determine the area under the RoC curve
TPr = eFPr+FPr3-3/2FPr-1/2
©
Instructor: Bhavik Gandhi