# christelle-git/house-prediction architecture

> Architecture diagram of the GitHub repository christelle-git/house-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/christelle-git/house-prediction
- Repository: https://github.com/christelle-git/house-prediction

## Overview

##### Main Components
- Data Source: Represent the CSV file (house_data.csv) as the data input component.
- Data Preprocessing: Although not explicitly abstracted in separate modules, the script (house_prediction.py) likely preprocesses the CSV data to extract the features (surface and borough).
- Regression Models: Two distinct components for “Linear Regression” and “Quadratic Regression.”
- Model Evaluation & Comparison: A component that compares the predictive performance of each model and selects the best performing one.
- Output/Result: A component that outputs the final indication of which model is best, possibly in the form of console output or a generated report.

##### Relationships and Data Flow
- From the Preprocessing stage, data is directed to both Model Training components (the linear and quadratic regression modules).

##### Architectural Patterns and Design Principles
- Even though the project is implemented as a single Python script, conceptually, it follows a pipeline or modular design with clearly defined stages (data ingestion, preprocessing, modeling, and evaluation).
- Separation of concerns: each stage of the analysis (e.g., modeling vs. evaluation) is logically separated even if not physically modularized in code.
- Use of comparison logic that suggests a pattern of model validation or benchmarking.

##### Relevant Technologies/Frameworks
- Although not specified, you may assume that standard Python data science practices are in place.

##### Elements to Include Clearly
- Labels for each component: “Input Data (CSV)”, “Data Preprocessing”, “Linear Regression Model”, “Quadratic Regression Model”, “Model Evaluation”, and “Output.”

## Diagram (Mermaid)

```mermaid
flowchart TD
    csv["Input Data (CSV)"]:::datasource
    preprocess["Data Preprocessing"]:::process
    linear["Linear Regression Model"]:::model
    quadratic["Quadratic Regression Model"]:::model
    evaluation["Model Evaluation"]:::evaluation
    output["Output"]:::output

    csv -->|"preprocess"| preprocess
    preprocess -->|"trains"| linear
    preprocess -->|"trains"| quadratic
    linear -->|"sends_results"| evaluation
    quadratic -->|"sends_results"| evaluation
    evaluation -->|"determines_best"| output

    click csv "https://github.com/christelle-git/house-prediction/blob/master/house_data.csv"
    click preprocess "https://github.com/christelle-git/house-prediction/blob/master/house_prediction.py"
    click linear "https://github.com/christelle-git/house-prediction/blob/master/house_prediction.py"
    click quadratic "https://github.com/christelle-git/house-prediction/blob/master/house_prediction.py"
    click evaluation "https://github.com/christelle-git/house-prediction/blob/master/house_prediction.py"
    click output "https://github.com/christelle-git/house-prediction/blob/master/house_prediction.py"

    classDef datasource fill:#AED6F1,stroke:#333,stroke-width:2px;
    classDef process fill:#F9E79F,stroke:#333,stroke-width:2px;
    classDef model fill:#A9DFBF,stroke:#333,stroke-width:2px;
    classDef evaluation fill:#F5B7B1,stroke:#333,stroke-width:2px;
    classDef output fill:#D7BDE2,stroke:#333,stroke-width:2px;
```
