# pooja2420/ames-housing-data-exploration-and-predictive-modeling architecture

> Architecture diagram of the GitHub repository pooja2420/ames-housing-data-exploration-and-predictive-modeling, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling
- Repository: https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling

## Overview

Ames Housing is an end-to-end house-price prediction project: raw property data is normalized and validated, prepared and feature-engineered, then used for model training, evaluation, and tuning; a FastAPI service accepts property details and returns price estimates. The README documents experiment tracking and deployment capabilities, but the tree contains no dedicated models package, so training is represented by the existing top-level housing.py. Relationships involving unsampled training and inference internals are documented at the capability level rather than inferred from filenames.

Main entry points: [`src/ames_housing/api/main.py`](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/main.py) (FastAPI application), [`src/ames_housing/api/routes.py`](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/routes.py) (API routes), [`src/ames_housing/data/preprocessor.py`](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/preprocessor.py) (Data preprocessing), [`housing.py`](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/housing.py) (Training workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_dataset["Ames dataset"]
  node_loader["CSV loader<br/>[loader.py]"]
  node_raw_schema["Raw schema<br/>[schema.py]"]
  node_preprocessor["Data preprocessing<br/>[preprocessor.py]"]
end

subgraph group_features["Feature engineering"]
  node_feature_pipeline["Feature pipeline<br/>[engineering.py]"]
  node_transformers["Feature transformers<br/>[transformers.py]"]
end

subgraph group_models["Modeling"]
  node_training["Training workflow<br/>[housing.py]"]
end

subgraph group_service["Prediction service"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_routes["API routes<br/>[routes.py]"]
  node_schemas["Request and response schemas<br/>[schemas.py]"]
  node_logging["Structured logging<br/>[logging.py]"]
end

node_config["Configuration<br/>[config.py]"]
node_api_user(("Prediction client"))

node_dataset -->|"provides CSV"| node_loader
node_loader -->|"validates against"| node_raw_schema
node_preprocessor -->|"loads raw data"| node_loader
node_preprocessor -->|"uses contract"| node_raw_schema
node_preprocessor -->|"reads settings"| node_config
node_feature_pipeline -->|"assembles"| node_transformers
node_feature_pipeline -->|"reads settings"| node_config
node_training -.->|"uses prepared data"| node_preprocessor
node_training -.->|"uses features"| node_feature_pipeline
node_training -.->|"trained model serves predictions"| node_api_app
node_api_user -->|"requests prediction"| node_api_app
node_api_app -->|"registers routes"| node_routes
node_api_app -->|"configures logging"| node_logging
node_api_app -->|"reads settings"| node_config
node_routes -->|"validates and returns"| node_schemas
node_routes -->|"reads settings"| node_config
node_routes -.->|"uses trained predictor"| node_training

click node_loader "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/loader.py"
click node_raw_schema "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/schema.py"
click node_preprocessor "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/preprocessor.py"
click node_config "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/config.py"
click node_feature_pipeline "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/features/engineering.py"
click node_transformers "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/features/transformers.py"
click node_training "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/housing.py"
click node_api_app "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/main.py"
click node_routes "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/routes.py"
click node_schemas "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/schemas.py"
click node_logging "https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/utils/logging.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_loader,node_raw_schema,node_preprocessor,node_api_user toneBlue
class node_feature_pipeline,node_transformers toneAmber
class node_training toneMint
class node_api_app,node_routes,node_schemas,node_logging toneRose
class node_config toneTeal
```

## Components

### Data preparation

- **Ames dataset**
- [CSV loader](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/loader.py): `src/ames_housing/data/loader.py`
- [Raw schema](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/schema.py): `src/ames_housing/data/schema.py`
- [Data preprocessing](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/data/preprocessor.py): `src/ames_housing/data/preprocessor.py`

### Feature engineering

- [Feature pipeline](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/features/engineering.py): `src/ames_housing/features/engineering.py`
- [Feature transformers](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/features/transformers.py): `src/ames_housing/features/transformers.py`

### Modeling

- [Training workflow](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/housing.py): `housing.py`

### Prediction service

- [FastAPI application](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/main.py): `src/ames_housing/api/main.py`
- [API routes](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/routes.py): `src/ames_housing/api/routes.py`
- [Request and response schemas](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/api/schemas.py): `src/ames_housing/api/schemas.py`
- [Structured logging](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/utils/logging.py): `src/ames_housing/utils/logging.py`

### Other components

- [Configuration](https://github.com/pooja2420/ames-housing-data-exploration-and-predictive-modeling/blob/main/src/ames_housing/config.py): `src/ames_housing/config.py`
- **Prediction client**

## Connections

- Ames dataset → CSV loader: provides CSV (evidence: `src/ames_housing/data/loader.py`)
- CSV loader → Raw schema: validates against (evidence: `src/ames_housing/data/loader.py`)
- Data preprocessing → CSV loader: loads raw data (evidence: `src/ames_housing/data/preprocessor.py`)
- Data preprocessing → Raw schema: uses contract (evidence: `src/ames_housing/data/preprocessor.py`)
- Data preprocessing → Configuration: reads settings (evidence: `src/ames_housing/data/preprocessor.py`)
- Feature pipeline → Feature transformers: assembles (evidence: `src/ames_housing/features/engineering.py`)
- Feature pipeline → Configuration: reads settings (evidence: `src/ames_housing/features/engineering.py`)
- Training workflow → Data preprocessing: uses prepared data
- Training workflow → Feature pipeline: uses features
- Training workflow → FastAPI application: trained model serves predictions
- Prediction client → FastAPI application: requests prediction (evidence: `README.md`)
- FastAPI application → API routes: registers routes (evidence: `src/ames_housing/api/main.py`)
- FastAPI application → Structured logging: configures logging (evidence: `src/ames_housing/api/main.py`)
- FastAPI application → Configuration: reads settings (evidence: `src/ames_housing/api/main.py`)
- API routes → Request and response schemas: validates and returns (evidence: `src/ames_housing/api/routes.py`)
- API routes → Configuration: reads settings (evidence: `src/ames_housing/api/routes.py`)
- API routes → Training workflow: uses trained predictor
