Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team B: Merge back into original repo #3

Open
wants to merge 238 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
f1d8a86
Add all existing data
Mar 11, 2019
7c454a6
Fetch logos for all houses
Mar 11, 2019
843314a
Add ESLint and Prettier for formatting
Mar 11, 2019
ff223e5
Start implementing formatter
Mar 11, 2019
518662c
Generate some intermediate data using formatter
Mar 11, 2019
54423bc
Implement more statistics for formatter
Mar 11, 2019
e70095e
Correct formatter output data
Mar 11, 2019
df78d23
Implement Python predictor framework
Mar 11, 2019
529116a
Add more instructions and requirements regarding predictor-neural
Mar 11, 2019
73bccb3
Fix issues related to character age
Mar 11, 2019
aea9ba4
Implement basic neural network predictor
Mar 11, 2019
b562334
Implement working predictions using neural network
Mar 11, 2019
14686e6
Add code management instructions to readme
Mar 12, 2019
fe18f3c
Make the Node utilities and config files shared between workers
Mar 14, 2019
d300118
Add worker to create family tree as DOT graph
Mar 14, 2019
62e2e33
Add summary about version 1 of neural network predictor to readme
Mar 14, 2019
21e7253
Rename predictor-neural to predictor-neural-v1
Mar 14, 2019
428b4fa
Merge pull request #1 from nalenz/family-tree
robertdillitz Mar 14, 2019
363c02e
Add summary about version 1 of neural network predictor to readme
Mar 14, 2019
9a8fe67
Rename predictor-neural to predictor-neural-v1
Mar 14, 2019
330fc11
Merge branch 'predictor-neural-v2' of https://github.com/nalenz/got.p…
Mar 15, 2019
344cf95
Create common directory for all neural predictors
Mar 15, 2019
de66e65
Implement version 2 of the neural network predictor
Mar 15, 2019
0396085
Slightly change model to predict up to 20 years into the future
Mar 15, 2019
f42089b
Added formatter for bayesean model input.
valentindimov Mar 15, 2019
fccf4ce
Make ESLint use ECMA version 2018
Mar 17, 2019
0d6f1d4
Move actual neural network input data formatter to formatter-neural i…
Mar 17, 2019
e09cc86
Create binary data and labels for v1 neural network
Mar 17, 2019
e01ebf8
Re-train v1 neural network
Mar 17, 2019
9552425
Fix small typo in readme
Mar 18, 2019
c8df737
Implement binary formatter for neural network in JavaScript
Mar 18, 2019
694ae32
Adjust Python predictor to use new binary format
Mar 18, 2019
cd709b3
Re-predict with v1 neural network
Mar 18, 2019
94d9659
Re-predict with v2 neural network
Mar 18, 2019
193ede7
Make all neural network data be zlib-deflated
Mar 18, 2019
a27aaa2
Update Keras log for v2 neural network
Mar 18, 2019
254f19b
Re-format code using ESLint and some manual edits
Mar 18, 2019
8093645
Merge pull request #2 from nalenz/predictor-neural-v2
robertdillitz Mar 18, 2019
cf6317c
Merge pull request #3 from nalenz/formatter-neural
robertdillitz Mar 18, 2019
225539a
Added more functionality to the formatter
valentindimov Mar 18, 2019
9daccc7
Slightly generalize neural network formatter
Mar 18, 2019
b51a1e4
Create formatter for v3 neural network
Mar 18, 2019
59dee53
Create Python predictor, model and predictions for v3 neural network
Mar 18, 2019
6cecdfb
Create training and prediction datasets for v3 neural network
Mar 18, 2019
226ba4c
Add description of v3 neural network to readme
Mar 18, 2019
7f3eefa
Merge pull request #4 from nalenz/predictor-neural-v3
robertdillitz Mar 18, 2019
fb17128
Removed some unneeded lines
valentindimov Mar 19, 2019
a5fd406
Fixed formatter to consider non-array "spouse" values
valentindimov Mar 20, 2019
3974528
Formatter will not save the name of the character in the training dat…
valentindimov Mar 20, 2019
d446086
Formatter now sets pageRank to 0 if missing.
valentindimov Mar 20, 2019
b08a4bf
forgot I uncommented this...
valentindimov Mar 20, 2019
0830a0a
Added check for apparent age over 150 (which likely means an error in…
valentindimov Mar 21, 2019
8105a96
changed age limit to 100
valentindimov Mar 21, 2019
7c13d9a
increased age limit for living characters to 120, since the oldest de…
valentindimov Mar 21, 2019
49201d2
Added bayesean predictor (still some things to fix though)
valentindimov Mar 21, 2019
ca7b64b
Predictor sort of works now. Still a lot of polishing to do.
valentindimov Mar 21, 2019
5b9d68c
Fixed divergences, updated model to work with multiple parameters.
valentindimov Mar 22, 2019
73f08fd
small cosmetic change
valentindimov Mar 22, 2019
d532145
pred_bayesean.py will now use log of the pageRank
valentindimov Mar 22, 2019
95e8fd1
bayesean formatter will use the double-log of the pageRank instead of…
valentindimov Mar 22, 2019
5ad5261
forgot to rename pageRank to pageRankLog
valentindimov Mar 22, 2019
05d2edd
Added some functions to pred_bayesean.py
valentindimov Mar 22, 2019
4f93416
added name back to formatter
valentindimov Mar 25, 2019
2c2f81a
Update ESLint dependency
Mar 25, 2019
63eec70
Update all show data as of March 25, 2pm
Mar 25, 2019
2087548
Add documentation and loadShowData to common utils
Mar 25, 2019
38aad02
Add some JS utility functions
Mar 25, 2019
70791be
Add formatter-show main script
Mar 25, 2019
cb5e4aa
Add output data of formatter-show
Mar 25, 2019
5da9376
Add formatter-neural-show main script
Mar 25, 2019
74edacf
Add output data of formatter-neural-show
Mar 25, 2019
2c785ef
Adjust Python utilities to work with book and show
Mar 25, 2019
3e57712
Add v1 of neural network show predictor
Mar 25, 2019
67710fe
Add model and predictions of v1 neural network show predictor
Mar 25, 2019
695e5b1
Add presentation as of March 26, 2019
Mar 25, 2019
35ca288
Fixed survival function in the Bayesean predictor.
valentindimov Mar 26, 2019
ba25849
Commented out parts of the formatter that need reworking
valentindimov Mar 26, 2019
2822070
moved the formatting into a separate function to allow exporting
valentindimov Mar 26, 2019
b482bb0
Added a callback to signal async completion
valentindimov Mar 26, 2019
ac00fda
Fixed bug related to heirs (cause there are no dead heirs, duh...)
valentindimov Mar 26, 2019
7865d58
Updated the Python predictor script to write its output to a JSON fil…
valentindimov Mar 26, 2019
dfe5b69
Moved Python predictor script to its own directory.
valentindimov Mar 26, 2019
9c347fa
Merge pull request #5 from nalenz/formatter-show
robertdillitz Mar 26, 2019
c6ca930
Formatter will only add flags for houses with over 20 suitable charac…
valentindimov Mar 26, 2019
ed83e7c
Locations considered only if at least 50 suitable characters have vis…
valentindimov Mar 26, 2019
aeda50d
Small changes to formatter and learning script
valentindimov Mar 26, 2019
96b2e7c
Some small updates to the model. Formatter now also includes popular …
valentindimov Mar 27, 2019
dd7ab56
The prediction files changed...
valentindimov Mar 27, 2019
9080e94
Added formatter for bayesean model input.
valentindimov Mar 15, 2019
0bb329c
Re-format code using ESLint and some manual edits
Mar 18, 2019
63f9b3a
Added more functionality to the formatter
valentindimov Mar 18, 2019
f2e9310
Removed some unneeded lines
valentindimov Mar 19, 2019
7ac46ac
Fixed formatter to consider non-array "spouse" values
valentindimov Mar 20, 2019
637855b
Formatter will not save the name of the character in the training dat…
valentindimov Mar 20, 2019
17102b9
Formatter now sets pageRank to 0 if missing.
valentindimov Mar 20, 2019
eab3881
forgot I uncommented this...
valentindimov Mar 20, 2019
75017bc
Added check for apparent age over 150 (which likely means an error in…
valentindimov Mar 21, 2019
d4e37b9
changed age limit to 100
valentindimov Mar 21, 2019
08a3881
increased age limit for living characters to 120, since the oldest de…
valentindimov Mar 21, 2019
b9a4e1a
Added bayesean predictor (still some things to fix though)
valentindimov Mar 21, 2019
001408a
Predictor sort of works now. Still a lot of polishing to do.
valentindimov Mar 21, 2019
c200777
Fixed divergences, updated model to work with multiple parameters.
valentindimov Mar 22, 2019
bf3729c
small cosmetic change
valentindimov Mar 22, 2019
636f986
pred_bayesean.py will now use log of the pageRank
valentindimov Mar 22, 2019
bdba662
bayesean formatter will use the double-log of the pageRank instead of…
valentindimov Mar 22, 2019
a6f6554
forgot to rename pageRank to pageRankLog
valentindimov Mar 22, 2019
5537aa9
Added some functions to pred_bayesean.py
valentindimov Mar 22, 2019
d3319ba
added name back to formatter
valentindimov Mar 25, 2019
c22f9cd
Fixed survival function in the Bayesean predictor.
valentindimov Mar 26, 2019
2f7609c
Commented out parts of the formatter that need reworking
valentindimov Mar 26, 2019
74775da
moved the formatting into a separate function to allow exporting
valentindimov Mar 26, 2019
430520a
Added a callback to signal async completion
valentindimov Mar 26, 2019
74e2abd
Fixed bug related to heirs (cause there are no dead heirs, duh...)
valentindimov Mar 26, 2019
04d3135
Updated the Python predictor script to write its output to a JSON fil…
valentindimov Mar 26, 2019
c581249
Moved Python predictor script to its own directory.
valentindimov Mar 26, 2019
1bea02c
Formatter will only add flags for houses with over 20 suitable charac…
valentindimov Mar 26, 2019
d843333
Locations considered only if at least 50 suitable characters have vis…
valentindimov Mar 26, 2019
40ffbda
Small changes to formatter and learning script
valentindimov Mar 26, 2019
2fe2a7d
Some small updates to the model. Formatter now also includes popular …
valentindimov Mar 27, 2019
8dcce75
The prediction files changed...
valentindimov Mar 27, 2019
9e04cc7
Merge branch 'bayesean_formatter' of https://github.com/nalenz/got.pr…
valentindimov Mar 27, 2019
31a4f40
Changed formatter up a bit.
valentindimov Mar 27, 2019
3af4df0
Refactored the formatter for old book data.
valentindimov Mar 27, 2019
cf64807
Removed the callback, as an async function does not need a callback t…
valentindimov Mar 27, 2019
74c872e
Added the first year of the GoT show as a config parameter
valentindimov Mar 28, 2019
dd1f2c9
fml
valentindimov Mar 28, 2019
5a0b372
I should stop committing broken shit...
valentindimov Mar 28, 2019
d484b05
Added (not yet finished) formatter for show data.
valentindimov Mar 28, 2019
51e38ec
Add presentation as of March 28, 2019
Mar 28, 2019
5ea5d5c
Add presentation as of March 29, 2019
Mar 31, 2019
613f1b6
Merge pull request #6 from nalenz/presentation-backups
robertdillitz Mar 31, 2019
1e233a4
Generated new output format for group A
valentindimov Mar 31, 2019
afabb82
Merge branch 'bayesean_formatter' of https://github.com/nalenz/got.pr…
valentindimov Mar 31, 2019
72efddd
Updated output
valentindimov Mar 31, 2019
6575ff7
Added JavaScript program to run statistics on the predictions.
valentindimov Mar 31, 2019
04195af
Added function to transform the Python-generated JSON to a JSON for T…
valentindimov Mar 31, 2019
330674d
Removed script output files from repo
valentindimov Mar 31, 2019
6e31737
Refetched show data
valentindimov Apr 1, 2019
21e6326
Updated the show data formatter.
valentindimov Apr 1, 2019
e8f6811
More parameters to book formatter
valentindimov Apr 1, 2019
5289806
Added scripts for the show data. Small tweaks.
valentindimov Apr 2, 2019
f599193
Updated downloaded data
valentindimov Apr 2, 2019
cae6d64
Completely update book data
Apr 2, 2019
e210140
Keep book data from old API for reference in separate directory
Apr 2, 2019
793c1dc
Minimally update show data
Apr 2, 2019
06aacc7
Remove various old datasets
Apr 2, 2019
e13ac36
Add some sanitization functions to JS utils
Apr 2, 2019
52f154b
Update book formatter to work with new data format
Apr 2, 2019
74640bc
Update all output files of the book formatter
Apr 2, 2019
c960d22
Add links to final neural network predictions to readme
Apr 2, 2019
f079fa9
Distinguish between current book and show year, adjust prediction scr…
Apr 2, 2019
1a20b2c
Add updated formatted book data with correct allegiances and ages
Apr 2, 2019
52e2362
Re-create neural network input files for v2
Apr 2, 2019
d35e49a
Re-train v2 model and re-create its predictions
Apr 2, 2019
fd69b11
Add instructions on how to create book predictions to readme
Apr 2, 2019
33d34da
Edit book predictor to use validation data
Apr 2, 2019
1cc69fe
Move old book neural network elaborations to separate archive file
Apr 2, 2019
152d7dd
Update main readme to include short final book neural network elabora…
Apr 2, 2019
49f60f8
Re-train book model with validations
Apr 2, 2019
6194dff
Edit show formatter to use birth dates from book as fallback
Apr 2, 2019
bab83ea
Shuffle show training data to improve validation, add pageRank to sho…
Apr 2, 2019
e3a819f
Minimally change book formatter to use different order when normalizi…
Apr 2, 2019
31f7587
Re-create show formatter output
Apr 2, 2019
57b3360
Re-create show neural network formatter output
Apr 2, 2019
7a0e2b1
Re-train show neural network and update predictions
Apr 2, 2019
3c70449
Add information about neural network show predictions to readme
Apr 2, 2019
e413bae
Merge pull request #7 from nalenz/updated-show-data
nalenz Apr 2, 2019
2d15c91
Update book character data after missing gender have been fixed
Apr 2, 2019
de0c229
Add correct check for gender in book formatter
Apr 2, 2019
2daf8df
Update all book predictions with correct genders
Apr 2, 2019
062cabf
Update neural network book prediction accuracies in readme
Apr 2, 2019
f2d7ef1
Merge pull request #8 from nalenz/updated-book-data
robertdillitz Apr 2, 2019
0edf5dc
Refactored some stuff. Now the entire process is executable through e…
valentindimov Apr 3, 2019
c9b5d25
ihategit.exe
valentindimov Apr 3, 2019
a1dab40
Merge branch 'bayesean_formatter' of https://github.com/nalenz/got.pr…
valentindimov Apr 3, 2019
74c40ad
All should work now. To run a full format/predict/postprocess loop, do:
valentindimov Apr 3, 2019
98228cf
Removed unnecessary files.
valentindimov Apr 3, 2019
4411d8b
Add Request library to Node dependencies
Apr 3, 2019
a3f14d1
Add utility function to load book and show predictions
Apr 3, 2019
38c11d1
Add basic API update call
Apr 3, 2019
d67bf5f
Update show data
Apr 3, 2019
c343286
Update show data
Apr 3, 2019
328a43c
Merge pull request #9 from nalenz/bayesean_formatter
nalenz Apr 3, 2019
0311411
Add Request library to Node dependencies
Apr 3, 2019
c394540
Add utility function to load book and show predictions
Apr 3, 2019
e191909
Add basic API update call
Apr 3, 2019
992cae8
Update character data to include newly added predictions
Apr 3, 2019
2055a53
Add API base URL to JS config file
Apr 3, 2019
bd13530
Add the APIUpdater to the JS utils
Apr 3, 2019
afaf8a7
Edit simple prediction updater to update everything
Apr 3, 2019
6fad37d
Resolve merge conflicts
Apr 3, 2019
003c74f
Update ESLint dependency to 5.16.0
Apr 3, 2019
a814f65
Updated book formatter to deal with new data
valentindimov Apr 4, 2019
a71f748
Formatters will use the slug for the name now
valentindimov Apr 4, 2019
98d20fb
Postprocessors make a dict of characters instead of an array
valentindimov Apr 4, 2019
46f7a87
OK, guess we're not using slugs then.
valentindimov Apr 4, 2019
0362a69
Added some indent to allow postprocessed output to be read
valentindimov Apr 4, 2019
4ffc0ce
Prediction uploader for the Bayesean predictions
valentindimov Apr 4, 2019
c5c02c8
Updated so that attributes + influence could be uploaded
valentindimov Apr 4, 2019
1eae8c7
Some minor fixes
valentindimov Apr 4, 2019
436ed38
Update book and show data and re-predict everything using the neural …
Apr 4, 2019
13e780f
Temporarily remove unnecessary output from predictor scripts
valentindimov Apr 4, 2019
f7cd6f0
Update formatter-neural v2 training data
Apr 4, 2019
c4f65af
Update README.md
robertdillitz Apr 5, 2019
767132b
Added POST of Bayesean attributes + influences
valentindimov Apr 5, 2019
217300b
updated bayesean PLOD-s to be a percentage
valentindimov Apr 5, 2019
a6fa4de
Added a shell script to completely rerun Bayesean predictions
valentindimov Apr 5, 2019
1d6a3b3
Fixed some errors in uploader
valentindimov Apr 5, 2019
259f431
Small model tweaks
valentindimov Apr 5, 2019
ba45bac
retrained bayesean model
valentindimov Apr 5, 2019
2562489
fixed slicing of longevity arrays in Bayesean uploader
valentindimov Apr 5, 2019
da3ad4c
changed threshold for pageRank of major book characters
valentindimov Apr 5, 2019
3641645
refetched data
valentindimov Apr 5, 2019
8c4fa35
Update book and show data
Apr 5, 2019
4f009fb
Recreated book predictions, as many page ranks have changed
Apr 5, 2019
6d24df7
Update all show predictions to use age as a way to calculate the birt…
Apr 5, 2019
c2fc730
Update show predictions to use correct birth date calculation
Apr 5, 2019
ea5fa22
Merge pull request #10 from nalenz/uploader-predictions
nalenz Apr 6, 2019
3183455
Remove GoT season 8 image from readme
Apr 6, 2019
4e6e727
Update to Bayesean show formatter (added some features)
valentindimov Apr 6, 2019
95eeb3d
Data update
valentindimov Apr 6, 2019
da91dab
added isBastard flag to show Bayesean formatter
valentindimov Apr 6, 2019
07c136f
Data update
Apr 7, 2019
e39aa27
Add is bastard and numCommandedBattles to show predictions and retrai…
Apr 7, 2019
3913f1e
Add output of single PLOD objects to neural network predictors
Apr 7, 2019
a5a8708
Add some more setup info to readme
Apr 7, 2019
e30da0e
Added uploader solely for Bayesean Attributes
valentindimov Apr 7, 2019
789d118
Added docu to the bayesean model
valentindimov Apr 7, 2019
604eb68
Updated the Bayesean shell script
valentindimov Apr 7, 2019
08de61f
Fix to Bayesean shell script
valentindimov Apr 7, 2019
a5f6cb3
Update book and show data
Apr 8, 2019
952915c
Update readme to improve style and add further explanations
Apr 8, 2019
1c38d61
Improve style and refactor code for Bayesian model
Apr 8, 2019
8353064
Add PLOD overview from group D
Apr 8, 2019
78ed1ed
Update datasets as of Apr 11
Apr 11, 2019
06e46a0
Create top-most-similar-alive-dead.txt
robertdillitz Apr 12, 2019
b8cf250
Fixed some code in the bayesian book formatter
valentindimov Apr 19, 2019
488dcec
Set the sample/tuning steps nr. in bayesian scripts to correct values
valentindimov Apr 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"plugins": ["prettier"],
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "all"
}
],
"eqeqeq": ["error", "smart"],
"no-console": "off"
},
"env": {
"node": true,
"es6": true
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

__pycache__
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 140,
"trailingComma": "all",
"singleQuote": true,
"ignorePath": ".gitignore",
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"eslint.options": { "configFile": ".eslintrc.json" },
"eslint.nodePath": "node_modules/.bin/eslint",
"prettier.eslintIntegration": true,
"eslint.autoFixOnSave": true,
}
86 changes: 85 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,85 @@
# got.predictions
# got.predictions

