// Copyright 2023 Ant Group Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // syntax = "proto3"; package secretflowapis.v1.sdc.teeapps.params; option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc.teeapps.params"; option java_outer_classname = "BiClassifierEvalProto"; message BiClassifierEvalParams { string score_field_name = 1; int32 bad_label_value = 2; uint32 bucket_size = 3; } message BiClassifierEvalReport { message PrReport { // 范围: [0,1] 越小越好 double fpr = 1; // 范围: [0,1] 越大越好 double precision = 2; // 范围: [0,1] 越大越好 double recall = 3; } message SummaryReport { int32 total_samples = 1; int32 positive_samples = 2; int32 negative_samples = 3; // 范围: [0,1] 0.5近似随机分布,越接近1越好 double auc = 4; // 范围: [0,1] 用于区分正负样本分隔程度,越大越好 double ks = 5; // 范围: [0,1] 是precision和recall的一个调和参数,越大越好 double f1_score = 6; } message EquiBinReport { // score分桶,[start_value, end_value] double start_value = 1; double end_value = 2; // 正样本数 int32 positive = 3; // 负样本数 int32 negative = 4; // 样本总数 int32 total = 5; // 精确率:TP/(TP+FP) double precision = 6; // 召回率:TP/(TP+FN) double recall = 7; // 误诊率(false positive rate): FP/(FP+TN) double fpr = 8; // F1值:2*P*R/(P+R) // 精确率和召回率的调和平均数 // 表征了精确率和召回率的平衡程度,值越大说明越平衡 double f1_score = 9; // lift值: 精确度/正样本占比 // lift值越大,说明模型效果越好 double lift = 10; // 正样本分布:预测正样本/正样本总数 double distribution_of_positive = 11; // 负样本分布:预测负样本/正样本总数 double distribution_of_negative = 12; // 正样本累积占比,用来计算KS值 double cumulative_percent_of_positive = 13; // 负样本累积占比,用来计算KS值 double cumulative_percent_of_negative = 14; // 总计累积百分比,用来表示样本占比 double total_cumulative_percent = 15; // KS值:(cumulative_percent_of_positive - cumulative_percent_of_negative) // 用来表明该桶内正负样本的区分度 // 绝对值越大表明该桶正负样本区分度越大 double ks = 16; // score均值 double avg_score = 17; } SummaryReport summary_report = 1; repeated EquiBinReport equi_frequent_bin_report = 2; repeated EquiBinReport equi_range_bin_report = 3; // 头部准确率, // 即 fpr 是 0.001, 0.005, 0.01, 0.05,0.1, 0.2 的时候对应的 precision/recall repeated PrReport head_report = 4; }