Created
June 10, 2017 14:40
-
-
Save mbednarski/7b3328d476b8aad9870e06cf046c5798 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| from random_forest import RandomForestModel | |
| import sys | |
| sys.path.append('src') | |
| from data.preprocess import read_processed_data | |
| @click.command() | |
| @click.argument('input_file', type=click.Path(exists=True, readable=True, dir_okay=False)) | |
| @click.argument('output_file', type=click.Path(writable=True, dir_okay=False)) | |
| def main(input_file, output_file): | |
| print('Training model') | |
| dframe = read_processed_data(input_file) | |
| model = RandomForestModel() | |
| model.train(dframe) | |
| model.save(output_file) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment