-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
46 lines (37 loc) · 1.28 KB
/
Copy pathconfig.py
File metadata and controls
46 lines (37 loc) · 1.28 KB
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
"""
Central configuration for the Learning Agent project.
All constants such as paths, hyperparameters and default values are
defined here. Modify this file to change the behaviour of the system.
"""
import os
# Determine base directory relative to this file
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Data and model directories
DATA_DIR = os.path.join(BASE_DIR, 'data')
MODELS_DIR = os.path.join(BASE_DIR, 'models')
OUTPUTS_DIR = os.path.join(BASE_DIR, "outputs")
# CSV file used to persist alerts and labels
ALERTS_FILE = os.path.join(DATA_DIR, 'alerts.csv')
# Names of important columns
TEXT_COLUMN = 'details' # column containing free‑text descriptions
LABEL_COLUMN = 'label' # column containing binary labels (1=true pos, 0=false pos)
# Preprocessing hyperparameters
MAX_TFIDF_FEATURES = 500 # maximum vocabulary size for TF–IDF
# Training hyperparameters
TEST_SIZE = 0.3 # proportion of data reserved for testing
RANDOM_STATE = 42 # seed for reproducibility
# Default decision threshold if calibration is not performed
DEFAULT_THRESHOLD = 0.5
__all__ = [
'BASE_DIR',
'DATA_DIR',
'MODELS_DIR',
'ALERTS_FILE',
'TEXT_COLUMN',
'LABEL_COLUMN',
'MAX_TFIDF_FEATURES',
'TEST_SIZE',
'RANDOM_STATE',
'DEFAULT_THRESHOLD',
'OUTPUTS_DIR',
]