xgb_tfidf / config.py
subbunanepalli's picture
Update config.py
7860fe7 verified
raw
history blame contribute delete
795 Bytes
import os
# --- Paths ---
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_PATH = os.path.join(BASE_DIR, "data", "synthetic_transactions_samples_5000.csv")
MODEL_SAVE_DIR = os.path.join(BASE_DIR, "models")
LABEL_ENCODERS_PATH = os.path.join(MODEL_SAVE_DIR, "label_encoders.pkl")
TFIDF_VECTORIZER_PATH = os.path.join(MODEL_SAVE_DIR, "tfidf_vectorizer.pkl")
MODEL_PATH = os.path.join(MODEL_SAVE_DIR, "xgb_models.pkl")
# --- Columns ---
TEXT_COLUMN = "Sanction_Context"
LABEL_COLUMNS = [
"Red_Flag_Reason",
"Maker_Action",
"Escalation_Level",
"Risk_Category",
"Risk_Drivers",
"Investigation_Outcome"
]
# --- TF-IDF Settings ---
TFIDF_MAX_FEATURES = 5000
NGRAM_RANGE = (1, 2)
USE_STOPWORDS = True
# --- Train/Test Split ---
RANDOM_STATE = 42
TEST_SIZE = 0.2