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
|
import numpy as np
|
||||||
|
|
||||||
# Training Paramters
|
# Training Paramters
|
||||||
grid_h = 2 # Grid height
|
# Grid size is chosen such that node count = 5*sqrt(N)
|
||||||
grid_w = 2 # Grid width
|
grid_h = 11 # Grid height
|
||||||
|
grid_w = 11 # Grid width
|
||||||
radius = 2 # Neighbour radius
|
radius = 2 # Neighbour radius
|
||||||
step = 0.5
|
step = 0.5
|
||||||
ep = 300 # No of epochs
|
ep = 300 # No of epochs
|
||||||
@@ -15,7 +16,6 @@ ep = 300 # No of epochs
|
|||||||
# Load data
|
# Load data
|
||||||
dataset = ld.load_german_data()
|
dataset = ld.load_german_data()
|
||||||
|
|
||||||
|
|
||||||
for period, df in dataset.items():
|
for period, df in dataset.items():
|
||||||
|
|
||||||
print("Election Period ", period)
|
print("Election Period ", period)
|
||||||
@@ -28,4 +28,3 @@ for period, df in dataset.items():
|
|||||||
|
|
||||||
# Predict and visualize output
|
# 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