Esempio n. 1
0
def run_demo(folder_name):
    """Runs the demo for specified folder"""
    start = timer()
    meta_file = os.path.join('demo', folder_name,
                             folder_name.capitalize() + '_manual_meta.json')
    sdv = SDV(meta_file)
    sdv.fit()
    sampled_rows = {}
    LOGGER.info('Parent map: %s', sdv.dn.parent_map)
    LOGGER.info('Transformed data: %s', sdv.dn.transformed_data)
    table_list = table_dict[folder_name]
    for table in table_list:
        sampled_rows[table] = sdv.sample_rows(table, 1)
        LOGGER.info('Sampled row from %s: %s', table, sampled_rows[table])
    end = timer()
    LOGGER.info('Total time: %s seconds', round(end - start))
Esempio n. 2
0
File: demo.py Progetto: Aylr/SDV
def run_demo(folder_name):
    """Runs the demo for specified folder"""
    start = timer()
    meta_file = os.path.join('demo', folder_name,
                             folder_name.capitalize() + '_manual_meta.json')
    sdv = SDV(meta_file)
    sdv.fit()
    sampled = sdv.sample_all()

    LOGGER.info('Parent map: %s', sdv.dn.parent_map)
    LOGGER.info('Transformed data: %s', sdv.dn.transformed_data)

    for name, table in sampled.items():
        LOGGER.info('Sampled row from %s: %s', name, table.head(3).T)

    end = timer()
    LOGGER.info('Total time: %s seconds', round(end - start))