House Price Prediction with MLflow and scikit-learn
Entrena modelos de precios de viviendas de California con scikit-learn y registra cada ejecución en MLflow: puntuación por paso, métricas del sistema, datos exactos y un gráfico.
- Python
- uv
- MLflow
- scikit-learn
- pandas
Capturas de pantalla
Pago único
- 249 INR+ GST, 293,82 INR en total
- 5 US$
- Descárgalo desde tu biblioteca en cuanto se confirme tu pago.
- Incluye todas las versiones futuras de este proyecto, sin costo adicional.
- Última versión
- 1.0.0 · 28 nov 2026
- Licencia
- Source Code Licence
Descripción general
El código fuente completo de un modelo de precios de viviendas en Python, registrado con MLflow 3.18. Cada ejecución guarda su configuración, una puntuación de validación cada 10 árboles, sus notas de prueba, el uso de CPU y memoria, sus datos de entrenamiento, un gráfico de predicción frente a realidad y su commit de Git. Dos comandos las leen como clasificación y curva de aprendizaje.
Un modelo solo es tan útil como lo que recuerdas de cómo lo obtuviste. House Price Prediction with MLflow and scikit-learn entrena un bosque aleatorio de scikit-learn con los datos de California Housing y deja que MLflow recuerde todo sobre cada ejecución, para que compares ejecuciones en lugar de adivinar.
Lo que guarda cada ejecución
- Su configuración. Árboles, profundidad, el tamaño de cada partición y la semilla, como parámetros de MLflow.
- Una puntuación en cada paso. El bosque crece de 10 en 10 árboles y se evalúa con filas de validación tras cada paso, así MLflow dibuja la curva de aprendizaje.
- Sus puntuaciones de prueba. MAE, RMSE y R² con filas que el modelo nunca vio al entrenar. La primera ejecución obtuvo un RMSE de 0,516, unos 51.600 $ en una vivienda típica.
- El trabajo del equipo. Uso de CPU, memoria, disco y red, medido cada segundo.
- Los datos exactos. Las filas de entrenamiento, validación y prueba como datasets de MLflow, cada uno con un resumen que cambia si cambian los datos.
- Las pruebas. Un gráfico de valores predichos frente a reales, la importancia de cada variable, todas las predicciones de prueba en un archivo CSV y la configuración completa del modelo.
- El código que la produjo. El commit de Git del código que la ejecutó.
Vuelve a leer tus ejecuciones
leaderboardclasifica las ejecuciones terminadas por su RMSE de validación, con un filtro de búsqueda de MLflow opcional.curvemuestra la puntuación de una ejecución tras cada paso y el paso en que fue mejor.
Código sobre el que construir
- Un paquete de Python limpio. Una estructura
srcgestionada con uv, con tres comandos:train,curveyleaderboard. - La configuración en un solo sitio. pydantic-settings lee
.env, y.env.exampledocumenta cada ajuste. - Versiones exactas.
uv.lockfija cada paquete: MLflow 3.18.0, scikit-learn 1.9.1, pandas 3.1.1 y Python 3.15. - Sin datos en el archivo. scikit-learn descarga el dataset público en la primera ejecución.
Lo que no incluye
- Sin hosting. Se ejecuta en tu propio equipo, con un servidor de seguimiento de MLflow que inicias con un solo comando.
- Sin proyecto de pruebas. Los resultados de arriba vienen de ejecuciones reales, no de pruebas automáticas incluidas en el archivo.
Ponlo en marcha en seis pasos
- Descomprime el archivo.
- Inicia un servidor de seguimiento de MLflow.
- Copia
.env.examplea.env. - Instala los paquetes con
uv sync. - Pon el proyecto en Git.
- Entrena con
uv run train.
El README tiene todos los comandos, para macOS y Linux y para PowerShell. How to Set Up and Run the House Price Prediction Project (se abre en una pestaña nueva) (en inglés) muestra cada paso con lo que debería imprimir. Se probó desde una copia limpia del archivo en macOS.
Cómo se construyó
Las partes 1 a 4 de la serie de tutoriales gratuita MLflow Tutorial for Machine Learning in Python (se abre en una pestaña nueva) (en inglés) explican el servidor de seguimiento, las métricas a lo largo del tiempo, las métricas del sistema, los artefactos, los datasets y la búsqueda de ejecuciones, con este código.
Serie de tutoriales gratuita
MLflow Tutorial for Machine Learning in Python
¿Prefieres aprender construyéndolo? Esta guía gratuita y paso a paso en nuestro blog muestra cómo se hace el proyecto.
Qué te llevas
Todo lo que hay en el archivo, de un vistazo.
- Versión 1.0.0 del código fuente completo: un paquete de Python gestionado con uv
- El comando train: un bosque aleatorio que crece de 10 en 10 árboles, con puntuaciones de validación en cada paso y de prueba al final
- Seguimiento en MLflow de parámetros, métricas por paso, métricas de prueba, métricas del sistema, datasets, un gráfico, dos tablas y el commit de Git
- El comando leaderboard, que clasifica las ejecuciones con un filtro de búsqueda de MLflow opcional
- El comando curve, que muestra la curva de aprendizaje de una ejecución y su mejor paso
- Configuración en .env con pydantic-settings y un .env.example documentado
- uv.lock con la versión exacta de cada paquete
- Un README con la instalación para macOS, Linux y PowerShell, cada comando, opción y ajuste, y la cita del dataset
Construido con
Los entornos y las versiones exactos con los que se creó y se probó.
- Python3.15.2
- uv0.13.10
- MLflow3.18.0
- scikit-learn1.9.1
- pandas3.1.1
- NumPy2.5.5
- Matplotlib3.11.2
- pydantic-settings2.16.3
- psutil7.2.2
Qué contiene el archivo
El árbol de carpetas que obtienes al descomprimirlo.
house-price-prediction-mlflow-scikit-learn/
- src/
- house_price_prediction/
- __init__.py
- code_version.py
- config.py
- curve.py
- data.py
- datasets.py
- leaderboard.py
- plots.py
- reports.py
- train.py
- house_price_prediction/
- .env.example
- .gitignore
- .python-version
- pyproject.toml
- uv.lock
- README.md
Qué necesita de ti
Las cuentas y los servicios que espera encontrar, para que nada te sorprenda.
- uv, que instala Python 3.15 y los paquetes por ti
- Git, para que cada ejecución guarde el commit de su código
- Un servidor de seguimiento de MLflow: el README inicia uno en tu equipo con un solo comando
- Conexión a internet para la primera instalación, unos 550 MB de paquetes, y la primera ejecución, que descarga los datos
Versiones
Todas las versiones hasta ahora, de la más reciente a la más antigua.
1.0.0Más reciente
Primera versión del código fuente completo.
- Entrena un bosque aleatorio de scikit-learn con los datos de California Housing y registra cada ejecución en MLflow 3.18.0.
- Guarda la configuración, una puntuación de validación en cada paso, las puntuaciones de prueba, las métricas del sistema, los datasets, un gráfico, dos tablas y el commit de Git.
- Añade dos comandos que leen las ejecuciones: una clasificación y una curva de aprendizaje.
- Incluye un README que te lleva del archivo a tu primera ejecución registrada.
Source Code Licence
Qué puedes hacer con él
What you may and may not do with the source code you buy.
Leer la licencia completa
- What this licence covers
This licence governs every file included in a product you buy from Dewiride Store: source code, configuration, database scripts, sample data, documentation and any other file in the download. It takes effect when your payment is confirmed and applies to every release of that product that reaches your library. Files that reach your library through an annual updates membership are governed in exactly the same way.
It forms part of the Terms of Sale and Use. Where a product page states different or additional licence terms for that product, those terms prevail for that product. The membership page may likewise state different or additional licence terms for the files a membership carries, and those terms then prevail for those files.
- The licence we grant you
We grant you a perpetual, worldwide, non-exclusive, non-transferable licence to use, reproduce, adapt, translate and modify the files, and to include the result in your own work, on the conditions set out below.
Perpetual means it does not expire. Worldwide means it is not limited to any country. Non-exclusive means we license the same product to other customers. Non-transferable means you cannot pass it on to someone else.
The licence is granted to you — either you personally, or the organisation you identified when buying. Everyone working within that organisation may use the files for that organisation’s projects. Nobody outside it may.
- What you may do
- Use and change the files in your own projects, commercial or otherwise, with no limit on the number of projects.
- Build a product or a service on them and charge your own customers for it.
- Deploy the result for a client, as part of work you are doing for that client.
- Distribute the result in compiled, deployed or otherwise non-source form.
- Keep as many back-up copies as you reasonably need.
- Study, observe and test how the code works, and obtain the information you need to make it work with your own software.
The last two are yours by law under sections 52(1)(aa) to (ac) of the Indian Copyright Act, 1957, and nothing in this licence is intended to take them away.
- What you may not do
- Resell, sublicense, redistribute or publish the files themselves, in whole or in substantial part, in source form.
- Include them in a template, starter kit, course, tutorial repository or component library that you sell or give away, where the code is the thing being supplied.
- Share your account, your download links or your invoices with anyone outside your organisation.
- Publish the files in a public repository, or in any other place where they can be obtained without buying them.
- Remove or obscure the copyright and attribution notices in the source files.
- Use the files to build something whose main purpose is to compete with Dewiride Store as a supplier of the same code.
The distinction that matters is simple: you may sell what you build with the code; you may not sell the code.
- Third-party components
Our products depend on open-source libraries, frameworks and services that we did not write. Those remain under their own licences, which we do not and cannot change. Where a product includes or requires such a component, its licence is named in the product’s documentation, and complying with it is your responsibility.
- Releases
Every release of a product you own is covered by this same licence and appears in your library at no extra cost. A release you have already downloaded remains licensed to you even if we later stop publishing the product. A release that reached your library through an annual updates membership is licensed to you on these same terms, and stays licensed after the period that carried it has ended.
- Ownership
We keep ownership of the files and of the copyright in them. You own whatever you create with them: your changes, your additions and the product you build are yours.
- If this licence ends
This licence ends if you materially breach it and do not put the breach right within thirty days of us asking you to in writing. It also ends if your payment is reversed or refunded, because the purchase it depends on no longer stands. Where a membership period is refunded or reversed, the licence ends for the releases that period carried and for nothing else: anything you bought separately, or that another period carried, is unaffected.
If it ends, you must stop using the files and delete the copies you hold. Work you had already delivered to a client before that point may continue in use, so that ending this licence never breaks something your own customer relies on.
- No warranty beyond the description
The warranties and limits in section 19 and section 20 of the Terms of Sale and Use apply to this licence as well.
- Governing law
This licence is governed by the law of India, and section 24 of the Terms of Sale and Use applies to any dispute about it. If a translation and the English version differ in meaning, the English version governs.
House Price Prediction with MLflow and scikit-learn
- 249 INR+ GST, 293,82 INR en total
- 5 US$