# Predictor Hand - 预测分析能力包 # # OpenFang Hand 配置 # 这个 Hand 提供预测分析、趋势预测和数据建模能力 [hand] name = "predictor" version = "1.0.0" description = "预测分析能力包 - 执行回归、分类和时间序列预测" author = "ZCLAW Team" # Hand 类型 type = "data" # 是否需要人工审批才能执行 requires_approval = false # 默认超时时间(秒) timeout = 600 # 最大并发执行数 max_concurrent = 2 # 能力标签 tags = ["prediction", "analytics", "forecasting", "ml", "statistics"] [hand.config] # 模型配置 default_model = "auto" # auto, regression, classification, timeseries model_storage = "/tmp/zclaw/predictor/models" # 训练配置 train_test_split = 0.8 cross_validation = 5 # 输出配置 output_format = "report" # report, json, chart include_visualization = true confidence_level = 0.95 # 特征工程 auto_feature_selection = true max_features = 50 [hand.triggers] # 触发器配置 manual = true schedule = true webhook = false # 事件触发器 [[hand.triggers.events]] type = "data.updated" pattern = ".*(forecast|predict|analyze).*" priority = 7 [[hand.triggers.events]] type = "chat.intent" pattern = "预测|分析|趋势|forecast|predict|analyze|trend" priority = 5 [hand.permissions] # 权限要求 requires = [ "file.read", "file.write", "compute.ml" ] # RBAC 角色要求 roles = ["operator.read", "operator.write"] # 速率限制 [hand.rate_limit] max_requests = 20 window_seconds = 3600 # 1 hour # 审计配置 [hand.audit] log_inputs = true log_outputs = true retention_days = 30 # 参数定义 [[hand.parameters]] name = "dataSource" label = "数据源" type = "text" required = true description = "数据文件路径或 URL" [[hand.parameters]] name = "model" label = "模型类型" type = "select" required = true options = ["regression", "classification", "timeseries"] description = "预测模型的类型" [[hand.parameters]] name = "targetColumn" label = "目标列" type = "text" required = true description = "要预测的目标变量列名" [[hand.parameters]] name = "featureColumns" label = "特征列" type = "text" required = false description = "用于预测的特征列(逗号分隔,留空自动选择)" # 工作流步骤 [[hand.workflow]] id = "load" name = "加载数据" description = "读取和验证输入数据" [[hand.workflow]] id = "preprocess" name = "数据预处理" description = "清洗数据、处理缺失值、特征工程" [[hand.workflow]] id = "train" name = "训练模型" description = "训练预测模型并进行交叉验证" [[hand.workflow]] id = "evaluate" name = "评估模型" description = "计算模型性能指标" [[hand.workflow]] id = "predict" name = "执行预测" description = "使用训练好的模型进行预测" [[hand.workflow]] id = "report" name = "生成报告" description = "生成包含可视化的分析报告"