DEV Community

Duc Nguyen Thanh
Duc Nguyen Thanh

Posted on • Edited on

3 1 1 1

[ML.NET] Predicting the Future with ML.NET with examples

Hello, I’m Duc Nguyen (Duke)

Today I will introduce ML.NET to the .NET community

So, what’s the ML.NET?

  • ML.NET is a cross-platform machine learning framework developed by Microsoft
  • Open source
  • Used in situations where it’s necessary to incorporate machine learning into C# or F# applications in order to avoid switching to other programming languages, such as Python (.NET ecosystem).
  • Able can be expanded to function with additional machine learning libraries, like TensorFlow, assisting in utilizing current models and lowering obstacles to ML.NET adoption.
  • Can be deployed in various environments, from desktop apps to web services

Future Housing Price Forecast in Hanoi, Vietnam

Alright, first you can get the source code from my repository here

Then, you can see:

Code structure

- HaNoi-VN_housing_dataset.csv: sample data file used for training
- lib/HousePriceForecast.consumption.cs: Defines the Predictmethod, which takes input data and returns predictions using the trained model
- lib/HousePriceForecast.evaluate.cs: Defines the method for calculating PFI (Permutation Feature Importance) through the CalculatePFI() method — determines the level of influence from input data
- lib/HousePriceForecast.mlnet: Binary file containing the trained ML.NET model and related metadata and if there’s a similar project, this model can be reused without retraining
- lib/HousePriceForecast.training.cs: Used to train the ML.NET model and defines data processing steps and algorithm selection

Now, on to the fun part, practice!

You can also refer to the animation image here

API Trace View

Struggling with slow API calls? 🕒

Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay