@click.command()
@click.argument('input_file', type=click.Path(exists=True, dir_okay=False))
@click.argument('output_file', type=click.Path(writable=True, dir_okay=False))
def create_figures(input_file, output_file):
    """ Evaluates a model using a specific test file. The Test file must be preprocessed and featurized

        :param input_file: File path to featurized vector of all data
        :type input_file: str

        :param output_file: Filename to save the visualization to.
        :type output_file: str

    """
    logger = logging.getLogger(__name__)
    logger.info('Plotting pairwise distribution...')

    dframe = read_feature_vector(input_file)
    plot = exploratory_visualization(dframe)
    plot.savefig(output_file)


if __name__ == '__main__':
    config_logging()

    # find .env automagically by walking up directories until it's found, then
    # load up the .env entries as environment variables
    load_dotenv(find_dotenv())

    if not create_figures(sys.argv[1:]):
        sys.exit(1)
예제 #2
0
 def __init__(self, filename='settings/settings_private.cfg'):
     self._filename = filename
     self._cfg = read_settings(filename)
     config_logging(self._cfg)
     l.info('Settings read from ' + self._filename)