-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.py
More file actions
33 lines (25 loc) · 933 Bytes
/
config.py
File metadata and controls
33 lines (25 loc) · 933 Bytes
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
from pydantic import BaseModel
from pathlib import Path
class DataConfig(BaseModel):
data_dir: Path = Path("FAR-Trans-Data")
asset_file: str = "asset_information.csv"
customer_file: str = "customer_information.csv"
transactions_file: str = "transactions.csv"
limit_prices_file: str = "limit_prices.csv"
close_prices_file: str = "close_prices.csv"
markets_file: str = "markets.csv"
questionnaires_file: str = "questionnaires.csv"
class ModelConfig(BaseModel):
svd_components: int = 5
knn_neighbors: int = 20
knn_metric: str = "cosine"
default_weights: list[float] = [0.25, 0.25, 0.2, 0.15, 0.15]
class CacheConfig(BaseModel):
enabled: bool = True
cache_dir: Path = Path(".cache")
ttl_seconds: int = 3600
class AppConfig(BaseModel):
data: DataConfig = DataConfig()
model: ModelConfig = ModelConfig()
cache: CacheConfig = CacheConfig()
top_n: int = 10