refactor: reorganize project structure by moving core modules and update import paths in API server

This commit is contained in:
2026-07-18 01:24:30 +07:00
parent abab846884
commit a82b2f6fa5
155 changed files with 25 additions and 370 deletions
@@ -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()