Created
June 10, 2017 11:44
-
-
Save mbednarski/1b399fe1f47e8a8022189c91f33878b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
import matplotlib | |
matplotlib.use('agg') | |
import seaborn as sns | |
import sys | |
sys.path.append('src') | |
from data import read_processed_data | |
def exploratory_visualization(dframe): | |
return sns.pairplot(dframe, vars=['x0', 'x1', 'x2', 'x3'], hue='y') | |
@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 main(input_file, output_file): | |
print('Plotting pairwise distribution...') | |
dframe = read_processed_data(input_file) | |
plot = exploratory_visualization(dframe) | |
plot.savefig(output_file) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment