加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sklearn_predict.py 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
Kyle Swanson 提交于 2019-11-06 17:52 . Adding svm and fixing random forest
from argparse import ArgumentParser
from chemprop.parsing import update_checkpoint_args
from chemprop.sklearn_predict import predict_sklearn
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument('--test_path', type=str, required=True,
help='Path to CSV file containing testing data for which predictions will be made')
parser.add_argument('--preds_path', type=str, required=True,
help='Path to CSV file where predictions will be saved')
parser.add_argument('--dataset_type', type=str, required=True, choices=['classification', 'regression'],
help='Type of dataset')
parser.add_argument('--model_type', type=str, choices=['random_forest', 'svm'], required=True,
help='scikit-learn model to use')
parser.add_argument('--checkpoint_path', type=str, default=None,
help='Path to model checkpoint (.pkl file)')
parser.add_argument('--checkpoint_dir', type=str, default=None,
help='Path to directory containing model checkpoints (.pkl file)')
parser.add_argument('--radius', type=int, default=2,
help='Morgan fingerprint radius')
parser.add_argument('--num_bits', type=int, default=2048,
help='Number of bits in morgan fingerprint')
parser.add_argument('--num_tasks', type=int, required=True,
help='Number of tasks the trained model makes predictions for')
args = parser.parse_args()
update_checkpoint_args(args, ext='pkl')
predict_sklearn(args)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化