Spaces:
Sleeping
Sleeping
File size: 1,364 Bytes
4856467 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DATA_DIR = os.path.join(BASE_DIR, "data")
DEBUG_DIR = os.path.join(BASE_DIR, "debug_outputs")
TRAIN_PATH = os.path.join(DATA_DIR, "Historical Data.csv")
TEST_PATH = os.path.join(DATA_DIR, "Real-Time Data.csv")
OUTPUT_PATH = os.path.join(BASE_DIR, "final_predictions.csv")
SAVE_DEBUG_CSVS = False
TARGET_MAP = {"Clear": 0, "Low Risk": 1, "Critical": 2}
NUMERICAL_COLS = [
"Declared_Value",
"Declared_Weight",
"Measured_Weight",
"Dwell_Time_Hours",
]
CATEGORICAL_COLS = [
"Trade_Regime (Import / Export / Transit)",
"Origin_Country",
"Destination_Port",
"Destination_Country",
"Importer_ID",
"Exporter_ID",
"Shipping_Line",
]
RAW_DROP_COLS = [
"Declaration_Date (YYYY-MM-DD)",
"Declaration_Time",
"Destination_Port",
"Destination_Country",
"HS_Code",
"Importer_ID",
"Declared_Value",
"Declared_Weight",
"Measured_Weight",
"Shipping_Line",
"Dwell_Time_Hours",
"Clearance_Status",
"Route_ID",
"HS_Category",
"Is_Risky",
]
RANDOM_STATE = 42
OPTUNA_TRIALS = 2
CV_FOLDS = 3
IF_CONTAMINATION = 0.05
CRITICAL_THRESHOLD = 0.30
MEDIUM_THRESHOLD = 0.40
SMOOTH_M = 10
RISK_LABELS = {0: "Low", 1: "Medium", 2: "Critical"}
|