【ML backend】温度样本多标签预测 #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. 项目架构基础
该项目是基于Label Studio的托卡马克等离子体数据标注平台,支持时序数据标注和ML Backend集成 。ML Backend模块位于独立目录中,每个后端都包含完整的Docker化部署配置 。
2. 核心模型实现
模型类结构
参考现有的ML Backend实现,温度标注模型需要继承LabelStudioMLBase基类,并实现setup、predict和fit方法。
预测器设计
实现自定义的温度预测器,继承BasePredictor抽象类,在user_predict方法中实现温度特征识别逻辑 。
3. 温度特征识别算法
阈值检测方法
利用现有的阈值检测函数start_end_time_1D来识别温度区间,支持正向和反向阈值检测 。
多维数据处理
对于多通道温度数据,可以使用start_end_time函数进行批量处理,支持逻辑与/或操作 。
4. 数据获取和处理
数据加载
使用项目提供的load_data函数并发加载多个温度数据文件,支持从URL批量获取CSV数据 。
项目配置
通过YAML配置文件定义温度相关的数据通道和标签配置,支持多种温度测量信号的组合 。
5. 具体实现方案
temperature_predictor类: