SPB Git

spb/wp2_uqo Public

UQO Working Paper No. 2 — Decoding Real Estate Descriptions: text-based hedonic analysis of housing listings.

TeX 73.8% Python 26%
1.2 KB · 36 lines python
Raw Blame History
1# Author: Simon-Pierre Boucher — contact@spboucher.ai2#3"""Central configuration: repository-relative paths and constants.45Every path is derived from the repository root so the pipeline runs from any6working directory. Override the database location with the WP2_DB_PATH7environment variable if the raw database lives elsewhere.8"""910import os11from pathlib import Path1213ROOT = Path(__file__).resolve().parents[1]1415DATA_RAW = ROOT / "data" / "raw"16DATA_PROCESSED = ROOT / "data" / "processed"17FIGURES_DIR = ROOT / "figures"18RESULTS_DIR = ROOT / "results"1920DB_PATH = Path(os.environ.get("WP2_DB_PATH", DATA_RAW / "louka.db"))2122# Intermediate artifacts (produced by the numbered scripts)23HOUSES_PARQUET = DATA_PROCESSED / "houses.parquet"24EMBEDDINGS_NPY = DATA_PROCESSED / "embeddings_maisons.npy"25SIM_MATRIX_NPY = DATA_PROCESSED / "sim_matrix_maisons.npy"26ANALYSIS_CSV = DATA_PROCESSED / "hedonic_maison_results.csv"2728# Sentence-transformers model used for all embeddings (384 dimensions)29EMBEDDING_MODEL = "all-MiniLM-L6-v2"30ENCODE_BATCH_SIZE = 2563132# Structural covariates of the hedonic model33STRUCTURAL_VARS = ["bedrooms", "bathrooms", "half_baths", "parking", "stories", "land_size"]3435SEED = 4236