Improve Trader V4 training pipeline

Align entry labels with max future edge, tune direction labeling, and harden regression evaluation.

Add training diagnostics, price-plan search, feature screening, and nonlinear benchmark scripts.
This commit is contained in:
Codex
2026-06-27 19:57:29 +08:00
parent e58e4a5572
commit 9acb3460a1
27 changed files with 2059 additions and 341 deletions
+3 -1
View File
@@ -5,6 +5,8 @@ from pathlib import Path
import numpy as np
from trader_training.schemas import FEATURE_ORDER
@dataclass(frozen=True)
class LinearHead:
@@ -23,7 +25,7 @@ def require_onnx():
return onnx, TensorProto, helper, numpy_helper
def export_heads(path: Path, heads: list[LinearHead], feature_count: int = 39, opset: int = 17) -> None:
def export_heads(path: Path, heads: list[LinearHead], feature_count: int = len(FEATURE_ORDER), opset: int = 17) -> None:
onnx, TensorProto, helper, numpy_helper = require_onnx()
nodes = []
initializers = []