The project is a part of the Artificial Intelligence Tools (NAI) course at PJAIT. The goal of the project was to implement the Cluster K-Means algorithm and test it on a dataset of our choice. The dataset I chose was a small Iris dataset, which contains 150 samples of 3 different species of Iris flowers. The dataset contains 4 features: sepal length, sepal width, petal length and petal width. The goal of the algorithm is to cluster the samples into 3 clusters, each representing a different species of Iris flower.
- Backend:
- C#
- .NET Core 7.0 (Web API)
- Frontend:
- Python 3.9
- Pandas
- Plotly
To run this project, you need to have .NET Core 7.0 installed on your machine. You can download it from here.
After installing .NET Core, you can clone the repository and run the project using the following commands:
# Clone the repository
git clone
# Navigate to the project directory from project root
cd Cluster-K-Means-NAI-Server
# Run the project
dotnet run
After running the project, you can access the API at specified port (default: 7097).
Now you can run the Python script to test the algorithm on the Iris dataset. To do so, you need to have Python 3.9 installed on your machine. You can download it from here.
After installing Python, you can run the script using the following commands:
# Navigate to the project directory from project root
cd ClientApp
# Install the required dependencies from requirements.txt
pip install -r requirements.txt
# Run the script with specified parameters
python main.py [k number of clusters] [path to dataset]
If needed, edit the main.py file to change various parameters of the algorithm, such as number of clusters, number of iterations, 3D Scatter or 2D, etc.
The algorithm was able to cluster the samples into 3 clusters, each representing a different species of Iris flower. The results are presented with following examples:
- Iris Dataset
- Plotly
- Pandas
- Asp.NET Core
- C#
- Python
- PJAIT - The Polish-Japanese Academy of Information Technology.
- Cyprian Gburek - Author of the project.