## Setup

To run the code in this repository, Node (at least version 10) is needed. Additionally, to run the predictor workers, make sure that Python (at least version 3.5) is installed and that you have the dependencies (i.e. run `pip3 install -r workers/predictors-bayesian/requirements.txt` and `pip3 install -r workers/predictors-neural/requirements.txt`). The code in this repository was only tested using Ubuntu 16.04.

Please run `npm install` after cloning the repository to install all dependencies or when the dependencies changed after pulling. Afterwards, use Visual Studio Code as your IDE to immediately start working with ESLint and Prettier being directly integrated then.

Note that this repository consists of two different models which both aim for predicting the likelihood of death/survival of GoT characters. Their usage is explained in the following.

## Using the Bayesean model

The Bayesean model can be used as follows:

1. If you need to, refetch the data by running `./refetch.sh` in `data/book` and `data/show`.
2. Run `node workers/formatter-bayesean-book` and `node workers/formatter-bayesean-show`. They will read out the features for training used for data and will generate a JSON file in their own directory (`training_book_characters.json` or `training_show_characters.json`).
3. Run the predictor scripts in `workers/predictors-bayesian/predictor-bayesean-book` and `workers/predictors-bayesian/predictor-bayesean-show`. This can be done directly (`python3 workers/predictors-bayesian/predictor-bayesean-book/predictor.py`) or using Node (`node workers/predictors-bayesian/predictor-bayesean-book`).
4. The predictors will produce an output JSON in their own directory (`book_predictor_output.json`, `show_predictor_output.json`). Run the postprocessors to filter out dead characters and the unnecessary data: `node workers/postprocessor-bayesean-book`, `node workers/postprocessor-bayesean-show`.
5. To upload the predictions to the website, use `node workers/uploader-predictions-bayesean`. To upload only the attributes used and their average influences, use `node workers/uploader-attributes-bayesean`.

