Restrucuted source files

This commit is contained in:
Deepthi Pathare
2021-05-10 13:23:45 +02:00
parent 88350876d8
commit eea9aa4eda
7 changed files with 310 additions and 410 deletions

21
uk_analysis.py Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import load_data as ld
import voting_analysis as va
# Load data
data = ld.load_uk_data().to_numpy()
X = data[:,2:]
# Train model
grid_h = 30 # Grid height
grid_w = 30 # Grid width
radius = 3 # Neighbour radius
step = 0.5
ep = 100 # No of epochs
model = va.train_model(X, grid_h, grid_w, radius, step, ep)
# Predict and visualize output
va.predict(model, data, grid_h, grid_w)