You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tensor-GOT-Polymer/index.html
+54-59Lines changed: 54 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -99,23 +99,24 @@ <h2>Data analysis</h2>
99
99
During this 0 point we will serve as company for Tensorflow Codelab based on Game of Thrones Data, in order to provide a Neural Network model to classify the probability of Death of Game of Thrones characters with wide+deep model .
100
100
There is some data theory we will dive in when implementing the model, but first we will dig a little bit in the data in order to know more about the behaviour of our dataset </p>
You can download the data from the button below. The original dataset has been released in Kaggle and we have been filling the information in Game of Thrones wiki focusing on title, culture . </p>
<p>You can download the data from the button below. The original dataset has been released in Kaggle and we have been filling the information in Game of Thrones wiki focusing on title, culture . </p>
104
104
<p>
105
105
<imgsrc="Table1.jpg" alt="Data">
106
106
107
-
In one first approach of the dataset we extract the following useful information about the dataset, wich we consider a significant first approach for finding correlations and relationships in between variables
108
-
NUMBER OF CHARACTERS : 1946
109
-
MEDIAN OF AGE : 27
110
-
CORRELATION BETWEEN Number of Death Relationships and Popularity : 0.663 </p>
107
+
In one first approach of the dataset we extract the following useful information about the dataset, wich we consider a significant first approach for finding correlations and relationships in between variables </p>
108
+
109
+
<p> NUMBER OF CHARACTERS : 1946 </p>
110
+
<p> MEDIAN OF AGE : 27 </p>
111
+
<p>CORRELATION BETWEEN Number of Death Relationships and Popularity : 0.663 </p>
111
112
<p>
112
113
Here we have some graphics that show correlation among data , having into account that most of them show relationships in between popularity and other characteristics .
113
114
<imgsrc="1_CultureGOT.png" alt="Culture Analysis"> Game of Thrones character ecosystem shows a diverse culture approach that prints a diverse atmosphere , without a doubt it really brings to the table a rich atmosphere to enjoy. Among all cultures, the most significant are Valyrian - as House Targaryen members- , Northmen -like watchmen -that has the highest value in culture with 143 characters, and Andals - like House Lannister.
114
115
<imgsrc="histogram_pop.jpg" alt="Histogram of popularity">On this first approach of Histogram of popularity , more than 750 characters , about 40 % are ranged with 0 popularity ; being the most popular character listed – less than 20 , about a 1.02 % - the following, described together within .
115
116
However, the median of popularity is 0.03344
116
117
Below we show a comparative table in between the top 10 popular characters and the top 10 probability likelihood of Death, can you find any relationship in between it?
117
118
As a comparative conclusion, we might underline the popularity of Baratheons and Starks and their absence from the high probability of death and the amounts of Targaryens that seems to be related with life ending situations.
<p>Categorical variables are also known as discrete or qualitative variables. Categorical variables can be further categorized as either nominal, ordinal or dichotomous. Nominal variables are variables that have two or more categories, but which do not have an intrinsic order.
202
203
Continuos variables are those that refers to continuous values such as numbers </p>
m = tf.contrib.learn.LinearClassifier(model_dir=model_dir,
242
+
feature_columns=wide_columns)
238
243
</code></pre>
239
244
</google-codelab-step>
240
245
<google-codelab-step
@@ -246,36 +251,30 @@ <h2>Deep layer</h2>
246
251
<p>Generalization - Deep Model- the model is a Feedfoward neural network that works with categorical features . there exist Transitivity of correlation and explores feature combinations that have never or rarely occurred in the past. It improves the diversity of recommended items . This generalization can be added by using features that are less granular .
247
252
So at the end this model is great for combining two different models of classification using neural Networks. You can see how this model has been working with </p>
248
253
<h2>Deep layer</h2>
249
-
<p>Embeddings are mathematical abstractions of categorical data. Their main purpose is to find relationships in between the data and show them in a 3 dimensional space.
250
-
Tensorflow has released its own playground for embeddings using words and image data . You can find it here . </p>
<h2>Combining wide and deep learning model into one</h2>
270
266
<p>The wide models and deep models are combined by summing up their final output log odds as the prediction, then feeding the prediction to a logistic loss function. All the graph definition and variable allocations have already been handled for you under the hood, so you simply need to create a DNNLinearCombinedClassifier: </p>
267
+
<p> In this case, there are two layers with 100 and 50 neurons each. You can select your own number of layers and neurons </p>
271
268
<pre><code>
272
-
import tempfile
273
-
model_dir = tempfile.mkdtemp()
274
-
m = tf.contrib.learn.DNNLinearCombinedClassifier(
275
-
model_dir=model_dir,
276
-
linear_feature_columns=wide_columns,
277
-
dnn_feature_columns=deep_columns,
278
-
dnn_hidden_units=[100, 50])
269
+
else:
270
+
m = tf.contrib.learn.DNNLinearCombinedClassifier(
271
+
model_dir=model_dir,
272
+
linear_feature_columns=wide_columns,
273
+
dnn_feature_columns=deep_columns,
274
+
dnn_hidden_units=[100, 50],
275
+
fix_global_step_increment_bug = True,
276
+
)
277
+
return m
279
278
</code></pre>
280
279
</google-codelab-step>
281
280
<google-codelab-step
@@ -306,14 +305,10 @@ <h2>Conclusions</h2>
306
305
The best result of the model is pasted with the accuracy as follows :
307
306
308
307
309
-
You can help us with the results of changing the model, generalizing in our two main hypothesis :
308
+
You can help us with the results of changing the model, generalizing in hypothesis :
310
309
311
-
In the model, if you increases the hidden layers, the accuracy of the model …………..
312
-
In the model, changing the activation function from ……………………. To ………………. increases/decreases accuracy in ………….
313
-
314
-
Please, fill your model conclussions in this form
315
-
316
-
There is still work to do to optimize this codelab.
310
+
In the model, if you increase the hidden layers and combine the number of neurons , the accuracy of the model increases or decreases? .
311
+
Please, fill your model conclussions in this <ahref="https://docs.google.com/forms/d/1QLNq6nxWIJRuO-JiK3wgnLaeW2X3wbFS1edzzj59cLQ/edit" target="_blank" rel="noopener">Form</a>
317
312
Take this feedback form to tell us more about how useful it was and dig into it if you want to know more </p>
318
313
319
314
<imgsrc="5_Comic.png" alt="TensorFlow Game of Thrones">
0 commit comments