Grid size chosen such that node count=5*sqrt(N), closes #20

This commit is contained in:
Deepthi Pathare
2021-05-18 14:07:55 +02:00
parent 3dafda0ed7
commit d41a9b3a85

View File

@@ -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)
@@ -28,4 +28,3 @@ for period, df in dataset.items():
# Predict and visualize output
va.predict(model, data, grid_h, grid_w)