Code Monkey home page Code Monkey logo

gik-optimalizationknnusingsimd's Introduction

Garuda Ilmu Komputer - Weekly Task

K-Nearest Neighbor Optimalization using SIMD


Table of Contents

  1. General Info
  2. Creator Info
  3. Features
  4. Technologies Used
  5. Setup
  6. Usage
  7. Screenshots
  8. Structure
  9. Project Status
  10. Room for Improvement
  11. Acknowledgements
  12. Contact

General Information

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.

Creator Information

Nama NIM E-Mail
Mohammad Rifqi Farhansyah 13521166 [email protected]

Features

  • 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 points
  • Sort 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 file
  • Optimalization using SIMD concept
  • Print the execution time of the program

Technologies Used

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

Setup

  1. Download the MingW-W64 from here.
  2. Install the MingW-W64.

Usage

  1. Open the terminal in the project directory.
  2. cd output and then k_nearest_neighbor_SIMD.exe to run the program.
  3. Input the n value (dimension of the data points).
  4. Input the coordinate value that want to be assigned as pivot point.
  5. Input the K value.
  6. The program will then calculate the distance between the pivot point and all the data points.
  7. Program will sort the data points based on the distance from the pivot point.
  8. KNN Simple Program will output the K nearest data points to the pivot point.
  9. Program will show the execution time of the program.

Screenshots

Figure 1. Input

Figure 2. Result

Figure 3. Time Execution

Structure

│   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

Contact

Contact Me : [email protected]
2023


gik-optimalizationknnusingsimd's People

Contributors

rifqifarhansyah avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.