index.go 2.6 KB

123456789101112131415161718192021222324252627282930
  1. package response
  2. type AiPredictModelIndexConfigResp struct {
  3. IndexTaskRecordId int `gorm:"primaryKey;column:ai_predict_model_index_config_id" description:"子任务记录id"`
  4. AiPredictModelIndexId int `gorm:"column:ai_predict_model_index_id" description:"ai预测模型id"`
  5. AiPredictModelIndexConfigId int `gorm:"primaryKey;column:ai_predict_model_index_config_id" description:"ai预测模型配置ID"`
  6. ConfigParams ConfigParams `gorm:"column:train_status" description:"运行/训练参数"`
  7. ExecType string `description:"枚举值:ai_predict_model_train(训练)、ai_predict_model_run(运行)"`
  8. ScriptPath string `description:"脚本路径"`
  9. }
  10. // ConfigParams
  11. // @Description: 训练参数
  12. type ConfigParams struct {
  13. Seed float64 `json:"seed" description:"随机种子,如:42"`
  14. Objective string `json:"objective" description:"目标(回归任务),枚举值,squarederror、multi、sofamax;默认值:squarederror" `
  15. EvalMetric string `json:"eval_metric" description:"评估指标,枚举值,rmse、auc logloss、merror;默认值:rmse"`
  16. MaxDeltaStep int `json:"max_delta_step" description:"最大步长,如:5;正整数,必须大于0"`
  17. TreeMethod string `json:"tree_method" description:"树构建方法,枚举值:auto、exact、approx、hist;默认值:auto"`
  18. NumBoostRound int `json:"num_boost_round" description:"迭代次数;正整数,必须大于0"`
  19. LearningRate float64 `json:"learning_rate" description:"学习率,如:0.0881"`
  20. MaxDepth int `json:"max_depth" description:"最大深度(控制树的深度,防止过拟合),如:4;正整数,必须大于0"`
  21. MinChildWeight float64 `json:"min_child_weight" description:"最小子节点权重(防止过拟合),如:6.0601"`
  22. Subsample float64 `json:"subsample" description:"随机采样(防止过拟合),如:0.9627"`
  23. ColsampleBytree float64 `json:"colsample_bytree" description:"特征随机采样(防止过拟合),如:0.7046"`
  24. Gamma float64 `json:"gamma" description:"控制分裂,如:0.4100"`
  25. RegAlpha float64 `json:"reg_alpha" description:"L1正则化系数,如:0.3738"`
  26. ReqLambda float64 `json:"reg_lambda" description:"L2正则化系数,如:1.4775"`
  27. Booster string `json:"booster" description:"使用哪种补充包。可以是,或;使用基于树的模型,同时使用线性函数。枚举值:gbtree、gblinear、dart、gbtree、dart、gblinear"`
  28. }