Mercurial > repos > bgruening > sklearn_ensemble
comparison ensemble.xml @ 31:af0523c606a7 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 05:42:39 -0500 |
parents | dde0f1654d18 |
children | 19d6c2745d34 |
comparison
equal
deleted
inserted
replaced
30:ab4249158912 | 31:af0523c606a7 |
---|---|
77 | 77 |
78 else: | 78 else: |
79 with open(infile_model, 'rb') as model_handler: | 79 with open(infile_model, 'rb') as model_handler: |
80 classifier_object = load_model(model_handler) | 80 classifier_object = load_model(model_handler) |
81 header = 'infer' if params["selected_tasks"]["header"] else None | 81 header = 'infer' if params["selected_tasks"]["header"] else None |
82 data = pandas.read_csv(infile_data, sep='\t', header=header, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False) | 82 data = pandas.read_csv(infile_data, sep='\t', header=header, index_col=None, parse_dates=True, encoding=None) |
83 prediction = classifier_object.predict(data) | 83 prediction = classifier_object.predict(data) |
84 prediction_df = pandas.DataFrame(prediction, columns=["predicted"]) | 84 prediction_df = pandas.DataFrame(prediction, columns=["predicted"]) |
85 res = pandas.concat([data, prediction_df], axis=1) | 85 res = pandas.concat([data, prediction_df], axis=1) |
86 res.to_csv(path_or_buf = outfile_predict, sep="\t", index=False) | 86 res.to_csv(path_or_buf = outfile_predict, sep="\t", index=False) |
87 | 87 |