Esempio n. 1
0
from readData import readAllData
from Preprocess import lowPassFilter
from Visualize import Visualize
import copy
data = readAllData("H:\TaxiNetwork\DriverSafty\DriverSafty\data_7_31\data")
X = {}
for d in data:
    X[d] = copy.copy(data[d]["a1"])
    X[d] = lowPassFilter(X[d])
del data


Esempio n. 2
0
    end = 0
    d = []
    for i in xrange(len(data)-1):
        if isZero(data[i],data[i+1]):
            print start,end
            if end -start >=step:
                d.append(data[start:end])
            start = end
        else:
            end = i
    if end -start >=step:
        d.append(data[start:end])
    return d

data = readData("data/turn/Turn1.csv")
sf = lowPassFilter(data["AX"],0.02)
#d,vars,means = splitData(sf.tolist())
#newD = merge(d,vars,means)
#print len(newD)
#for line in newD:
#    print len(line)
newD = splitData2(sf)
for line in newD:
    print len(line)
data = readData("data/turn/Turn3.csv")
sf = lowPassFilter(data["AX"],0.02)
for line in splitData2(sf):
    newD.append(line)
for line in newD:
    sim = []
    for line2 in newD: