ganeshkonapalli commited on
Commit
3aa99b0
·
verified ·
1 Parent(s): bea5dee

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +35 -0
config.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ # --- Base Directory ---
4
+ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
5
+
6
+ # --- File Paths ---
7
+ DATA_PATH = os.path.join(BASE_DIR, "data", "synthetic_transactions_samples_5000.csv")
8
+ MODEL_SAVE_DIR = os.path.join(BASE_DIR, "models")
9
+
10
+ LABEL_ENCODERS_PATH = os.path.join(MODEL_SAVE_DIR, "label_encoders.pkl")
11
+ TFIDF_VECTORIZER_PATH = os.path.join(MODEL_SAVE_DIR, "tfidf_vectorizer.pkl")
12
+ MODEL_PATH = os.path.join(MODEL_SAVE_DIR, "logreg_model.pkl")
13
+
14
+ # --- Column Configuration ---
15
+ TEXT_COLUMN = "Sanction_Context"
16
+ LABEL_COLUMNS = [
17
+ "Red_Flag_Reason",
18
+ "Maker_Action",
19
+ "Escalation_Level",
20
+ "Risk_Category",
21
+ "Risk_Drivers",
22
+ "Investigation_Outcome"
23
+ ]
24
+
25
+ # --- TF-IDF Settings ---
26
+ TFIDF_MAX_FEATURES = 5000
27
+ NGRAM_RANGE = (1, 2)
28
+ USE_STOPWORDS = True
29
+
30
+ # --- ML Training Settings ---
31
+ RANDOM_STATE = 42
32
+ TEST_SIZE = 0.2
33
+
34
+ # --- Create Directories ---
35
+ os.makedirs(MODEL_SAVE_DIR, exist_ok=True)