subbunanepalli commited on
Commit
67a43ce
·
verified ·
1 Parent(s): 8e2dc57

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +9 -10
config.py CHANGED
@@ -1,21 +1,20 @@
1
  import os
2
 
3
- # --- Paths ---
4
  BASE_DIR = os.path.abspath(os.path.dirname(__file__))
5
 
6
- # Path to dataset
7
  DATA_PATH = os.path.join(BASE_DIR, "data", "synthetic_transactions_samples_5000.csv")
8
 
9
- # Directory to save models
10
  MODEL_SAVE_DIR = os.path.join(BASE_DIR, "models")
11
  os.makedirs(MODEL_SAVE_DIR, exist_ok=True)
12
 
13
- # Save paths for Logistic Regression model + artifacts
14
- MODEL_PATH = os.path.join(MODEL_SAVE_DIR, "logreg_model.pkl") # ✅ Logistic Regression model
15
  TFIDF_VECTORIZER_PATH = os.path.join(MODEL_SAVE_DIR, "tfidf_vectorizer.pkl")
16
  LABEL_ENCODERS_PATH = os.path.join(MODEL_SAVE_DIR, "label_encoders.pkl")
17
 
18
- # --- Text & Label Columns ---
19
  TEXT_COLUMN = "Sanction_Context"
20
  LABEL_COLUMNS = [
21
  "Red_Flag_Reason",
@@ -26,11 +25,11 @@ LABEL_COLUMNS = [
26
  "Investigation_Outcome"
27
  ]
28
 
29
- # --- TF-IDF Settings ---
30
  TFIDF_MAX_FEATURES = 5000
31
  NGRAM_RANGE = (1, 2)
32
- USE_STOPWORDS = True # English stopwords will be removed if True
33
 
34
- # --- Train/Test Split ---
35
- RANDOM_STATE = 42
36
  TEST_SIZE = 0.2
 
 
1
  import os
2
 
3
+ # === Base Directory ===
4
  BASE_DIR = os.path.abspath(os.path.dirname(__file__))
5
 
6
+ # === Dataset Path ===
7
  DATA_PATH = os.path.join(BASE_DIR, "data", "synthetic_transactions_samples_5000.csv")
8
 
9
+ # === Model Save Paths ===
10
  MODEL_SAVE_DIR = os.path.join(BASE_DIR, "models")
11
  os.makedirs(MODEL_SAVE_DIR, exist_ok=True)
12
 
13
+ MODEL_PATH = os.path.join(MODEL_SAVE_DIR, "logreg_model.pkl")
 
14
  TFIDF_VECTORIZER_PATH = os.path.join(MODEL_SAVE_DIR, "tfidf_vectorizer.pkl")
15
  LABEL_ENCODERS_PATH = os.path.join(MODEL_SAVE_DIR, "label_encoders.pkl")
16
 
17
+ # === Columns ===
18
  TEXT_COLUMN = "Sanction_Context"
19
  LABEL_COLUMNS = [
20
  "Red_Flag_Reason",
 
25
  "Investigation_Outcome"
26
  ]
27
 
28
+ # === TF-IDF Settings ===
29
  TFIDF_MAX_FEATURES = 5000
30
  NGRAM_RANGE = (1, 2)
31
+ USE_STOPWORDS = True
32
 
33
+ # === Train/Test Split Settings ===
 
34
  TEST_SIZE = 0.2
35
+ RANDOM_STATE = 42