예제 #1
0
def main():
    print 'Main'
    data = DataExtractorFactory.getDataExtractor('expertmodel', 'data/')
    expertsData = data.getAllExpertsData()
    clusterer = UsersClustering(expertsData)
    clusterer.getExpertRegions('tech')
    '''
예제 #2
0
def main():
    print 'Main'
    dataDirectory = 'data/'
    start = time.time()
    data = DataExtractorFactory.getDataExtractor('expertisemodel', dataDirectory)
    expertUsersData = data.getAllExpertsData()
    region = Region((50, -125), (25.255, -60),center = (30,-60) ,expertise='vc')
    UsersData.addUserDataToRegions(expertUsersData)
    usersBucket = BucketUsers(region, 50)
    print time.time() - start,' is the time taken'
    usersBucket.printBuckets()
예제 #3
0
    def __init__(self, dataDirectory, dataExtractor=None):
        self._dictExpertiseRegions.clear()
        self._dictExpertModels.clear()
        self._dataDirectory = dataDirectory
        if dataExtractor == None:
            self._expertDataExtractor = DataExtractorFactory.getDataExtractor("expertisemodel", self._dataDirectory)
            self._expertDataExtractor.populateData(self._dataDirectory)
        else:
            self._expertDataExtractor = dataExtractor

        self._dictExpertUsersData = self._expertDataExtractor.getAllExpertsData()
        self._createParentRegions()
        UsersData.addUserDataToRegions(self._dictExpertUsersData)
 def __init__(self, dataDirectory):
     '''
     Constructor
     ''' 
     self._dataDirectory = dataDirectory
     self._dataExtractor = DataExtractorFactory.getDataExtractor('expertmodel', dataDirectory)
예제 #5
0
 def __init__(self, dataDirectory, cachedModelsFileName = ''):
     self._cachedModelsFileName = cachedModelsFileName
     self._dataDirectory = dataDirectory
     self._expertDataExtractor = DataExtractorFactory.getDataExtractor('expertmodel', dataDirectory)