- General Info
- Creator Info
- Features
- Technologies Used
- Setup
- Usage
- Screenshots
- Structure
- Project Status
- Room for Improvement
- Acknowledgements
- Contact
A simple program to extend K-Nearest Neighbor algorithm that have been made in the first week. The program will randomly generate 1000 data points with n
dimensional data. The program will then ask user input for coordinate value
that want to be assigned as pivot point. After that, the program will ask user input for K value
. The program will then calculate the distance
between the pivot point and all the data points (The additional feature from the last week is the optimalization using SIMD concept, it can be happen by calculate the set of dataset concurrently). The program will then sort the data points
based on the distance from the pivot point. The program will then show the K nearest data points to the pivot point. This program is made for GIK research program - ML Topics at Week02-April.
Nama | NIM | |
---|---|---|
Mohammad Rifqi Farhansyah | 13521166 | [email protected] |
- Generate
1000 data points
with 2 features (x and y) - Ask user input for
n
value (dimension of the data points) - Ask user input for
coordinate
value that want to be assigned as pivot point - Ask user input for
K
value Calculate the distance between
the pivot point and all the data pointsSort the data points
based on the distance from the pivot point- Show the
K nearest data points
to the pivot point Save the K nearest data points
to the text fileOptimalization using SIMD
concept- Print the
execution time
of the program
- MingGw-W64 version 8.1.0
Note: The version of the libraries above is the version that we used in this project. You can use the latest version of the libraries.
- Download the MingW-W64 from here.
- Install the MingW-W64.
- Open the terminal in the project directory.
cd output
and thenk_nearest_neighbor_SIMD.exe
to run the program.- Input the n value (dimension of the data points).
- Input the coordinate value that want to be assigned as pivot point.
- Input the K value.
- The program will then calculate the distance between the pivot point and all the data points.
- Program will sort the data points based on the distance from the pivot point.
- KNN Simple Program will output the K nearest data points to the pivot point.
- Program will show the execution time of the program.
Figure 1. Input
Figure 2. Result
Figure 3. Time Execution
│ k_nearest_neighbour_SIMD.cpp
│ README.md
│
├───image
│ SS1.png
│ SS2.png
│ SS3.png
│
└───output
k_nearest_neighbour_SIMD.exe
near_points_file.txt
Project is: complete
Room for Improvement:
- Add more features
- Thanks To Allah SWT