Zum Hauptinhalt springen

House Price Prediction with MLflow and scikit-learn

Trainieren Sie Modelle für kalifornische Hauspreise mit scikit-learn und verfolgen Sie jeden Lauf in MLflow: Scores pro Schritt, Systemmetriken, genaue Daten und ein Diagramm.

  • Python
  • uv
  • MLflow
  • scikit-learn
  • pandas

Bildschirmfotos

Bildschirmfoto 1 von 6: Titelbild: House Price Prediction, Python-Quellcode für MLflow, mit seinem Stack und einem Terminal, in dem der Validierungs-RMSE von 0,5490 bei 10 Bäumen auf 0,5276 bei 100 sinkt.

Titelbild: House Price Prediction, Python-Quellcode für MLflow, mit seinem Stack und einem Terminal, in dem der Validierungs-RMSE von 0,5490 bei 10 Bäumen auf 0,5276 bei 100 sinkt.

Einmaliger Preis

  • 249 ₹zzgl. GST, insgesamt 293,82 ₹
  • 5 $
  • Laden Sie es aus Ihrer Bibliothek herunter, sobald Ihre Zahlung bestätigt ist.
  • Alle künftigen Releases dieses Projekts sind ohne Aufpreis enthalten.
Neuestes Release
1.0.0 · 28.11.2026

Überblick

Der vollständige Quellcode eines Hauspreis-Modells in Python, durchgehend mit MLflow 3.18 verfolgt. Jeder Trainingslauf speichert seine Einstellungen, alle 10 Bäume einen Validierungs-Score, seine Test-Scores, CPU- und Speichernutzung, die Trainingsdaten, ein Diagramm von Vorhersage gegen tatsächlichen Wert und seinen Git-Commit. Zwei Befehle lesen die Läufe als Rangliste und Lernkurve aus.

Ein Modell ist nur so nützlich wie Ihre Erinnerung daran, wie es entstanden ist. House Price Prediction with MLflow and scikit-learn trainiert einen Random Forest von scikit-learn mit den California-Housing-Daten und lässt MLflow sich alles über jeden Lauf merken, damit Sie Läufe vergleichen, statt zu raten.

Was jeder Lauf festhält

  • Seine Einstellungen. Bäume, Tiefe, die Größe jeder Aufteilung und den Seed, als MLflow-Parameter.
  • Einen Score pro Schritt. Der Forest wächst um 10 Bäume auf einmal und wird nach jedem Schritt mit Validierungszeilen bewertet, sodass MLflow die Lernkurve zeichnet.
  • Seine Test-Scores. MAE, RMSE und R² auf Zeilen, die das Modell beim Training nie gesehen hat. Der erste Lauf erreichte einen RMSE von 0,516, rund 51.600 $ bei einem typischen Haus.
  • Die Arbeit des Rechners. CPU-, Speicher-, Festplatten- und Netzwerknutzung, jede Sekunde gemessen.
  • Die genauen Daten. Die Trainings-, Validierungs- und Testzeilen als MLflow-Datasets, jedes mit einem Digest, der sich ändert, wenn sich die Daten ändern.
  • Die Belege. Ein Diagramm von Vorhersage gegen tatsächlichen Wert, die Wichtigkeit jedes Merkmals, jede Testvorhersage als CSV-Datei und die vollständigen Einstellungen des Modells.
  • Der Code dahinter. Der Git-Commit des Codes, der den Lauf erzeugt hat.

Läufe wieder auslesen

  • leaderboard ordnet die abgeschlossenen Läufe nach Validierungs-RMSE, optional mit einem MLflow-Suchfilter.
  • curve zeigt den Score eines Laufs nach jedem Schritt und den Schritt, an dem er am besten war.

Code, auf dem Sie aufbauen können

  • Ein sauberes Python-Paket. Eine src-Struktur, verwaltet mit uv, mit drei Befehlen: train, curve und leaderboard.
  • Einstellungen an einem Ort. pydantic-settings liest .env, und .env.example dokumentiert jede Einstellung.
  • Exakte Versionen. uv.lock legt jedes Paket fest: MLflow 3.18.0, scikit-learn 1.9.1, pandas 3.1.1 und Python 3.15.
  • Keine Daten im Archiv. scikit-learn lädt den öffentlichen Datensatz beim ersten Lauf herunter.

