Example #1
0
import scipy
import random

cwd = os.getcwd()

if os.path.exists('./result'):
    os.system('rm -rf result')

os.makedirs("result")

#How many beacons and best reference points?
howmanybestreferencepoints = 5
howmanybeacons = 2

#Generate test point coordinates
test_coordinate = lib.generateTest()

#Generate training point coordinates
training_coordinate = lib.generateRef()

#Import data distance estimation
fn = "%s/data/data-master-1.7-validation.xlsx" % (cwd)
dataAll = lib.importData(fn)

#Import RSI data test points
fnRSITest = "%s/data/AverageTesting.csv" % (cwd)
rsiDataTest = lib.genRSIData(fnRSITest)

#Import RSI data training points
fnRSITrain = "%s/data/AverageTraining.csv" % (cwd)
rsiDataTrain = lib.genRSIData(fnRSITrain)
Example #2
0
cwd = os.getcwd()

#File name for summary
sumfile = "summary.csv"

f = open(sumfile, 'w')
f.write('Titik,MAEX,MAEY\n')
f.close()
#xtrue,ytrue,xpred,ypred,x1,y1,r1,x2,y2,r2,x3,y3,r3
XTRUE = []
YTRUE = []
XPRED = []
YPRED = []

test_point = lib.generateTest()

points = np.arange(0, 156, 1)

for point in points:
    XTRUE.append(test_point[point][0])
    YTRUE.append(test_point[point][1])

    f = open("./result/res_titik_%s.csv" % (point), "r")
    next(f)

    deltaX = []
    deltaY = []

    print("Start processing the data for test point ", point)
    iterator = 1