Files
cointrader/models/training_log.json
21in7 fce4d536ea feat: implement HOLD negative sampling and stratified undersampling in ML pipeline
Added HOLD candles as negative samples to increase training data from ~535 to ~3,200 samples. Introduced a negative_ratio parameter in generate_dataset_vectorized() for sampling HOLD candles alongside signal candles. Implemented stratified undersampling to ensure signal samples are preserved during training. Updated relevant tests to validate new functionality and maintain compatibility with existing tests.

- Modified dataset_builder.py to include HOLD negative sampling logic
- Updated train_model.py to apply stratified undersampling
- Added tests for new sampling methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:13:42 +09:00

355 lines
8.2 KiB
JSON

[
{
"date": "2026-03-01T18:04:50.871434",
"auc": 0.546,
"samples": 1772,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T18:44:22.163935",
"backend": "mlx",
"auc": 0.5054,
"samples": 1772,
"train_sec": 0.7,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T18:52:52.991917",
"auc": 0.5405,
"samples": 1704,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T18:54:48.200006",
"auc": 0.5405,
"samples": 1704,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T19:29:21.454533",
"auc": 0.5321,
"samples": 1696,
"features": 21,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:03:56.314547",
"auc": 0.5406,
"samples": 1707,
"features": 21,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:12:23.866860",
"auc": 0.502,
"samples": 3269,
"features": 21,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:46:29.599674",
"backend": "mlx",
"auc": 0.516,
"samples": 6470,
"train_sec": 1.3,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T21:50:12.449819",
"backend": "lgbm",
"auc": 0.4772,
"samples": 6470,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:50:32.491318",
"backend": "lgbm",
"auc": 0.4943,
"samples": 6470,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:50:48.665654",
"backend": "lgbm",
"auc": 0.4943,
"samples": 6470,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:51:02.539565",
"backend": "lgbm",
"auc": 0.4943,
"samples": 6470,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:51:09.830250",
"backend": "lgbm",
"auc": 0.4925,
"samples": 1716,
"features": 13,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:51:20.133303",
"backend": "lgbm",
"auc": 0.54,
"samples": 1716,
"features": 13,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:51:25.445363",
"backend": "lgbm",
"auc": 0.4943,
"samples": 6470,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T21:52:24.296191",
"backend": "lgbm",
"auc": 0.54,
"samples": 1716,
"features": 13,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T22:00:34.737597",
"backend": "lgbm",
"auc": 0.5097,
"samples": 6470,
"features": 21,
"time_weight_decay": 3.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T22:12:06.299119",
"backend": "mlx",
"auc": 0.5746,
"samples": 533,
"train_sec": 0.2,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T22:13:20.434893",
"backend": "mlx",
"auc": 0.5663,
"samples": 533,
"train_sec": 0.2,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T22:15:43.163315",
"backend": "lgbm",
"auc": 0.5581,
"samples": 533,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T22:18:59.852831",
"backend": "lgbm",
"auc": 0.5504,
"samples": 533,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T22:19:29.532472",
"backend": "lgbm",
"auc": 0.5504,
"samples": 533,
"features": 21,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T22:19:30.938005",
"backend": "mlx",
"auc": 0.5714,
"samples": 533,
"train_sec": 0.1,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T22:26:46.459326",
"backend": "mlx",
"auc": 0.6167,
"samples": 533,
"train_sec": 0.2,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T22:45:55.473533",
"backend": "lgbm",
"auc": 0.556,
"samples": 533,
"features": 23,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-01T23:04:51.194544",
"backend": "mlx",
"auc": 0.5972,
"samples": 533,
"train_sec": 0.1,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-01T23:59:27.956019",
"backend": "mlx",
"auc": 0.5595,
"best_threshold": 0.9538,
"best_precision": 0.462,
"best_recall": 0.171,
"samples": 533,
"train_sec": 0.2,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-02T00:40:15.931055",
"backend": "mlx",
"auc": 0.5829,
"best_threshold": 0.9609,
"best_precision": 0.6,
"best_recall": 0.171,
"samples": 534,
"train_sec": 0.2,
"time_weight_decay": 2.0,
"model_path": "models/mlx_filter.weights"
},
{
"date": "2026-03-02T00:54:32.264425",
"backend": "lgbm",
"auc": 0.5607,
"best_threshold": 0.6532,
"best_precision": 0.467,
"best_recall": 0.2,
"samples": 533,
"features": 23,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-02T01:07:30.690959",
"backend": "lgbm",
"auc": 0.5579,
"best_threshold": 0.6511,
"best_precision": 0.4,
"best_recall": 0.171,
"samples": 533,
"features": 23,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-02T02:00:45.931227",
"backend": "lgbm",
"auc": 0.5752,
"best_threshold": 0.6307,
"best_precision": 0.471,
"best_recall": 0.229,
"samples": 533,
"features": 23,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl"
},
{
"date": "2026-03-02T14:51:09.101738",
"backend": "lgbm",
"auc": 0.5361,
"best_threshold": 0.5308,
"best_precision": 0.406,
"best_recall": 0.371,
"samples": 533,
"features": 23,
"time_weight_decay": 2.0,
"model_path": "models/lgbm_filter.pkl",
"tuned_params_path": "models/tune_results_20260302_144749.json",
"lgbm_params": {
"n_estimators": 434,
"learning_rate": 0.123659,
"num_leaves": 14,
"min_child_samples": 10,
"subsample": 0.929062,
"colsample_bytree": 0.94633,
"reg_alpha": 0.573971,
"reg_lambda": 0.000157,
"max_depth": 6
},
"weight_scale": 1.783105
},
{
"date": "2026-03-02T18:10:27.584046",
"backend": "lgbm",
"auc": 0.5466,
"best_threshold": 0.6424,
"best_precision": 0.426,
"best_recall": 0.556,
"samples": 535,
"features": 23,
"time_weight_decay": 0.5,
"model_path": "models/lgbm_filter.pkl",
"tuned_params_path": null,
"lgbm_params": {
"n_estimators": 434,
"learning_rate": 0.123659,
"max_depth": 6,
"num_leaves": 14,
"min_child_samples": 10,
"subsample": 0.929062,
"colsample_bytree": 0.94633,
"reg_alpha": 0.573971,
"reg_lambda": 0.000157
},
"weight_scale": 1.783105
},
{
"date": "2026-03-03T00:12:17.351458",
"backend": "lgbm",
"auc": 0.949,
"best_threshold": 0.42,
"best_precision": 0.56,
"best_recall": 0.538,
"samples": 1524,
"features": 23,
"time_weight_decay": 0.5,
"model_path": "models/lgbm_filter.pkl",
"tuned_params_path": null,
"lgbm_params": {
"n_estimators": 434,
"learning_rate": 0.123659,
"max_depth": 6,
"num_leaves": 14,
"min_child_samples": 10,
"subsample": 0.929062,
"colsample_bytree": 0.94633,
"reg_alpha": 0.573971,
"reg_lambda": 0.000157
},
"weight_scale": 1.783105
}
]