## Using neural networks

For creating the book predictions yourself, several steps are needed:

1. Format the data into an intermediate JSON format by running `node workers/formatter`.
2. Create a zlib-inflated chunk of neural network data by running `node workers/formatter-neural/index-v2.js`.
3. Edit the file `workers/predictors-neural/predictor-neural-v1/predictor.py` to have `if True:` in line 28, then run it using `./predictor.py`.
4. Change that line back to `if False:`, then run that script again using `./predictor.py`. The final predictions can now be found in `workers/predictors-neural/predictor-neural-v2/output/predictions.json`.
5. To upload the predictions to the website, use `node workers/uploader-predictions`.

The process for creating the show predictions is almost identical, just use the `formatter-show`, `formatter-neural-show` and `predictors-neural/predictor-neural-show-v1` worker directories, in that order.

## Code management

### Creating new branches

To create a new branch to add your changes to, please execute the following commands and replace `my-new-branch` by the desired name of your branch.

1. `git checkout master`
2. `git checkout -b my-new-branch`
3. `git push origin my-new-branch`
4. `git push --set-upstream origin my-new-branch`

## Neural network predictions

- book
- [PLOS for characters from years 300 to 320](workers/predictors-neural/predictor-neural-v2/output/predictions.json)
- [single PLOD only](workers/predictors-neural/predictor-neural-v2/output/predictions-plod.json)
- show
- [PLOS for characters from years 305 to 325](workers/predictors-neural/predictor-neural-show-v1/output/predictions.json)
- [single PLOD only](workers/predictors-neural/predictor-neural-show-v1/output/predictions-plod.json)

