// 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 = "XgbHyperProto"; // 参数名称与 xgboost 保持一致 // https://xgboost.readthedocs.io/en/stable/parameter.html message XgbHyperParams { // 训练轮数,每轮训练输出一颗树 // 范围: [1,1024] // 默认: 10 int32 num_boost_round = 1; // 每棵树最大深度 // 范围: [1,128] // 默认: 6 int32 max_depth = 2; // 节点权重(hessian)的最小总和 // 如果树分裂步骤产生的叶节点实例权重之和小于 // min_child_weight,则构建过程将放弃进一步的分裂 // 范围:[0, 1000] // 默认: 1 double min_child_weight = 3; // 训练参数: 学习率,缩小迭代步长减轻过拟合。 // 范围: (0,1] // 默认: 0.3 double learning_rate = 4; // 训练目标: // "reg:squarederror": // 线性回归目标 // "binary:logistic" (默认): // 二分类目标 string objective = 5; // 最小分裂阈值,该参数越大算法越保守。 // 范围: [0,10000] // 默认: 0 double gamma = 6; // 叶结点权重L2正则项,该参数越大算法越保守。 // 范围: [0,10000] // 默认: 1 double lambda = 7; // 叶结点权重L1正则项,该参数越大算法越保守。 // 范围: [0,10000] // 默认: 0 double alpha = 8; // 样本/行采样系数,每轮训练从新采样。 // 范围: (0,1] // 默认: 1 double subsample = 9; // 特征/列采样系数,每轮训练从新采样。 // 范围: (0,1] // 默认: 1 double colsample_bytree = 10; // 最大分桶数,样本按照等频划分到各个分桶,决定分裂点和进行权重计算。 // 类似xgboost hist算法。 // 范围: (0,254) // 默认: 10 int32 max_bin = 11; // 树分裂算法: // auto: Use heuristic to choose the fastest method. // For small dataset, exact greedy (exact) will be used. // For larger dataset, approximate algorithm (approx) will be chosen. // exact: Exact greedy algorithm. Enumerates all split candidates. // approx: Approximate greedy algorithm using quantile sketch and gradient // histogram. hist: Faster histogram optimized approximate greedy algorithm. // 默认: auto string tree_method = 12; // booster 选择 // "gbtree", "gblinear" or "dart" // 默认:"gbtree" string booster = 13; } message XgbTrainReport { message Importance { // 特征名称 string feature_name = 1; // 重要性指标 double importance = 2; } repeated Importance importances = 1; }