Skip to content

BGARCIAMA/MGE_Tarea03

Repository files navigation

Métodos de Gran Escala

(MCD ITAM Primavera 2024)

Autor

Nombre CU Correo Electrónico Usuario Github
Blanca Estela García Manjarrez 118886 bgarci11@itam.mx BGARCIAMA

Introducción 🧠

Este es un repositorio que contiene a detalle los scripts del modelo que permita estimar el precio de una casa dadas algunas características que el usuario deberá proporcionar a través de un front al momento de la inferencia.

Contenido del repositorio 🎯

Aqui se incluye el árbol con la estructura de tu repositorio:

.
├── ./README.md
├── ./data
│   ├── ./data/prep
│   └── ./data/raw
├── ./environment.yml
├── ./inference.py
├── ./logs
│   ├── ./logs/20240226_200042_train.log
│   ├── ./logs/20240226_200310_train.log
│   └── ./logs/20240226_200520_inference.log
├── ./models
│   └── ./models/rfr_model.joblib
├── ./notebooks
│   └── ./notebooks/Modelo_Tarea_01.ipynb
├── ./prep.py
├── ./src
│   ├── ./src/script.py
│   └── ./src/test_script.py
└── ./train.py

Base de datos ✍

Usamos el conjunto de precios de compra-venta de casas de la ciudad Ames, Iowa en Estados Unidos.

La base contiene 80 variables descritas a continuación:

  • ID: Identifier
  • SalePrice: the property's sale price in dollars. This is the target variable to predict
  • MSSubClass: The building class
  • MSZoning: The general zoning classification
  • LotFrontage: Linear feet of street connected to property
  • LotArea: Lot size in square feet
  • Street: Type of road access
  • Alley: Type of alley access
  • LotShape: General shape of property
  • LandContour: Flatness of the property
  • Utilities: Type of utilities available
  • LotConfig: Lot configuration
  • LandSlope: Slope of property
  • Neighborhood: Physical locations within Ames city limits
  • Condition1: Proximity to main road or railroad
  • Condition2: Proximity to main road or railroad (if a second is present)
  • BldgType: Type of dwelling
  • HouseStyle: Style of dwelling
  • OverallQual: Overall material and finish quality
  • OverallCond: Overall condition rating
  • YearBuilt: Original construction date
  • YearRemodAdd: Remodel date
  • RoofStyle: Type of roof
  • RoofMatl: Roof material
  • Exterior1st: Exterior covering on house
  • Exterior2nd: Exterior covering on house (if more than one material)
  • MasVnrType: Masonry veneer type
  • MasVnrArea: Masonry veneer area in square feet
  • ExterQual: Exterior material quality
  • ExterCond: Present condition of the material on the exterior
  • Foundation: Type of foundation
  • BsmtQual: Height of the basement
  • BsmtCond: General condition of the basement
  • BsmtExposure: Walkout or garden level basement walls
  • BsmtFinType1: Quality of basement finished area
  • BsmtFinSF1: Type 1 finished square feet
  • BsmtFinType2: Quality of second finished area (if present)
  • BsmtFinSF2: Type 2 finished square feet
  • BsmtUnfSF: Unfinished square feet of basement area
  • TotalBsmtSF: Total square feet of basement area
  • Heating: Type of heating
  • HeatingQC: Heating quality and condition
  • CentralAir: Central air conditioning
  • Electrical: Electrical system
  • 1stFlrSF: First Floor square feet
  • 2ndFlrSF: Second floor square feet
  • LowQualFinSF: Low quality finished square feet (all floors)
  • GrLivArea: Above grade (ground) living area square feet
  • BsmtFullBath: Basement full bathrooms
  • BsmtHalfBath: Basement half bathrooms
  • FullBath: Full bathrooms above grade
  • HalfBath: Half baths above grade
  • Bedroom: Number of bedrooms above basement level
  • Kitchen: Number of kitchens
  • KitchenQual: Kitchen quality
  • TotRmsAbvGrd: Total rooms above grade (does not include bathrooms)
  • Functional: Home functionality rating
  • Fireplaces: Number of fireplaces
  • FireplaceQu: Fireplace quality
  • GarageType: Garage location
  • GarageYrBlt: Year garage was built
  • GarageFinish: Interior finish of the garage
  • GarageCars: Size of garage in car capacity
  • GarageArea: Size of garage in square feet
  • GarageQual: Garage quality
  • GarageCond: Garage condition
  • PavedDrive: Paved driveway
  • WoodDeckSF: Wood deck area in square feet
  • OpenPorchSF: Open porch area in square feet
  • EnclosedPorch: Enclosed porch area in square feet
  • 3SsnPorch: Three season porch area in square feet
  • ScreenPorch: Screen porch area in square feet
  • PoolArea: Pool area in square feet
  • PoolQC: Pool quality
  • Fence: Fence quality
  • MiscFeature: Miscellaneous feature not covered in other categories
  • MiscVal: Value of miscellaneous feature
  • MoSold: Month Sold
  • YrSold: Year Sold
  • SaleType: Type of sale
  • SaleCondition: Condition of sale

Test

Para correr el test del script se requiere correr la siguiente línea en la terminal:

pytest src/test_script.py

Arroja el siguiente resultado:

pytest src/test_script.py
================================================== test session starts ===================================================
platform darwin -- Python 3.11.8, pytest-8.0.1, pluggy-1.4.0
rootdir: /Users/blancagarcia/Documents/2do_Sem/MGE/MGE_Tarea03
plugins: anyio-4.3.0
collected 1 item

src/test_script.py .                                                                                               [100%]

=================================================== 1 passed in 0.50s ====================================================

Arquitectura

Arquitectura

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published