# cal_performance **Repository Path**: chx2333/cal_performance ## Basic Information - **Project Name**: cal_performance - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-19 - **Last Updated**: 2023-11-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cal_performance ​ 计算模型常见性能指标,例如:accuracy precision recall f1 mcc balance auc。 ## 食用方法 1. 安装sklearn,以及openpylx 2. 点击main函数进行运行 参数说明: | 字段 | 类型 | 说明 | | ---------------- | ------ | :-------------------------------- | | CLASSIFIER_MODEL | list | 模型名称(当前仅支持sklearn中模型) | | XLSX_HEADER | list | xlsx文件表头列表 | | XLSX_FILE | string | xlsx文件保存路径 | | | | | ```python if __name__ == '__main__': CLASSIFIER_MODEL = ["random_forest","naive_bayes"] XLSX_HEADER = ["model_name","classifier_name","test_size","random_state","accuracy","precision","recall","f1","mcc","balance"] XLSX_FILE = "./results/record.xlsx" create_xlsx_data(file_path=XLSX_FILE,xlsx_header=XLSX_HEADER) data,target = load_iris(return_X_y=True) model_train( classifier_model_list=CLASSIFIER_MODEL, data=data, target=target, record_fn=xlsx_add_data, record_file_path=XLSX_FILE, epoch=10 ) ``` ​ 当前仅支持输出信息到xlsx文件当中,如需修改输入信息,可以直接tp /data/classifier_model下方,修改get_xlsx_data函数。