Was nicht enthalten ist

  • Kein Hosting. Es läuft auf Ihrem eigenen Rechner, mit einem MLflow-Tracking-Server, den Sie mit einem Befehl starten.
  • Kein Testprojekt. Die Ergebnisse oben stammen aus echten Läufen, nicht aus automatisierten Tests im Archiv.

In sechs Schritten zum Laufen bringen

  1. Entpacken Sie das Archiv.
  2. Starten Sie einen MLflow-Tracking-Server.
  3. Kopieren Sie .env.example nach .env.
  4. Installieren Sie die Pakete mit uv sync.
  5. Legen Sie das Projekt in Git an.
  6. Trainieren Sie mit uv run train.

Die README enthält jeden Befehl, für macOS und Linux und für PowerShell. How to Set Up and Run the House Price Prediction Project (öffnet in einem neuen Tab) (auf Englisch) zeigt jeden Schritt mit seiner Ausgabe. Getestet wurde mit einer frischen Kopie des Archivs unter macOS.

So wurde es gebaut

Die Teile 1 bis 4 der kostenlosen Tutorial-Reihe MLflow Tutorial for Machine Learning in Python (öffnet in einem neuen Tab) (auf Englisch) erklären anhand dieses Codes den Tracking-Server, Metriken über die Zeit, Systemmetriken, Artefakte, Datasets und die Suche nach Läufen.

Kostenlose Tutorial-Reihe

MLflow Tutorial for Machine Learning in Python

Sie lernen lieber beim Nachbauen? Diese kostenlose Schritt-für-Schritt-Anleitung in unserem Blog zeigt, wie das Projekt entsteht.

Reihe lesen (öffnet in einem neuen Tab)

Das bekommen Sie

Alles im Archiv, auf einen Blick.

  • Version 1.0.0 des vollständigen Quellcodes: ein mit uv verwaltetes Python-Paket
  • Der Befehl train: ein Random Forest, der um 10 Bäume auf einmal wächst, mit Validierungs-Scores bei jedem Schritt und Test-Scores am Ende
  • MLflow-Tracking von Parametern, Schrittmetriken, Testmetriken, Systemmetriken, Datasets, einem Diagramm, zwei Tabellen und dem Git-Commit
  • Der Befehl leaderboard, der Läufe ordnet, optional mit einem MLflow-Suchfilter
  • Der Befehl curve, der die Lernkurve eines Laufs und seinen besten Schritt zeigt
  • Einstellungen in .env über pydantic-settings, mit einer dokumentierten .env.example
  • uv.lock mit der exakten Version jedes Pakets
  • Eine README mit der Einrichtung für macOS, Linux und PowerShell, jedem Befehl, jeder Option und Einstellung und der Quellenangabe des Datensatzes

Gebaut mit

Die genauen Laufzeitumgebungen und Versionen, mit denen gebaut und getestet wurde.

  • 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

Was im Archiv liegt

Der Dateibaum, den Sie nach dem Entpacken vor sich haben.

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
  • .env.example
  • .gitignore
  • .python-version
  • pyproject.toml
  • uv.lock
  • README.md

Was es von Ihnen braucht

Die Konten und Dienste, die es voraussetzt, damit Sie später nichts überrascht.

  • uv, das Python 3.15 und die Pakete für Sie installiert
  • Git, damit jeder Lauf den Commit seines Codes festhält
  • Einen MLflow-Tracking-Server: Die README startet einen auf Ihrem Rechner mit einem Befehl
  • Eine Internetverbindung für die erste Installation, rund 550 MB Pakete, und den ersten Lauf, der die Daten herunterlädt

Versionen

Alle bisherigen Versionen, die neueste zuerst.

  1. 1.0.0Neueste

    Erstes Release des vollständigen Quellcodes.

    • Trainiert einen Random Forest von scikit-learn mit den California-Housing-Daten und verfolgt jeden Lauf in MLflow 3.18.0.
    • Hält die Einstellungen, einen Validierungs-Score pro Schritt, die Test-Scores, Systemmetriken, die Datasets, ein Diagramm, zwei Tabellen und den Git-Commit fest.
    • Ergänzt zwei Befehle, die die Läufe auslesen: eine Rangliste und eine Lernkurve.
    • Enthält eine README, die Sie vom Archiv bis zu Ihrem ersten verfolgten Lauf führt.

Source Code Licence

Was Sie damit tun dürfen

What you may and may not do with the source code you buy.

Vollständige Lizenz lesen
  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.