### Book predictions

- number of characters: 484
- used for training (i.e. dead): 188, predicted on (i.e. alive): 296
- number of training datapoints: 18800
- used for training itself: 15040, used for validation: 3760
- final training accuracy: 88.75%, final validation accuracy: 89.92% (from [Keras log](workers/predictors-neural/predictor-neural-v2/models/keras-log))
- number of dimensions per datapoint: 1561
- scalar values
- male: 1, page rank (normalized): 1, number of relatives (normalized): 1
- one hot vectors
- age: 100, culture: 57, house: 360, house region: 29
- multiple hot vectors
- allegiances: 396, books: 19, locations: 82, titles: 515
- number of output dimensions: 1
- 1.0 if alive, 0.0 otherwise

### Show predictions

- number of characters: 146
- used for training (i.e. dead): 82, predicted on (i.e. alive): 64
- number of training datapoints: 7052
- used for training itself: 6346, used for validation: 706
- final training accuracy: 81.00%, final validation accuracy: 84.56% (from [Keras log](workers/predictors-neural/predictor-neural-show-v1/models/keras-log))
- number of dimensions per datapoint: 413
- scalar values
- male: 1, is bastard: 1, page rank (normalized): 1, number of relatives (normalized): 1, number of commanded battles (normalized): 1
- one hot vectors
- age: 86
- multiple hot vectors
- allegiances: 130, appearances: 74, titles: 118
- number of output dimensions: 1
- 1.0 if alive, 0.0 otherwise
Loading