def __init__(self, init_params): self.config = init_params['config'] self.project_directory = init_params['project_directory'] self.math = math.Math() self.location_data = (scipy.sparse.load_npz( self.project_directory + self.config.get("PREPROCESSED-DATA", "location_features")) ).todense()
def __init__(self, init_params, data): self.config = init_params['config'] self.app_mode = init_params['app_mode'] self.project_directory = init_params['project_directory'] self.cache = cache.Cache( self.config.get("CACHE", "host"), int(self.config.get("CACHE", "port")) ) self.math = math.Math() self.maps = self.generate_maps() self.data = data
def __init__(self, init_params, data, image_location_map): self.config = init_params['config'] self.app_mode = init_params['app_mode'] self.project_directory = init_params['project_directory'] self.cache = cache.Cache(self.config.get("CACHE", "host"), int(self.config.get("CACHE", "port"))) self.math = math.Math() self.data = data self.image_location_map = image_location_map
def __init__(self, init_params): self.config = init_params['config'] self.app_mode = init_params['app_mode'] self.project_directory = init_params['project_directory'] self.cache = cache.Cache(self.config.get("CACHE", "host"), int(self.config.get("CACHE", "port"))) self.math = math.Math() self.user_data = (scipy.sparse.load_npz( self.project_directory + self.config.get("PREPROCESSED-DATA", "user_features"))).todense() self.image_data = (scipy.sparse.load_npz( self.project_directory + self.config.get("PREPROCESSED-DATA", "image_features"))).todense() self.location_data = (scipy.sparse.load_npz( self.project_directory + self.config.get("PREPROCESSED-DATA", "location_features")) ).todense() self.visual_descriptors = self.generate_visual_descriptors_map()