From c555afbddc80c252a2c86b04516ecda1e09b43f8 Mon Sep 17 00:00:00 2001 From: 21in7 Date: Thu, 5 Mar 2026 20:04:15 +0900 Subject: [PATCH] chore: update .gitignore, CLAUDE.md, training_log.json, and ml_filter.py - Added .worktrees/ to .gitignore to prevent tracking of worktree files. - Marked `optuna-precision-objective-plan` as completed in CLAUDE.md. - Added new training log entry for a LightGBM model with updated parameters and performance metrics in training_log.json. - Updated error handling in ml_filter.py to return False on prediction errors instead of True, improving the robustness of the ML filter. --- .gitignore | 4 +++- CLAUDE.md | 2 +- models/training_log.json | 25 +++++++++++++++++++++++++ src/ml_filter.py | 4 ++-- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 315cab6..6beb290 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ models/tune_results_*.json data/*.parquet .worktrees/ .DS_Store -.cursor/ \ No newline at end of file +.cursor/ + +.worktrees/ \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index c14402d..59e53c9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -115,6 +115,6 @@ All design documents and implementation plans are stored in `docs/plans/` with t | 2026-03-02 | `hold-negative-sampling` (design + plan) | Completed | | 2026-03-03 | `position-monitor-logging` | Completed | | 2026-03-03 | `adx-ml-feature-migration` (design + plan) | Completed | -| 2026-03-03 | `optuna-precision-objective-plan` | Pending | +| 2026-03-03 | `optuna-precision-objective-plan` | Completed | | 2026-03-03 | `demo-1m-125x` (design + plan) | In Progress | | 2026-03-04 | `oi-derived-features` (design + plan) | Completed | diff --git a/models/training_log.json b/models/training_log.json index 9600e22..c722db1 100644 --- a/models/training_log.json +++ b/models/training_log.json @@ -476,5 +476,30 @@ "reg_lambda": 0.082872 }, "weight_scale": 1.431662 + }, + { + "date": "2026-03-05T02:00:24.489871", + "backend": "lgbm", + "auc": 0.9448, + "best_threshold": 0.3075, + "best_precision": 0.452, + "best_recall": 0.463, + "samples": 3246, + "features": 26, + "time_weight_decay": 2.0, + "model_path": "models/lgbm_filter.pkl", + "tuned_params_path": null, + "lgbm_params": { + "n_estimators": 221, + "learning_rate": 0.031072, + "max_depth": 5, + "num_leaves": 20, + "min_child_samples": 39, + "subsample": 0.83244, + "colsample_bytree": 0.526349, + "reg_alpha": 0.062177, + "reg_lambda": 0.082872 + }, + "weight_scale": 1.431662 } ] \ No newline at end of file diff --git a/src/ml_filter.py b/src/ml_filter.py index 0fca131..77cd60a 100644 --- a/src/ml_filter.py +++ b/src/ml_filter.py @@ -149,8 +149,8 @@ class MLFilter: ) return bool(proba >= self._threshold) except Exception as e: - logger.warning(f"ML 필터 예측 오류 (폴백 허용): {e}") - return True + logger.warning(f"ML 필터 예측 오류 (진입 차단): {e}") + return False def reload_model(self): """외부에서 강제 리로드할 때 사용 (하위 호환)."""