Пример #1
0
periodEnd = "23:59:59"
compress = 1
splitLen = 10
numTopics = 8

#validDays = [0, 1, 2, 3, 4, 5, 6]
validDays = [0, 2, 4]
tdMatrix = []
minBehaviour = 2

if __name__ == "__main__":
    
    #neighborclusters = ncluster.parse(neighborhoodLocation)
    
    splits = bbdata.makeSplitsSequential(5184, "2008-03-09 00:00:00", \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    skip = datetime.timedelta(minutes = 10))
    
    """
    #Create all splits (documents) used for TD matrix
    splits = bbdata.makeSplits(25, st, et, valid=validDays, \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    sPeriod = "07:50:00", \
                    ePeriod = "08:00:00")
                    
    splits += bbdata.makeSplits(25, st, et, valid=validDays, \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    sPeriod = "15:50:00", \
                    ePeriod = "16:00:00")
                    
    splits += bbdata.makeSplits(25, st, et, valid=validDays, \
Пример #2
0
dVector = []
times = []
lsaVector = []
splitLength = 8
skipLength = 1
numSplits = 50
i = 0

if __name__ == "__main__":

    files = os.listdir(modelLocation)
    neighborclusters = ncluster.parse(neighborhoodLocation)

    #Make splits
    splits = bbdata.makeSplitsSequential(numSplits, st, \
                            splitLen = datetime.timedelta(minutes = splitLength), \
                            skip = datetime.timedelta(minutes = skipLength))

    #Iterate over splits.
    for s in splits:
        print i
        i += 1
        oldSplit = datetime.datetime.strptime(s[0], "%Y-%m-%d %H:%M:%S")
        newSplit = datetime.datetime.strptime(s[1], "%Y-%m-%d %H:%M:%S")

        tmpDoc = []
        #Loop over all models
        for f in files:
            #It is a data file.
            if f.split('.')[-1] == 'dat':
                #Open it and grab the models and sensor list
Пример #3
0
periodEnd = "23:59:59"
compress = 1
splitLen = 10
numTopics = 8

#validDays = [0, 1, 2, 3, 4, 5, 6]
validDays = [0, 2, 4]
tdMatrix = []
minBehaviour = 2

if __name__ == "__main__":

    #neighborclusters = ncluster.parse(neighborhoodLocation)

    splits = bbdata.makeSplitsSequential(5184, "2008-03-09 00:00:00", \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    skip = datetime.timedelta(minutes = 10))
    """
    #Create all splits (documents) used for TD matrix
    splits = bbdata.makeSplits(25, st, et, valid=validDays, \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    sPeriod = "07:50:00", \
                    ePeriod = "08:00:00")
                    
    splits += bbdata.makeSplits(25, st, et, valid=validDays, \
                    splitLen = datetime.timedelta(minutes = splitLen),
                    sPeriod = "15:50:00", \
                    ePeriod = "16:00:00")
                    
    splits += bbdata.makeSplits(25, st, et, valid=validDays, \
                    splitLen = datetime.timedelta(minutes = splitLen),
Пример #4
0
dVector = []
times = []
lsaVector = []
splitLength = 8
skipLength = 1
numSplits = 50
i = 0

if __name__ == "__main__":

    files = os.listdir(modelLocation)
    neighborclusters = ncluster.parse(neighborhoodLocation)
    
    #Make splits
    splits = bbdata.makeSplitsSequential(numSplits, st, \
                            splitLen = datetime.timedelta(minutes = splitLength), \
                            skip = datetime.timedelta(minutes = skipLength))
    
    #Iterate over splits.
    for s in splits:
        print i
        i+=1
        oldSplit = datetime.datetime.strptime(s[0], "%Y-%m-%d %H:%M:%S")
        newSplit = datetime.datetime.strptime(s[1], "%Y-%m-%d %H:%M:%S")
        
        tmpDoc = []
        #Loop over all models
        for f in files:
            #It is a data file.
            if f.split('.')[-1] == 'dat':
                #Open it and grab the models and sensor list