def main(): """ loop throught all config file and display result. :return: """ logger = Logger('Main') logger.info('begin operation on bloom filter') # --------------------------------------------------------------- # Get parameters from config file list_visualisation = [] dic_response = create_bloom_filters(logger, METHOD) list_visualisation.append(dic_response[Constants.DIS_INPUTS]) list_visualisation.append(dic_response[Constants.DIS_TESTS]) list_visualisation.append(dic_response[Constants.DIS_DOUBLE]) list_visualisation.append(dic_response[ARF_METHOD]) visualize_curve(list_visualisation, "dimension", " Rate false positive (%)", "DELTA "+str(DELTA) + " N and tests "+ str(SIZE_DATA)+" Dim "+str(DIM)+" DOMAIN "+str(DOMAIN))
def main(): """ loop throught all config file and display result. :return: """ logger = Logger('Main') logger.info('begin operation on bloom filter') # --------------------------------------------------------------- # Get parameters from config file list_visualisation = [] for config_file in os.listdir(PATH_CONFIG): print(config_file) list_visualisation.append( run_test_on_bloom_filter(logger, PATH_CONFIG, config_file)) visualize_curve(list_visualisation, "ratio m/n", " rate false positive (%)", "Comparaison discretization method in Dimension 2")
def main(): """ loop throught all config file and display result. :return: """ logger = Logger('Main') logger.info('begin operation on bloom filter') # --------------------------------------------------------------- # Get parameters from config file list_visualisation = [] a = create_bloom_filters(logger) list_visualisation.append(("dis_input", a[0], a[1][0])) list_visualisation.append(("dis_test", a[0], a[1][1])) list_visualisation.append(("dis_double", a[0], a[1][2])) #list_visualisation.append(("dis_circle", a[0], a[1][3])) list_visualisation.append(("arf", a[0], a[1][3])) #list_visualisation.append(("dis_none", a[0], a[1][3])) visualize_curve( list_visualisation, "delta", " rate false positive (%)", "Dimension: " + str(DIMENSION) + " size_set n: " + str(SIZE_DATA) + " rate size_bloom/size_set n/m: " + str(RATE_M_N) + " domain: " + str(DOMAIN) + " number_of tests: " + str(TESTS))
def __init__(self): self.__logger = Logger().get_logger() self.__access_token = str()
def __init__(self): self.__logger = Logger().get_logger() self.__repository = GameUserRepository() self.__auth_business = AuthBusiness()
def __init__(self, path): self.path = path self.logger = Logger('Arf') self.compile()
def __init__(self, dimension, file_path): DataProvider.__init__(self, dimension) self.file_path = file_path self.logger = Logger('ReaderFromFile')
import pandas as pd import numpy as np from random import randint, uniform from src.providerData.DataProvider import DataProvider from src.structureData.Point import Point from src.util.Logger import Logger # ----------------------------------------------------------------------------------------- # Constant DATA_FOLDER = "../../data" # ----------------------------------------------------------------------------------------- # Code logger = Logger("RandomDataGenerator") class RandomDataGenerator(DataProvider): """ This class allow to provide data randomly. Args : :param dimension: int that represent dimention of the vector that will be in the data. :param size_of_data_set: Size of the data set. :param domain: int that represent domain ([0,<domain>]) for dimension of the vectors that will be in the data. :param distribution: distribution of the random value: - 0 : uniform - x (10 > x >= 1): x normal laws superposed :param point_list: DataFrame that contain the data points: """ def __init__(self,
def __init__(self): self.__mongo_configuration = MongoConfiguration() self.__database = self.__mongo_configuration.database self.__game_user_collection = self.__database.game_user_collection self.__logger = Logger().get_logger()
def __init__(self): self.__logger = Logger().get_logger() self.__mongo_configuration = MongoConfiguration() self.__database = self.__mongo_configuration.database self.__user_collection = self.__database.user_collection self.__user_collection.create_index("login", unique=True)
def __init__(self): self.__logger = Logger().get_logger()
# -------- Aim of the file # This file provide a class Point that will be our data strutur for the data that will fit our Bloom Filter # -------- Import import abc from src.util.Logger import Logger # --------- Constant # --------- Code logger = Logger("DataProvider") class DataProvider: """ This class is the interface for all data providers. The data provided will be use by the Bloom filter. Args : :param dimension: int that represent dimention of the vector that will be in the data. :param size_of_data_set: Size of the data set. """ __metaclass__ = abc.ABCMeta def __init__(self, dimension): self.dimension = dimension self.point_list = [] @abc.abstractmethod def get_points(self):
def __init__(self): self.__user_bussiness = UserBusiness() self.__logger = Logger().get_logger()
def __init__(self): self.__user_repository = UserRepository() self.__access_token_business = AccessTokenBusiness() self.__logger = Logger().get_logger()