Updated party colors & modified training params

This commit is contained in:
Deepthi Pathare
2021-06-25 15:24:09 +02:00
parent 065a3e2ce0
commit 7107b5547a
4 changed files with 15 additions and 16 deletions

View File

@@ -13,12 +13,12 @@ grid_h = 11 # Grid height
grid_w = 11 # Grid width
radius = 2 # Neighbour radius
step = 0.5 # Learning step
ep = 300 # No of epochs
ep = 500 # No of epochs
# Load data
dataset = ld.load_german_data()
period_to_compass_year = {17:2005, 18:2013, 19:2017}
period_to_compass_year = {17:2009, 18:2013, 19:2017}
for period, df in dataset.items():
@@ -31,5 +31,4 @@ for period, df in dataset.items():
model = va.train_model(X, grid_h, grid_w, radius, step, ep)
# Predict and visualize output
va.predict(model, data, grid_h, grid_w, de_name_color, pc.get_compass_parties(year=period_to_compass_year[period], country='de'))
va.predict(model, data, grid_h, grid_w, de_name_color, pc.get_compass_parties(year=period_to_compass_year[period], country='de'))