mirror of
https://github.com/13hannes11/UU_NCML_Project.git
synced 2024-09-03 20:50:59 +02:00
Grid size chosen such that node count=5*sqrt(N), closes #20
This commit is contained in:
@@ -6,8 +6,9 @@ import voting_lib.voting_analysis as va
|
||||
import numpy as np
|
||||
|
||||
# Training Paramters
|
||||
grid_h = 2 # Grid height
|
||||
grid_w = 2 # Grid width
|
||||
# Grid size is chosen such that node count = 5*sqrt(N)
|
||||
grid_h = 11 # Grid height
|
||||
grid_w = 11 # Grid width
|
||||
radius = 2 # Neighbour radius
|
||||
step = 0.5
|
||||
ep = 300 # No of epochs
|
||||
@@ -15,7 +16,6 @@ ep = 300 # No of epochs
|
||||
# Load data
|
||||
dataset = ld.load_german_data()
|
||||
|
||||
|
||||
for period, df in dataset.items():
|
||||
|
||||
print("Election Period ", period)
|
||||
@@ -27,5 +27,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)
|
||||
|
||||
va.predict(model, data, grid_h, grid_w)
|
||||
Reference in New Issue
Block a user