Back to Projects
PROJECT

Machine Learning Applications with ML.NET

Machine Learning Applications with ML.NET

Technologies

C#.NET 8ML.NETWindows Forms

MACHINE LEARNING APPLICATIONS WITH ML.NET

ABOUT THE PROJECT

This project is a Windows Forms desktop application developed using C#, .NET 8, and ML.NET to explore how machine learning techniques can be applied to different types of problems.

The application integrates three machine learning models into a single interface: sentiment analysis, taxi fare prediction, and clustering using the Iris dataset.

The primary objective is to gain practical experience with the machine learning workflow, including data preparation, model training, performance evaluation, and predictions on new data.

Each model addresses a different type of problem, allowing users to explore and compare multiple machine learning approaches within the same application.

KEY FEATURES

1. Sentiment Analysis — Classification

The first model classifies Turkish user reviews as positive or negative.

A dataset containing 160 Turkish reviews was used to develop the classification model.

Text data is converted into numerical features using the FeaturizeText method provided by ML.NET.

The classification model is then trained using the SDCA Logistic Regression algorithm.

Users can enter a review into the application, and the system analyzes the text to predict whether the sentiment is positive or negative. The application also displays probability information associated with the prediction.

During evaluation, the model achieved approximately 65.2% accuracy and an F1 score of 0.667.

These results provide an opportunity to examine the challenges of text classification and the impact of limited training data on model performance.

2. Taxi Fare Prediction — Regression

The second model estimates taxi fares based on selected journey characteristics.

A synthetic dataset containing 360 records was prepared for educational purposes.

The main input features include:

  • Travel distance
  • Journey duration
  • Traffic conditions

These features are processed numerically, and an SDCA regression algorithm is used to train the prediction model.

Users can enter distance, duration, and traffic information through the application interface to obtain an estimated fare.

Performance evaluation includes regression metrics such as Mean Absolute Error (MAE) and R-squared (R²).

Since the dataset is synthetic, the application is intended to demonstrate regression techniques rather than calculate actual commercial taxi fares.

3. Iris Dataset — Clustering

The third model groups Iris flower measurements according to their similarities.

This module uses the Iris dataset, which contains 150 samples.

The model analyzes four numerical features:

  • Sepal length
  • Sepal width
  • Petal length
  • Petal width

The features are processed using MinMax normalization before the K-Means algorithm groups the samples into three clusters.

Users can enter new flower measurements, and the model predicts which cluster the sample belongs to.

Unlike the classification and regression models, this module demonstrates unsupervised learning.

Instead of predicting predefined class labels, the algorithm identifies groups of data points that share similar characteristics.

This provides a practical introduction to clustering and pattern discovery.

APPLICATION INTERFACE

The project includes a graphical desktop interface developed with Windows Forms.

All three machine learning models are accessible through separate tabs within a single application.

Users can perform sentiment analysis, estimate taxi fares using journey information, and explore clustering results by entering Iris measurements.

The interface also provides information about model training status and displays the results of prediction operations.

This structure allows different machine learning methods to be explored through a unified desktop environment.

DEVELOPMENT PROCESS AND TECHNOLOGIES

The application was developed using C#, .NET 8, the ML.NET framework, and Windows Forms.

The machine learning development workflow includes:

  1. Preparing and loading datasets.
  2. Transforming data into suitable features.
  3. Selecting appropriate machine learning algorithms.
  4. Training the models.
  5. Evaluating model performance.
  6. Performing predictions or clustering operations on new data.

For supervised learning tasks, the available data is divided into training and testing sets to evaluate performance on previously unseen examples.

AI-assisted coding tools were also used during development, while the implemented models and their functionality were tested as part of the application development process.

PROJECT OBJECTIVES AND LEARNING OUTCOMES

The purpose of this project is to explore not only the theoretical foundations of machine learning but also its practical integration into a software application.

By implementing classification, regression, and clustering models, the project demonstrates important differences between machine learning approaches.

It also provides practical experience in data preprocessing, algorithm selection, model training, performance evaluation, and desktop application development.

Because some datasets are limited in size or synthetically generated, the models are intended primarily for educational and experimental use rather than commercial deployment.

Overall, the project demonstrates how C# and ML.NET can be used to integrate multiple machine learning techniques into a single, expandable desktop application.