Cập nhật mã nguồn và file Colab Cache

This commit is contained in:
2026-07-16 19:32:43 +07:00
parent 25969cb0f5
commit a258db54cd
69 changed files with 3377 additions and 645 deletions
+26
View File
@@ -0,0 +1,26 @@
from train_module import train_model
def main():
print("🚀 BẮT ĐẦU HUẤN LUYỆN MÔ HÌNH RANDOM FOREST (GPU & CACHE)")
params = {
'bbox': [105.5, 9.2, 106.3, 10.0],
'time_range': '2023-01-01/2023-04-30',
'model_type': 'random_forest',
'feature_mode': 'extended',
'use_cache': True,
'use_gpu': True,
'output_model_path': 'land_classification_model/model_random_forest_auto.joblib', 'n_estimators': 100, 'max_depth': 15
}
try:
res = train_model(**params)
if res.get('success'):
print(f"✅ Hoàn thành! Accuracy: {res.get('test_accuracy', 0.0):.4f}")
else:
print(f"❌ Thất bại: {res.get('error', 'Unknown')}")
except Exception as e:
print(f"❌ Lỗi: {e}")
if __name__ == "__main__":
main()