🚀 CHIẾN LƯỢC TOÀN DIỆN ĐẠT >95% ACCURACY ============================================================ Loaded data: X=(706, 24, 16, 16), y=(706,) Labels unique: [-1 0 1 2 3 4 5 6] After cleanup: X=(652, 24, 16, 16), y=(652,) (removed 54 bad samples) Remapped labels: [0 1 2 3 4 5 6] Class 0: 65 samples Class 1: 52 samples Class 2: 48 samples Class 3: 72 samples Class 4: 108 samples Class 5: 219 samples Class 6: 88 samples ============================================================ STRATEGY 5: Flat pixel features + XGBoost (sanity check) ============================================================ Flat features: (652, 6144) ✅ Flat XGBoost acc: 0.7328 ============================================================ STRATEGY 1: Lightweight CNN (no upsampling) ============================================================ Device: cuda Epoch 1/300 Loss=1.8379 Acc=0.0763 🌟 Epoch 2/300 Loss=1.5825 Acc=0.2824 🌟 Epoch 3/300 Loss=1.4412 Acc=0.5649 🌟 Epoch 4/300 Loss=1.3274 Acc=0.6336 🌟 Epoch 5/300 Loss=1.2893 Acc=0.6870 🌟 Epoch 8/300 Loss=1.2140 Acc=0.7099 🌟 Epoch 11/300 Loss=1.2224 Acc=0.7252 🌟 Epoch 14/300 Loss=1.1087 Acc=0.7328 🌟 Epoch 16/300 Loss=1.1081 Acc=0.7710 🌟 Epoch 18/300 Loss=1.1847 Acc=0.7939 🌟 Epoch 20/300 Loss=1.0316 Acc=0.7786 (patience=2) Epoch 24/300 Loss=1.0465 Acc=0.8092 🌟 Epoch 26/300 Loss=0.9583 Acc=0.8397 🌟 Epoch 40/300 Loss=0.9361 Acc=0.8626 🌟 Epoch 60/300 Loss=0.9807 Acc=0.8092 (patience=20) Epoch 80/300 Loss=0.9459 Acc=0.8015 (patience=40) Epoch 100/300 Loss=0.8443 Acc=0.7939 (patience=60) Early stop at epoch 100 ✅ LightCNN best acc: 0.8626 ============================================================ STRATEGY 2: Hybrid CNN embeddings + XGBoost ============================================================ CNN embeddings: (652, 256) Extracted 316 rich features per sample Combined features: (652, 572) ✅ Hybrid XGBoost acc: 0.8244 ============================================================ STRATEGY 3: Rich Features + Stacking Ensemble ============================================================ Extracted 316 rich features per sample XGBoost: 0.7939 LightGBM: 0.7786 ExtraTrees: 0.7863 RandomForest: 0.7710 GBM: 0.7710 [06:55:44] WARNING: /__w/xgboost/xgboost/src/learner.cc:782: Parameters: { "use_label_encoder" } are not used. [06:55:44] WARNING: /__w/xgboost/xgboost/src/learner.cc:782: Parameters: { "use_label_encoder" } are not used. [06:55:44] WARNING: /__w/xgboost/xgboost/src/learner.cc:782: Parameters: { "use_label_encoder" } are not used. [06:55:44] WARNING: /__w/xgboost/xgboost/src/learner.cc:782: Parameters: { "use_label_encoder" } are not used. [06:55:44] WARNING: /__w/xgboost/xgboost/src/learner.cc:782: Parameters: { "use_label_encoder" } are not used. [06:56:17] WARNING: /__w/xgboost/xgboost/src/common/error_msg.cc:62: Falling back to prediction using DMatrix due to mismatched devices. This might lead to higher memory usage and slower performance. XGBoost is running on: cuda:0, while the input data is on: cpu. Potential solutions: - Use a data structure that matches the device ordinal in the booster. - Set the device for booster before call to inplace_predict. This warning will only be shown once. Stacking Ensemble: 0.7710 Voting Ensemble: 0.7786 ✅ Best ensemble: XGBoost = 0.7939 Extracted 316 rich features per sample ============================================================ STRATEGY 4: 5-Fold Stratified Cross-Validation ============================================================ Fold 1: 0.7939 Fold 2: 0.8244 Fold 3: 0.7769 Fold 4: 0.8154 Fold 5: 0.7615 ✅ CV Mean: 0.7944 ± 0.0234 ============================================================ 📊 TỔNG KẾT KẾT QUẢ ============================================================ 📈 LightCNN: 0.8626 📈 Hybrid CNN+XGBoost: 0.8244 📈 CV Mean (XGBoost rich): 0.7944 📈 Ensemble XGBoost: 0.7939 📈 Ensemble ExtraTrees: 0.7863 📈 Ensemble LightGBM: 0.7786 📈 Ensemble Voting: 0.7786 📈 Ensemble RandomForest: 0.7710 📈 Ensemble GBM: 0.7710 📈 Ensemble Stacking: 0.7710 📈 Flat XGBoost (baseline): 0.7328 🏆 BEST: LightCNN = 0.8626 ✅ Kết quả đã được lưu vào model_train/ultimate_results.json ⚠️ Chưa đạt 95%. Best = 0.8626. Cần thêm dữ liệu hoặc feature engineering.